MainWindow.xaml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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="0.5*"/>
  15. <RowDefinition Height="3*"/>
  16. <RowDefinition Height="1*"/>
  17. </Grid.RowDefinitions>
  18. <StackPanel Grid.Row="0" Orientation="Horizontal" Margin="3,3,3,3" IsEnabled="{Binding IsNotConnected}" Background="#FFCECECE">
  19. <Label Content="IP:" Height="30" Margin="20,0,0,0"/>
  20. <TextBox Text="{Binding IpAddress}" Width="150" Height="30"/>
  21. <Label Content="Port:" Height="30" Margin="20,0,0,0"/>
  22. <TextBox Text="{Binding Port}" Width="150" Height="30"/>
  23. <Label Content="HubName:" Height="30" Margin="20,0,0,0"/>
  24. <TextBox Text="{Binding HubName}" Width="150" Height="30"/>
  25. <Button Content="Connect" Command="{Binding ConnectCommand}" Margin="40,0,0,0" Height="30" Width="60"/>
  26. </StackPanel>
  27. <Grid Grid.Row="1" Margin="3,5,3,5" Background="#FFCECECE">
  28. <Grid.RowDefinitions>
  29. <RowDefinition Height="1*"/>
  30. <RowDefinition Height="1*"/>
  31. <RowDefinition Height="1*"/>
  32. <RowDefinition Height="1*"/>
  33. <RowDefinition Height="1*"/>
  34. <RowDefinition Height="1*"/>
  35. <RowDefinition Height="1*"/>
  36. </Grid.RowDefinitions>
  37. <Grid.ColumnDefinitions>
  38. <ColumnDefinition Width="0.8*"/>
  39. <ColumnDefinition Width="1*"/>
  40. <ColumnDefinition Width="1*"/>
  41. </Grid.ColumnDefinitions>
  42. <Label Grid.Row="0" Grid.Column="0" Content="Device Model:" HorizontalAlignment="Right" Height="30"/>
  43. <ComboBox Grid.Row="0" Grid.Column="1" ItemsSource="{Binding DeviceModels}" SelectedItem="{Binding DeviceModel}" SelectedIndex="{Binding DeviceModelIndex}" Height="30"/>
  44. <Label Grid.Row="1" Grid.Column="0" Content="Device SubModel:" HorizontalAlignment="Right" Height="30"/>
  45. <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding DeviceSubModel}" Height="30"/>
  46. <Label Grid.Row="2" Grid.Column="0" Content="Device Name:" HorizontalAlignment="Right" Height="30"/>
  47. <TextBox Grid.Row="2" Grid.Column="1" Text="{Binding DeviceName}" Height="30"/>
  48. <Label Grid.Row="3" Grid.Column="0" Content="Position:" HorizontalAlignment="Right" Height="30"/>
  49. <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Position}" Height="30"/>
  50. <Label Grid.Row="4" Grid.Column="0" Content="Software Version:" HorizontalAlignment="Right" Height="30"/>
  51. <TextBox Grid.Row="4" Grid.Column="1" Text="{Binding SoftwareVersion}" Height="30"/>
  52. <Label Grid.Row="5" Grid.Column="0" Content="DB Connection String:" HorizontalAlignment="Right" Height="30"/>
  53. <TextBox Grid.Row="5" Grid.Column="1" Text="{Binding DBConnectionString}" Height="30"/>
  54. <Label Grid.Row="6" Grid.Column="0" Content="Guid:" HorizontalAlignment="Right" Height="30"/>
  55. <TextBox Grid.Row="6" Grid.Column="1" Text="{Binding GuidStr}" Height="30"/>
  56. <Button Grid.Row="6" Grid.Column="2" Content="Register" Command="{Binding RegisterCommand}" Height="30" Width="100"/>
  57. </Grid>
  58. <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="3,3,3,3" Background="#FFCECECE">
  59. </StackPanel>
  60. </Grid>
  61. </Window>