MainWindow.xaml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <Window x:Class="EEMSUIClient.Views.MainWindow"
  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:EEMSUIClient.Views"
  7. xmlns:prism="http://prismlibrary.com/"
  8. prism:ViewModelLocator.AutoWireViewModel="True"
  9. mc:Ignorable="d"
  10. Title="MainWindow" Height="450" Width="800"
  11. WindowStartupLocation="CenterScreen" ResizeMode="NoResize" WindowStyle="SingleBorderWindow">
  12. <Grid Margin="5,5,5,5" >
  13. <Grid.RowDefinitions>
  14. <RowDefinition Height="1*"/>
  15. <RowDefinition Height="3*"/>
  16. </Grid.RowDefinitions>
  17. <Grid Grid.Row="0" Background="#FFCECECE">
  18. <Grid.RowDefinitions>
  19. <RowDefinition Height="1*"/>
  20. <RowDefinition Height="1*"/>
  21. </Grid.RowDefinitions>
  22. <Grid.ColumnDefinitions>
  23. <ColumnDefinition Width="1*"/>
  24. <ColumnDefinition Width="1*"/>
  25. <ColumnDefinition Width="1*"/>
  26. <ColumnDefinition Width="1*"/>
  27. </Grid.ColumnDefinitions>
  28. <StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" Margin="3,3,3,3" HorizontalAlignment="Center" VerticalAlignment="Center">
  29. <Label Content="IP:" Height="30"/>
  30. <TextBox Text="{Binding IpAddress}" Width="150" Height="30" IsEnabled="{Binding IsNotConnected}"/>
  31. </StackPanel>
  32. <StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal" Margin="3,3,3,3" HorizontalAlignment="Center" VerticalAlignment="Center">
  33. <Label Content="Port:" Height="30"/>
  34. <TextBox Text="{Binding Port}" Width="150" Height="30" IsEnabled="{Binding IsNotConnected}"/>
  35. </StackPanel>
  36. <StackPanel Grid.Row="0" Grid.Column="2" Orientation="Horizontal" Margin="3,3,3,3" HorizontalAlignment="Center" VerticalAlignment="Center">
  37. <Label Content="HubName:" Height="30"/>
  38. <TextBox Text="{Binding HubName}" Width="100" Height="30" IsEnabled="{Binding IsNotConnected}"/>
  39. </StackPanel>
  40. <StackPanel Grid.Row="0" Grid.Column="3" Orientation="Horizontal" Margin="3,3,3,3" HorizontalAlignment="Center" VerticalAlignment="Center">
  41. <Button Content="Connect" Command="{Binding ConnectCommand}" Height="30" Width="60" IsEnabled="{Binding IsNotConnected}"/>
  42. </StackPanel>
  43. <StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" Margin="3,3,3,3" HorizontalAlignment="Right" VerticalAlignment="Center">
  44. <Button Content="Recipe" Command="{Binding SelectRecipeCommand}" Height="30" Width="60"/>
  45. </StackPanel>
  46. <StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal" Margin="3,3,3,3" HorizontalAlignment="Left" VerticalAlignment="Center">
  47. <TextBox Text="{Binding SelectedRecipeDict}" IsReadOnly="True" Height="30" Width="160"/>
  48. </StackPanel>
  49. <StackPanel Grid.Row="1" Grid.Column="2" Orientation="Horizontal" Margin="3,3,3,3" HorizontalAlignment="Right" VerticalAlignment="Center">
  50. <Button Content="Config" Command="{Binding SelectConfigCommand}" Height="30" Width="60"/>
  51. </StackPanel>
  52. <StackPanel Grid.Row="1" Grid.Column="3" Orientation="Horizontal" Margin="3,3,3,3" HorizontalAlignment="Center" VerticalAlignment="Center">
  53. <TextBox Text="{Binding SelectedConfigDict}" IsReadOnly="True" Height="30" Width="160"/>
  54. </StackPanel>
  55. </Grid>
  56. <Grid Grid.Row="1" Margin="3,5,3,5" Background="#FFCECECE">
  57. <Grid.RowDefinitions>
  58. <RowDefinition Height="1*"/>
  59. <RowDefinition Height="1*"/>
  60. <RowDefinition Height="1*"/>
  61. <RowDefinition Height="1*"/>
  62. <RowDefinition Height="1*"/>
  63. <RowDefinition Height="1*"/>
  64. <RowDefinition Height="1*"/>
  65. </Grid.RowDefinitions>
  66. <Grid.ColumnDefinitions>
  67. <ColumnDefinition Width="0.8*"/>
  68. <ColumnDefinition Width="1*"/>
  69. <ColumnDefinition Width="1*"/>
  70. </Grid.ColumnDefinitions>
  71. <Label Grid.Row="0" Grid.Column="0" Content="Device Model:" HorizontalAlignment="Right" Height="30"/>
  72. <ComboBox Grid.Row="0" Grid.Column="1" ItemsSource="{Binding DeviceModels}" SelectedItem="{Binding DeviceModel}" SelectedIndex="{Binding DeviceModelIndex}" Height="30"/>
  73. <Label Grid.Row="1" Grid.Column="0" Content="Device SubModel:" HorizontalAlignment="Right" Height="30"/>
  74. <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding DeviceSubModel}" Height="30"/>
  75. <Label Grid.Row="2" Grid.Column="0" Content="Device Name:" HorizontalAlignment="Right" Height="30"/>
  76. <TextBox Grid.Row="2" Grid.Column="1" Text="{Binding DeviceName}" Height="30"/>
  77. <Label Grid.Row="3" Grid.Column="0" Content="Position:" HorizontalAlignment="Right" Height="30"/>
  78. <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Position}" Height="30"/>
  79. <Label Grid.Row="4" Grid.Column="0" Content="Software Version:" HorizontalAlignment="Right" Height="30"/>
  80. <TextBox Grid.Row="4" Grid.Column="1" Text="{Binding SoftwareVersion}" Height="30"/>
  81. <Label Grid.Row="5" Grid.Column="0" Content="DB Connection String:" HorizontalAlignment="Right" Height="30"/>
  82. <TextBox Grid.Row="5" Grid.Column="1" Text="{Binding DBConnectionString}" Height="30"/>
  83. <Label Grid.Row="6" Grid.Column="0" Content="Guid:" HorizontalAlignment="Right" Height="30"/>
  84. <TextBox Grid.Row="6" Grid.Column="1" Text="{Binding GuidStr}" Height="30" IsReadOnly="True"/>
  85. <Button Grid.Row="6" Grid.Column="2" Content="Register" Command="{Binding RegisterCommand}" Height="30" Width="100"/>
  86. <Button Grid.Row="0" Grid.Column="2" Content="Trigger" Command="{Binding TriggerCommand}" Height="30" Width="100"/>
  87. </Grid>
  88. </Grid>
  89. </Window>