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.8 KiB
99 lines
5.8 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="300"/>
|
|
<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">
|
|
<TextBox x:Name="tbSplitflapText" Height="100" Width="300" FontSize="40" IsReadOnly="True" TextWrapping="NoWrap" HorizontalAlignment="Left"/>
|
|
</GroupBox>
|
|
</StackPanel>
|
|
|
|
<!-- LEFT SIDE -->
|
|
<StackPanel Orientation="Horizontal">
|
|
<GroupBox Header="Robot Mobile">
|
|
<StackPanel Orientation="Horizontal">
|
|
<StackPanel Orientation="Vertical">
|
|
<GroupBox Header="State">
|
|
<StackPanel Orientation="Vertical">
|
|
<Label Content="Battery:"/>
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBox x:Name="tbRoboVoltage" Margin="10 0 0 0" Width="100px" Height="30" FontSize="20" IsReadOnly="True" TextWrapping="NoWrap" HorizontalAlignment="Left">NaN</TextBox>
|
|
<Label Content="V" FontSize="20"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</GroupBox>
|
|
<GroupBox Grid.Column="0" Header="Control" Width="200">
|
|
<StackPanel Orientation="Vertical" Margin="5">
|
|
<Button x:Name="btnModeAuto" Height="30" Margin="5 5" Click="btnModeAuto_Click">Set Automatic Mode</Button>
|
|
<Button x:Name="btnModeManual" Height="30" Margin="5 5" Click="btnModeManual_Click">Set Manual Mode</Button>
|
|
</StackPanel>
|
|
</GroupBox>
|
|
</StackPanel>
|
|
<GroupBox Grid.Column="0" Header="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="50" Width="50" 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="50" Width="50" 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="50" Width="50" 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="50" Width="50" 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>
|
|
</StackPanel>
|
|
</GroupBox>
|
|
</StackPanel>
|
|
</Grid>
|
|
</UserControl>
|
|
|