MainWindow.xaml 5.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <Window x:Class="vCloud.TestClientUi.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. mc:Ignorable="d"
  7. Title="TestClient" Height="600" Width="800">
  8. <Grid>
  9. <Grid.RowDefinitions>
  10. <RowDefinition Height="40"/>
  11. <RowDefinition Height="40"/>
  12. <RowDefinition Height="40"/>
  13. <RowDefinition Height="Auto"/>
  14. <RowDefinition Height="Auto"/>
  15. <RowDefinition Height="*"/>
  16. </Grid.RowDefinitions>
  17. <StackPanel Grid.Row="0" Orientation="Horizontal" Margin="20,0,0,0">
  18. <Label Content="Server:" VerticalAlignment="Center"/>
  19. <TextBox Text="{Binding ServerHost,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Margin="20,0,0,0" VerticalAlignment="Center" Width="150"/>
  20. <Label Content="Port:" Margin="20,0,0,0" VerticalAlignment="Center"/>
  21. <TextBox Text="{Binding ServerPort,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Margin="20,0,0,0" VerticalAlignment="Center" Width="50"/>
  22. <Button Content="Connect Server" Margin="20,0,0,0" Width="120" Height="30" Command="{Binding ConnectServerCommand}"/>
  23. </StackPanel>
  24. <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="20,0,0,0">
  25. <Label Content="StorageServer:" VerticalAlignment="Center"/>
  26. <TextBox Text="{Binding StorageHost,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Margin="20,0,0,0" VerticalAlignment="Center" Width="150"/>
  27. <Label Content="Port:" Margin="20,0,0,0" VerticalAlignment="Center"/>
  28. <TextBox Text="{Binding StoragePort,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Margin="20,0,0,0" VerticalAlignment="Center" Width="50"/>
  29. </StackPanel>
  30. <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="20,0,0,0">
  31. <Button Content="Terminal Test" Margin="20,0,0,0" Width="100" Command="{Binding TestTerminalCommand}"/>
  32. </StackPanel>
  33. <GroupBox Grid.Row="3" Header="Test Upload Remedical" >
  34. <StackPanel Orientation="Vertical">
  35. <StackPanel Orientation="Horizontal">
  36. <Button Content="Upload Remedical" Margin="20,0,0,0" Width="120" Command="{Binding UploadTerminalDataCommand}"/>
  37. <Label Content="PatientName:" Margin="10,0,10,0"/>
  38. <TextBox Text="{Binding UploadPatientName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="100" VerticalAlignment="Center"></TextBox>
  39. <Label Content="UploadCount:" Margin="10,0,10,0"/>
  40. <TextBox Text="{Binding UploadRemedicalCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="100" VerticalAlignment="Center"></TextBox>
  41. </StackPanel>
  42. <StackPanel Orientation="Horizontal">
  43. <Label Content="AccountName:" Margin="20,0,0,0" VerticalAlignment="Center"/>
  44. <TextBox Text="{Binding TerminalAccountName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Margin="10,0,0,0" VerticalAlignment="Center" Width="100"/>
  45. <Label Content="Password:" Margin="20,0,0,0" VerticalAlignment="Center"/>
  46. <TextBox Text="{Binding TerminalPassword,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Margin="10,0,0,0" VerticalAlignment="Center" Width="100"/>
  47. </StackPanel>
  48. </StackPanel>
  49. </GroupBox>
  50. <GroupBox Grid.Row="4" Header="About Script" Margin="20,5,0,0">
  51. <Grid>
  52. <Grid.RowDefinitions>
  53. <RowDefinition Height="Auto"/>
  54. <RowDefinition Height="Auto"/>
  55. <RowDefinition Height="Auto"/>
  56. </Grid.RowDefinitions>
  57. <StackPanel Grid.Row="0" Orientation="Horizontal">
  58. <Label Content="AccountName:" Margin="20,0,0,0" VerticalAlignment="Center"/>
  59. <TextBox Text="{Binding AccountName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Margin="20,0,0,0" VerticalAlignment="Center" Width="100"/>
  60. <Label Content="Password:" Margin="20,0,0,0" VerticalAlignment="Center"/>
  61. <TextBox Text="{Binding Password,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Margin="20,0,0,0" VerticalAlignment="Center" Width="100"/>
  62. <Button Content="Login" Width="80" Command="{Binding LoginCommand}" Margin="20,0,0,0"/>
  63. </StackPanel>
  64. <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,5,0,0">
  65. <Label Content="TeminalName:" Margin="20,0,0,0" VerticalAlignment="Center"/>
  66. <TextBox Text="{Binding TerminalName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Margin="20,0,0,0" VerticalAlignment="Center" Width="100"/>
  67. <Button Content="Connect" Width="80" Command="{Binding ConnectCommand}" Margin="20,0,0,0"/>
  68. </StackPanel>
  69. <StackPanel Orientation="Horizontal" Grid.Row="2" Margin="0,5,0,0">
  70. <Button Content="Get Script" Width="80" Command="{Binding GetScriptCommand}" Margin="20,0,0,0"/>
  71. <ComboBox ItemsSource="{Binding ScriptInfos}" DisplayMemberPath="ScriptName" Margin="10,5,0,5"
  72. SelectedItem="{Binding SelectScriptInfo}" SelectedValuePath="ScriptName" Width="150"/>
  73. <Button Content="Run Script" Margin="20,0,0,0" Width="80" Command="{Binding RunScriptCommand}"/>
  74. <Button Content="Cancel" Margin="20,0,0,0" Width="80" Command="{Binding CancelCommand}"/>
  75. </StackPanel>
  76. </Grid>
  77. </GroupBox>
  78. <ListBox Grid.Row="5" Margin="20,10,20,10" ItemsSource="{Binding LogMessages}"/>
  79. </Grid>
  80. </Window>