MainWindow.xaml 1.9 KB

123456789101112131415161718192021222324252627
  1. <Window
  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:OHVProtocolClient"
  7. xmlns:System="clr-namespace:System;assembly=mscorlib" xmlns:OHVConnector="clr-namespace:OHVConnector;assembly=OHVConnector" x:Class="OHVProtocolClient.MainWindow"
  8. mc:Ignorable="d"
  9. Title="MainWindow" Height="450" Width="800" Loaded="Window_Loaded">
  10. <Window.Resources>
  11. <ObjectDataProvider x:Key="MessageKind" MethodName="GetValues" ObjectType="{x:Type System:Enum}">
  12. <ObjectDataProvider.MethodParameters>
  13. <x:Type TypeName="OHVConnector:eKind"/>
  14. </ObjectDataProvider.MethodParameters>
  15. </ObjectDataProvider>
  16. </Window.Resources>
  17. <Grid>
  18. <Label x:Name="lblState" Content="Connection State" Background="Gray" Height="25" Width="110" Margin="10,10,672,379"/>
  19. <Button x:Name="btnSend" Content="Alive" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="10,60,0,0" Click="btnSend_Click"/>
  20. <TextBox x:Name="txtTag" HorizontalAlignment="Left" Height="22" Margin="139,88,0,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="120"/>
  21. <Button Content="Send" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="395,88,0,0" Click="Button_Click" Height="22"/>
  22. <TextBox x:Name="txtSubCode" HorizontalAlignment="Left" Height="22" Margin="267,88,0,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="120"/>
  23. <ComboBox HorizontalAlignment="Left" Margin="10,88,0,0" VerticalAlignment="Top" Width="120" ItemsSource="{Binding Source={StaticResource MessageKind}}" x:Name="comboMessageKind"/>
  24. </Grid>
  25. </Window>