|
|
@@ -48,74 +48,198 @@
|
|
|
<Grid Grid.Column="0">
|
|
|
<Grid Margin="15" Background="#37474f">
|
|
|
<Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="*"/>
|
|
|
- <RowDefinition Height="*"/>
|
|
|
+ <RowDefinition/>
|
|
|
+ <RowDefinition/>
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
<Grid Grid.Row="0">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
<Grid.RowDefinitions>
|
|
|
- <RowDefinition/>
|
|
|
- <RowDefinition/>
|
|
|
+ <RowDefinition Height="*"/>
|
|
|
+ <RowDefinition Height="*"/>
|
|
|
+ <RowDefinition Height="*"/>
|
|
|
+ <RowDefinition Height="*"/>
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
- <StackPanel Grid.Row="0" Orientation="Horizontal"
|
|
|
- VerticalAlignment="Center" HorizontalAlignment="Left"
|
|
|
- Margin=" 25">
|
|
|
- <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center">
|
|
|
- <Button Content="Version" Margin="3" IsEnabled="False"/>
|
|
|
- <Button Content="LifeTime" Margin="3" IsEnabled="False"/>
|
|
|
- </StackPanel>
|
|
|
-
|
|
|
- <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center">
|
|
|
- <Button Content="1.0.0.01" Margin="3" Background="{x:Null}"/>
|
|
|
- <Button Content="yyyy-MM-dd" Margin="3" Background="{x:Null}"/>
|
|
|
- </StackPanel>
|
|
|
- </StackPanel>
|
|
|
-
|
|
|
- <!--Send Message Buttons-->
|
|
|
- <StackPanel Grid.Row="1" Orientation="Horizontal"
|
|
|
- VerticalAlignment="Center" HorizontalAlignment="Left"
|
|
|
- Margin="25">
|
|
|
- <Button Margin="5">
|
|
|
- <StackPanel>
|
|
|
- <TextBlock Text="MSG1"/>
|
|
|
- </StackPanel>
|
|
|
- </Button>
|
|
|
-
|
|
|
- <Button Margin="5">
|
|
|
- <StackPanel>
|
|
|
- <TextBlock Text="MSG2"/>
|
|
|
- </StackPanel>
|
|
|
- </Button>
|
|
|
-
|
|
|
- <Button Margin="5">
|
|
|
- <StackPanel>
|
|
|
- <TextBlock Text="MSG3"/>
|
|
|
- </StackPanel>
|
|
|
- </Button>
|
|
|
-
|
|
|
- <Button Margin="5">
|
|
|
- <StackPanel>
|
|
|
- <TextBlock Text="MSG4"/>
|
|
|
- </StackPanel>
|
|
|
- </Button>
|
|
|
-
|
|
|
- <Button Margin="5">
|
|
|
- <StackPanel>
|
|
|
- <TextBlock Text="MSG5"/>
|
|
|
- </StackPanel>
|
|
|
- </Button>
|
|
|
- </StackPanel>
|
|
|
+ <!--Voltage-->
|
|
|
+ <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, FallbackValue=0.0V}"/>
|
|
|
+ </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, 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, 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=0x0}"/>
|
|
|
+ </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, 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 ChargeTime, FallbackValue=min}"/>
|
|
|
+ </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 DisChargeTime, FallbackValue=min}"/>
|
|
|
+ </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, 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, 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, FallbackValue=Wh}"/>
|
|
|
+ </TextBlock>
|
|
|
+ </Border>
|
|
|
</Grid>
|
|
|
|
|
|
- <Grid Grid.Row="1">
|
|
|
- <StackPanel VerticalAlignment="Top">
|
|
|
+ <!--<Grid Grid.Row="1">
|
|
|
+ <StackPanel VerticalAlignment="Center">
|
|
|
<GroupBox
|
|
|
Margin="30,0,20,0"
|
|
|
Header="Data Receive" FontSize="15">
|
|
|
- <TextBox Text="{Binding BatteryReceive, FallbackValue=[Receive] : xxxxx}"/>
|
|
|
+ <TextBox Text="{Binding BatteryReceive, FallbackValue=[Receive] : xxxxx}" IsReadOnly="True" Foreground="Orange"/>
|
|
|
</GroupBox>
|
|
|
</StackPanel>
|
|
|
+ </Grid>-->
|
|
|
+ <Grid Grid.Row="1">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition/>
|
|
|
+ <RowDefinition/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Grid Grid.Row="0">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition/>
|
|
|
+ <ColumnDefinition/>
|
|
|
+ <ColumnDefinition/>
|
|
|
+ <ColumnDefinition/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition/>
|
|
|
+ <RowDefinition/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Border Grid.Row="0" BorderBrush="Gray" BorderThickness="1" Grid.ColumnSpan="4" Grid.RowSpan="2"/>
|
|
|
+
|
|
|
+ <Ellipse Grid.Column="0" Margin="48,10,53,10" Fill="{Binding SerialOpenState}" Stroke="Gray"/>
|
|
|
+ <TextBlock Text="Open State" Grid.Column="0"
|
|
|
+ VerticalAlignment="Bottom"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ Foreground="White"/>
|
|
|
+ <Button Command="{Binding BatteryOpenCommand}" Content="Battery Open" Grid.Column="1" Margin="10" Height="Auto" />
|
|
|
+ <Button Command="{Binding BatteryCloseCommand}" Content="Battery Close" Grid.Column="2" Margin="10" Height="Auto"/>
|
|
|
+ <Button Content="Pakcet Send" Grid.Column="2" Grid.Row="1" Margin="10" Height="Auto"/>
|
|
|
+ </Grid>
|
|
|
+
|
|
|
+ <Border Grid.Row="1" BorderBrush="Gray" BorderThickness="1">
|
|
|
+ <TextBox Grid.Row="1" Text="{Binding BatteryReceive, FallbackValue=[Receive] : xxxxx}"
|
|
|
+ IsReadOnly="True" Foreground="Orange"
|
|
|
+ FontSize="20"/>
|
|
|
+ </Border>
|
|
|
</Grid>
|
|
|
</Grid>
|
|
|
</Grid>
|
|
|
@@ -123,25 +247,7 @@
|
|
|
<Grid Grid.Column="1" Background="#37474f">
|
|
|
<Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
|
|
|
<StackPanel>
|
|
|
- <Button Margin="5" HorizontalAlignment="Stretch" Height="69"
|
|
|
- BorderBrush="Gray" BorderThickness="2"
|
|
|
- Command="{Binding CloseDialogCommand}" CommandParameter="true">
|
|
|
- <StackPanel>
|
|
|
- <!--<materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
|
|
|
- <TextBlock Text="Open" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
|
|
|
- </StackPanel>
|
|
|
- </Button>
|
|
|
-
|
|
|
- <Button Margin="5" HorizontalAlignment="Stretch" Height="69"
|
|
|
- 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>
|
|
|
-
|
|
|
- <Button Margin="5,50" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
|
|
|
+ <Button Margin="7,20" HorizontalAlignment="Stretch" Height="Auto" 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" />
|
|
|
@@ -155,4 +261,4 @@
|
|
|
|
|
|
<!--<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
|
|
|
<TextBlock><Run Text="{Binding Title, FallbackValue=Battery Config View}" FontSize="40"/></TextBlock>
|
|
|
-</StackPanel>-->
|
|
|
+</StackPanel>-->
|