68 lines
3.8 KiB
XML
68 lines
3.8 KiB
XML
<Window x:Class="charger_gui.MainWindow"
|
||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
xmlns:local="clr-namespace:charger_gui"
|
||
mc:Ignorable="d"
|
||
Title="MainWindow" Height="450" Width="800">
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="30"/>
|
||
<RowDefinition Height="3*"/>
|
||
<RowDefinition Height="*"/>
|
||
</Grid.RowDefinitions>
|
||
<TextBlock Grid.Row="0" Grid.Column="0" Text="Select Port" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" FontSize="20"/>
|
||
<ComboBox Name="Ports" Grid.Row="0" Grid.Column="1" ItemsSource="{Binding Path=Ports}" SelectionChanged="Ports_SelectionChanged"/>
|
||
<Ellipse Width="30" Height="30" Grid.Column="2" Grid.Row="0" Fill="{Binding Path=ConnectionStatus,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}" />
|
||
<Grid Grid.Row="1" Grid.Column="0">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="*"/>
|
||
<ColumnDefinition Width="*"/>
|
||
</Grid.ColumnDefinitions>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="30"/>
|
||
<RowDefinition Height="30"/>
|
||
<RowDefinition Height="30"/>
|
||
<RowDefinition Height="30"/>
|
||
<RowDefinition Height="30"/>
|
||
<RowDefinition Height="30"/>
|
||
<RowDefinition Height="30"/>
|
||
<RowDefinition Height="30"/>
|
||
<RowDefinition Height="30"/>
|
||
</Grid.RowDefinitions>
|
||
<TextBlock Grid.Row="0" Grid.Column="0" FontSize="20" Text="I_acc"/>
|
||
<TextBlock Grid.Row="0" Grid.Column="1" FontSize="20" Text="{Binding Path=IAcc,Mode=OneWay,StringFormat=F4}" />
|
||
<TextBlock Grid.Row="1" Grid.Column="0" FontSize="20" Text="U1_acc"/>
|
||
<TextBlock Grid.Row="1" Grid.Column="1" FontSize="20" Text="{Binding Path=U1Acc,Mode=OneWay,StringFormat=F4}" />
|
||
<TextBlock Grid.Row="2" Grid.Column="0" FontSize="20" Text="U2_acc"/>
|
||
<TextBlock Grid.Row="2" Grid.Column="1" FontSize="20" Text="{Binding Path=U2Acc,Mode=OneWay,StringFormat=F4}" />
|
||
<TextBlock Grid.Row="3" Grid.Column="0" FontSize="20" Text="I_lamp"/>
|
||
<TextBlock Grid.Row="3" Grid.Column="1" FontSize="20" Text="{Binding Path=ILamp,Mode=OneWay,StringFormat=F4}" />
|
||
<TextBlock Grid.Row="4" Grid.Column="0" FontSize="20" Text="U1_lamp"/>
|
||
<TextBlock Grid.Row="4" Grid.Column="1" FontSize="20" Text="{Binding Path=U1Lamp,Mode=OneWay,StringFormat=F4}" />
|
||
<TextBlock Grid.Row="5" Grid.Column="0" FontSize="20" Text="U2_lamp"/>
|
||
<TextBlock Grid.Row="5" Grid.Column="1" FontSize="20" Text="{Binding Path=U2Lamp,Mode=OneWay,StringFormat=F4}" />
|
||
<TextBlock Grid.Row="6" Grid.Column="0" FontSize="20" Text="CHARGE"/>
|
||
<Ellipse Grid.Row="6" Grid.Column="1" Width="20" Height="20" Fill="{Binding Path=ChargeStatus,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}" />
|
||
<TextBlock Grid.Row="7" Grid.Column="0" FontSize="20" Text="LAMP"/>
|
||
<Ellipse Grid.Row="7" Grid.Column="1" Width="20" Height="20" Fill="{Binding Path=LampStatus,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}" />
|
||
</Grid>
|
||
<StackPanel Grid.Row="1" Grid.Column="1">
|
||
<Button Content="Flip Lamp" Height="40" Click="LampButton_Click"/>
|
||
<Button Content="Flip Charge" Height="40" Click="FlipChargeButton_Click"/>
|
||
</StackPanel>
|
||
<StackPanel Grid.Row="1" Grid.Column="2">
|
||
<Button Content="Discharge" Height="40" Click="DischargeButton_Click"/>
|
||
<Button Content="Сharge" Height="40" Click="ChargeButton_Click"/>
|
||
</StackPanel>
|
||
<TextBlock Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4" Text="{Binding Path=OperationStatus,Mode=OneWay}" />
|
||
</Grid>
|
||
</Window>
|