ActuBoardApp.xaml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <Window x:Class="ActuBoardConsole.ActuBoardApp"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:ActuBoardConsole"
  7. mc:Ignorable="d"
  8. Title="ActuBoard Console" Height="560" Width="720"
  9. Background="#FF111111">
  10. <Window.Resources>
  11. <Style TargetType="{x:Type Label}">
  12. <Setter Property="Control.Foreground" Value="Gray"/>
  13. </Style>
  14. </Window.Resources>
  15. <Grid>
  16. <Border Padding="10">
  17. <StackPanel>
  18. <Grid Margin="10">
  19. <Grid.RowDefinitions>
  20. <RowDefinition Height="Auto" />
  21. <RowDefinition Height="10" />
  22. <RowDefinition Height="Auto" />
  23. </Grid.RowDefinitions>
  24. <Grid.ColumnDefinitions>
  25. <ColumnDefinition Width="90" />
  26. <ColumnDefinition Width="150" />
  27. <ColumnDefinition Width="100" />
  28. <ColumnDefinition Width="*" />
  29. <ColumnDefinition Width="50" />
  30. </Grid.ColumnDefinitions>
  31. <Label Grid.Row="0" Grid.Column="0" x:Name="lbl_com" Content="COM" HorizontalAlignment="Right" />
  32. <ComboBox Grid.Row="0" Grid.Column="1" x:Name="drop_com" HorizontalAlignment="Left" Width="130"/>
  33. <Button x:Name="btn_connect" Grid.Row="0" Grid.Column="2" Content="Connect" HorizontalAlignment="Left" Width="75"/>
  34. <Button x:Name="btn_output" Grid.Row="0" Grid.Column="3" Content="Toggle Output" HorizontalAlignment="Left" Width="90"/>
  35. <Button x:Name="btn_debug" HorizontalAlignment="Left" Width="100" Margin="110,0,0,0" Grid.Column="3" Grid.Row="0" Content="Toggle Debug" />
  36. <Ellipse x:Name="el_status" Grid.Row="0" Grid.Column="4" Fill="Gray" Height="20" Width="20"/>
  37. <Label Grid.Row="2" Grid.Column="0" x:Name="lbl_command" Content="Command" HorizontalAlignment="Right"/>
  38. <TextBox x:Name="txt_command" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" Text="" Width="130" KeyDown="txt_command_KeyDown"/>
  39. <Button x:Name="btn_send" Grid.Row="2" Grid.Column="2" HorizontalAlignment="Left" Content="Send" Width="75" />
  40. <Label Grid.Row="2" Grid.Column="3" x:Name="lbl_hexinfo" Content="(only hex values!)" HorizontalAlignment="Left" FontStyle="Italic" FontSize="10" />
  41. <Ellipse x:Name="el_error" Grid.Row="2" Grid.Column="4" Fill="Black" Height="15" Width="15"/>
  42. </Grid>
  43. <Grid Margin="10">
  44. <Grid.RowDefinitions>
  45. <RowDefinition Height="25" />
  46. <RowDefinition Height="10" />
  47. <RowDefinition Height="25" />
  48. </Grid.RowDefinitions>
  49. <Grid.ColumnDefinitions>
  50. <ColumnDefinition Width="90" />
  51. <ColumnDefinition Width="120" />
  52. <ColumnDefinition Width="120" />
  53. <ColumnDefinition Width="120" />
  54. <ColumnDefinition Width="*" />
  55. </Grid.ColumnDefinitions>
  56. <!-- Predefined commands -->
  57. <Button x:Name="btn_list" HorizontalAlignment="Left" Width="100" Grid.Column="4" Grid.Row="0" Content="List Devices" />
  58. <Label Grid.Row="0" Grid.Column="0" x:Name="lbl_read" Content="Channel (Int)" HorizontalAlignment="Right"/>
  59. <TextBox x:Name="txt_channel" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" Text="" Width="40" KeyDown="txt_command_KeyDown"/>
  60. <Button x:Name="btn_read" HorizontalAlignment="Right" Margin="0,0,20,0" Width="50" Grid.Column="1" Grid.Row="0" Content="Read" />
  61. <Label Grid.Row="0" Grid.Column="2" x:Name="lbl_value" Content="Value (Int: 0-255)" HorizontalAlignment="Right"/>
  62. <TextBox x:Name="txt_value" Grid.Row="0" Grid.Column="3" HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" Text="" Width="40" />
  63. <Button x:Name="btn_send_value" HorizontalAlignment="Right" Margin="0,0,20,0" Width="50" Grid.Column="3" Grid.Row="0" Content="Send" />
  64. <Button x:Name="btn_test" HorizontalAlignment="Left" Width="100" Grid.Column="1" Grid.Row="3" Content="Test wrong cmd" />
  65. <Button x:Name="btn_group_m" HorizontalAlignment="Left" Width="100" Grid.Column="2" Grid.Row="3" Content="Test Group (m)" />
  66. <Button x:Name="btn_group_n" HorizontalAlignment="Left" Width="100" Grid.Column="3" Grid.Row="3" Content="Test Group (n)" />
  67. </Grid>
  68. <Label x:Name="lbl_console" Content="Console Output" HorizontalAlignment="Left" Margin="20,0,20,0"/>
  69. <TextBox x:Name="txt_console" Height="310" Padding="5" Margin="20,0,20,20" AcceptsReturn="True" TextWrapping="Wrap" Text="" Background="Black" Foreground="LimeGreen" FontFamily="Courier New" FontSize="12" />
  70. </StackPanel>
  71. </Border>
  72. </Grid>
  73. </Window>