You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
99 lines
5.5 KiB
99 lines
5.5 KiB
<UserControl x:Class="RobotClientWpf.Views.MainView"
|
|
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:RobotClientWpf.Views"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="430" d:DesignWidth="1200" FontSize="15" KeyDown="UserControl_KeyDown">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="400"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="200"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- RIGHT SIDE -->
|
|
<StackPanel Orientation="Vertical" Grid.Row="0" Grid.Column="1" Grid.RowSpan="2">
|
|
<GroupBox Header="Splitflap Display" Margin="10" HorizontalAlignment="Right" Width="180">
|
|
<TextBox x:Name="tbSplitflapText" Height="70" Width="150" FontSize="30" IsReadOnly="True" TextWrapping="NoWrap" HorizontalAlignment="Left"/>
|
|
</GroupBox>
|
|
<GroupBox Header="Robot" Margin="10" HorizontalAlignment="Right" Width="350">
|
|
<StackPanel Orientation="Vertical">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Label Content="Battery" Margin="10 0"/>
|
|
<TextBox x:Name="tbRoboVoltage" Height="25" Width="100" FontSize="15" IsReadOnly="True" TextWrapping="NoWrap" HorizontalAlignment="Left">NaN</TextBox>
|
|
<Label Content="V" Margin="10 0"/>
|
|
</StackPanel>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Label Content="State" Margin="10 0"/>
|
|
<Ellipse Fill="Red" x:Name="ellipseRed" Width="20" Height="20" Margin="15 0" Opacity="0"/>
|
|
<Ellipse Fill="Green" x:Name="ellipseGreen" Width="20" Height="20" Margin="0 0" Opacity="0"/>
|
|
</StackPanel>
|
|
|
|
</StackPanel>
|
|
</GroupBox>
|
|
</StackPanel>
|
|
|
|
<!-- LEFT SIDE -->
|
|
<DockPanel>
|
|
<GroupBox DockPanel.Dock="Left" Grid.Column="0" Header="Robot Control" Width="200">
|
|
<StackPanel Orientation="Vertical" Margin="5">
|
|
<Button x:Name="btnModeAuto" Height="25" Margin="0 5" Click="btnModeAuto_Click">Set Automatic Mode</Button>
|
|
<Button x:Name="btnModeManual" Height="25" Margin="0 5" Click="btnModeManual_Click">Set Manual Mode</Button>
|
|
</StackPanel>
|
|
</GroupBox>
|
|
<GroupBox DockPanel.Dock="Left" Grid.Column="0" Header="Robot Steering" Width="200">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="25"/>
|
|
<RowDefinition Height="25"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Button Grid.Column="1" Grid.Row="0" Height="30" Width="30" x:Name="btnRoboFwd" Click="btnRoboFwd_Click">
|
|
<Image>
|
|
<Image.Source>
|
|
<BitmapImage UriSource="/Assets/arrow-down-bold.png" Rotation="Rotate180"/>
|
|
</Image.Source>
|
|
</Image>
|
|
</Button>
|
|
<Button Grid.Column="1" Grid.Row="1" Height="30" Width="30" x:Name="btnRoboBwd" Click="btnRoboBwd_Click">
|
|
<Image>
|
|
<Image.Source>
|
|
<BitmapImage UriSource="/Assets/arrow-down-bold.png"/>
|
|
</Image.Source>
|
|
</Image>
|
|
</Button>
|
|
<Button Grid.Column="0" Grid.Row="1" Height="30" Width="30" x:Name="btnRoboLeft" Click="btnRoboLeft_Click">
|
|
<Image>
|
|
<Image.Source>
|
|
<BitmapImage UriSource="/Assets/arrow-down-bold.png" Rotation="Rotate90"/>
|
|
</Image.Source>
|
|
</Image>
|
|
</Button>
|
|
<Button Grid.Column="2" Grid.Row="1" Height="30" Width="30" x:Name="btnRoboRight" Click="btnRoboRight_Click">
|
|
<Image>
|
|
<Image.Source>
|
|
<BitmapImage UriSource="/Assets/arrow-down-bold.png" Rotation="Rotate270"/>
|
|
</Image.Source>
|
|
</Image>
|
|
</Button>
|
|
<Button Grid.Row="2" Grid.ColumnSpan="3" x:Name="btnStopMove" Content="Stop" Margin="5" Click="btnStopMove_Click"/>
|
|
<Label Grid.Row="3" Grid.ColumnSpan="3" FontWeight="Bold" FontSize="12" Margin="5 0">Control with Arrow keys</Label>
|
|
<Label Grid.Row="4" Grid.ColumnSpan="3" FontWeight="Bold" FontSize="12" Margin="5 0">Stop with End key</Label>
|
|
</Grid>
|
|
</GroupBox>
|
|
</DockPanel>
|
|
</Grid>
|
|
</UserControl>
|
|
|