76 lines
4.0 KiB
XML
76 lines
4.0 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="U2"/>
|
||
<TextBlock Grid.Row="1" Grid.Column="1" FontSize="20" Text="{Binding Path=U2,Mode=OneWay,StringFormat=F4}" />
|
||
<TextBlock Grid.Row="2" Grid.Column="0" FontSize="20" Text="U3"/>
|
||
<TextBlock Grid.Row="2" Grid.Column="1" FontSize="20" Text="{Binding Path=U3,Mode=OneWay,StringFormat=F4}" />
|
||
<TextBlock Grid.Row="3" Grid.Column="0" FontSize="20" Text="U4"/>
|
||
<TextBlock Grid.Row="3" Grid.Column="1" FontSize="20" Text="{Binding Path=U4,Mode=OneWay,StringFormat=F4}" />
|
||
<TextBlock Grid.Row="4" Grid.Column="0" FontSize="20" Text="U5"/>
|
||
<TextBlock Grid.Row="4" Grid.Column="1" FontSize="20" Text="{Binding Path=U5,Mode=OneWay,StringFormat=F4}" />
|
||
<TextBlock Grid.Row="5" Grid.Column="0" FontSize="20" Text="CHARGE"/>
|
||
<Ellipse Grid.Row="5" Grid.Column="1" Width="20" Height="20" Fill="{Binding Path=ChargeStatus,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}" />
|
||
<TextBlock Grid.Row="6" Grid.Column="0" FontSize="20" Text="LAMP"/>
|
||
<Ellipse Grid.Row="6" Grid.Column="1" Width="20" Height="20" Fill="{Binding Path=LampStatus,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}" />
|
||
</Grid>
|
||
<StackPanel Grid.Row="1" Grid.Column="1">
|
||
<TextBlock FontSize="24" Text="MANUAL"/>
|
||
<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">
|
||
<TextBlock FontSize="24" Text="AUTO"/>
|
||
<Button Content="Discharge" Height="40" Click="DischargeButton_Click"/>
|
||
<Button Content="Сharge" Height="40" Click="ChargeButton_Click"/>
|
||
</StackPanel>
|
||
<StackPanel Grid.Row="1" Grid.Column="3">
|
||
<TextBlock FontSize="24" Text="TRAIN"/>
|
||
<StackPanel Orientation="Horizontal">
|
||
<TextBlock FontSize="20" Text="Duration (s)" Height="40"/>
|
||
<TextBox Text="{Binding Path=TrainDuration}" FontSize="20" MinWidth="60"/>
|
||
</StackPanel>
|
||
<Button Content="GO" Height="40" Click="TrainButton_Click"/>
|
||
</StackPanel>
|
||
<TextBlock Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4" Text="{Binding Path=OperationStatus,Mode=OneWay}" />
|
||
</Grid>
|
||
</Window>
|