| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235 |
- <UserControl x:Class="OHV.Module.Interactivity.PopUp.BatteryConfigView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:OHV.Module.Interactivity.PopUp"
- xmlns:prism="http://prismlibrary.com/"
- xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
- prism:ViewModelLocator.AutoWireViewModel="True"
- mc:Ignorable="d"
- Height="1080" Width="1920"
- Background="#CC282C34">
- <prism:Dialog.WindowStyle>
- <Style TargetType="Window">
- <Setter Property="prism:Dialog.WindowStartupLocation" Value="CenterScreen" />
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="AllowsTransparency" Value="True"/>
- <Setter Property="ResizeMode" Value="NoResize"/>
- <Setter Property="WindowStyle" Value="None"/>
- <Setter Property="BorderThickness" Value="1"/>
- <Setter Property="BorderBrush" Value="{DynamicResource BorderSolidNormal}"/>
- <Setter Property="Template" Value="{DynamicResource WindowTemplateKey}"/>
- <Setter Property="WindowState" Value="Maximized"/>
- <!--<Style.Triggers>
- <Trigger Property="ResizeMode" Value="CanResizeWithGrip">
- <Setter Property="Template" Value="{StaticResource WindowTemplateKey}"/>
- </Trigger>
- </Style.Triggers>-->
- </Style>
- </prism:Dialog.WindowStyle>
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="/OHV.LanguageHelper;component/Languages/English.xaml"/>
- </ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
- </UserControl.Resources>
- <Border BorderBrush="Gray" BorderThickness="2" Width="800" Height="600">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="130"/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="50"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0">
- <StackPanel Orientation="Horizontal">
- <TextBlock Grid.Row="0" Margin="5" Text="Battery View" FontSize="25" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Center"/>
- <!--<materialDesign:PackIcon Margin="10,0,0,0" Kind="OfflineBolt" VerticalAlignment="Center" HorizontalAlignment="Center" Height="Auto" Width="auto"/>-->
- </StackPanel>
- <StackPanel VerticalAlignment="Center"
- HorizontalAlignment="Right"
- Margin="1">
- <Button Margin="1" HorizontalAlignment="Center" Height="45" BorderBrush="Gray" BorderThickness="0" Background="{x:Null}"
- HorizontalContentAlignment="Right">
- <StackPanel Orientation="Horizontal">
- <Ellipse Margin="0,0,10,0" Fill="{Binding BatteryConnectBrush, FallbackValue=Gray}" Width="23" Height="21"/>
- <TextBlock Margin="2" Text="{Binding BatteryConnect, FallbackValue=STATUS}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
- </StackPanel>
- </Button>
- </StackPanel>
- </Grid>
- <Grid Grid.Column="0" Grid.Row="1">
- <Grid Margin="15" Background="#37474f">
- <Grid Grid.Row="0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="*"/>
- <RowDefinition Height="*"/>
- <RowDefinition Height="*"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <Button Grid.Column="0" Grid.Row="0"
- Content="Voltage" Margin="3" VerticalAlignment="Bottom"/>
- <Border Grid.Row="1" Grid.Column="0" BorderBrush="Gray" BorderThickness="1" Margin="5">
- <TextBlock Grid.Column="0" Grid.Row="1"
- VerticalAlignment="Center"
- HorizontalAlignment="Center"
- Foreground="Orange" FontSize="20">
- <Run Text="{Binding Voltage, StringFormat={}{0:0.0V}, FallbackValue=0.00V}"/>
- </TextBlock>
- </Border>
- <!--Current-->
- <Button Grid.Column="1" Grid.Row="0"
- Content="Current" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
- <Border Grid.Column="1" Grid.Row="1" Margin="5"
- BorderBrush="Gray" BorderThickness="1">
- <TextBlock Grid.Column="0" Grid.Row="1"
- VerticalAlignment="Center"
- HorizontalAlignment="Center"
- Foreground="Orange" FontSize="20">
- <Run Text="{Binding Current,StringFormat={}{0:0.0A}, FallbackValue=0.0A}"/>
- </TextBlock>
- </Border>
- <!--SOC-->
- <Button Grid.Column="2" Grid.Row="0"
- Content="SOC" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
- <Border Grid.Column="2" Grid.Row="1" Margin="5"
- BorderBrush="Gray" BorderThickness="1">
- <TextBlock Grid.Column="0" Grid.Row="1"
- VerticalAlignment="Center"
- HorizontalAlignment="Center"
- Foreground="Orange" FontSize="20">
- <Run Text="{Binding SOC, StringFormat={}{0}%, FallbackValue=0%}"/>
- </TextBlock>
- </Border>
- <!--Battery State-->
- <Button Grid.Column="3" Grid.Row="0"
- Content="Battery State" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
- <Border Grid.Column="3" Grid.Row="1" Margin="5"
- BorderBrush="Gray" BorderThickness="1">
- <TextBlock Grid.Column="0" Grid.Row="1"
- VerticalAlignment="Center"
- HorizontalAlignment="Center"
- Foreground="Orange" FontSize="20">
- <Run Text="{Binding BatteryState, FallbackValue=None}"/>
- </TextBlock>
- </Border>
- <!--Temperature-->
- <Button Grid.Column="4" Grid.Row="0"
- Content="Temperature" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
- <Border Grid.Column="4" Grid.Row="1" Margin="5"
- BorderBrush="Gray" BorderThickness="1">
- <TextBlock Grid.Column="0" Grid.Row="1"
- VerticalAlignment="Center"
- HorizontalAlignment="Center"
- Foreground="Orange" FontSize="20">
- <Run Text="{Binding Temperature, StringFormat={}{0:0.0C}, FallbackValue=C}"/>
- </TextBlock>
- </Border>
- <!--ChargeTime-->
- <Button Grid.Column="0" Grid.Row="2"
- Content="ChargeTime" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
- <Border Grid.Column="0" Grid.Row="3" Margin="5"
- BorderBrush="Gray" BorderThickness="1">
- <TextBlock Grid.Column="0" Grid.Row="1"
- VerticalAlignment="Center"
- HorizontalAlignment="Center"
- Foreground="Orange" FontSize="20">
- <Run Text="{Binding AverageTimeToFull,StringFormat={}{0:0.0}H, FallbackValue=H}"/>
- </TextBlock>
- </Border>
- <!--DisChargeTime-->
- <Button Grid.Column="1" Grid.Row="2"
- Content="DisChargeTime" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
- <Border Grid.Column="1" Grid.Row="3" Margin="5"
- BorderBrush="Gray" BorderThickness="1">
- <TextBlock Grid.Column="0" Grid.Row="1"
- VerticalAlignment="Center"
- HorizontalAlignment="Center"
- Foreground="Orange" FontSize="20">
- <Run Text="{Binding AverageTimeToEmpty, StringFormat={}{0:0.0}H,FallbackValue=H}"/>
- </TextBlock>
- </Border>
- <!--SOH-->
- <Button Grid.Column="2" Grid.Row="2"
- Content="SOH" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
- <Border Grid.Column="2" Grid.Row="3" Margin="5"
- BorderBrush="Gray" BorderThickness="1">
- <TextBlock Grid.Column="0" Grid.Row="1"
- VerticalAlignment="Center"
- HorizontalAlignment="Center"
- Foreground="Orange" FontSize="20">
- <Run Text="{Binding SOH, StringFormat={}{0}%,FallbackValue=0%}"/>
- </TextBlock>
- </Border>
- <!--Capacity-->
- <Button Grid.Column="3" Grid.Row="2"
- Content="Capacity" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
- <Border Grid.Column="3" Grid.Row="3" Margin="5"
- BorderBrush="Gray" BorderThickness="1">
- <TextBlock Grid.Column="0" Grid.Row="1"
- VerticalAlignment="Center"
- HorizontalAlignment="Center"
- Foreground="Orange" FontSize="20">
- <Run Text="{Binding Capacity, StringFormat={}{0:0Ah}, FallbackValue=Ah}"/>
- </TextBlock>
- </Border>
- <!--Energy-->
- <Button Grid.Column="4" Grid.Row="2"
- Content="Energy" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
- <Border Grid.Column="4" Grid.Row="3" Margin="5"
- BorderBrush="Gray" BorderThickness="1">
- <TextBlock Grid.Column="0" Grid.Row="1"
- VerticalAlignment="Center"
- HorizontalAlignment="Center"
- Foreground="Orange" FontSize="20">
- <Run Text="{Binding Energy, StringFormat={}{0:0.0Wh},FallbackValue=Wh}"/>
- </TextBlock>
- </Border>
- </Grid>
- </Grid>
- </Grid>
- <Grid Grid.Column="1" Background="#263238" Grid.RowSpan="2">
- <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
- <StackPanel VerticalAlignment="Bottom">
- <Button Margin="10,0,10,10" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
- <StackPanel>
- <materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
- <TextBlock Text="Close" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
- </StackPanel>
- </Button>
- </StackPanel>
- </Grid>
- </Grid>
- </Border>
- </UserControl>
|