MainWindow.xaml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <Window x:Class="vStationManagementTool.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:vStationManagementTool"
  7. mc:Ignorable="d"
  8. ResizeMode="NoResize"
  9. WindowStartupLocation="CenterScreen"
  10. Title="管理工具" Height="225" Width="400">
  11. <Grid >
  12. <Border Name="LoaderBorder" Visibility="Collapsed" Margin="0,0,0,0">
  13. <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="60">
  14. <StackPanel Orientation="Vertical">
  15. <Ellipse Width="25" Height="25" Stroke="{StaticResource DefaultButtonBackground}" StrokeThickness="4">
  16. <Ellipse.Triggers>
  17. <EventTrigger RoutedEvent="Loaded">
  18. <BeginStoryboard>
  19. <Storyboard RepeatBehavior="Forever">
  20. <DoubleAnimation Storyboard.TargetProperty="Opacity"
  21. From="1.0" To="0.1" Duration="0:0:1"/>
  22. </Storyboard>
  23. </BeginStoryboard>
  24. </EventTrigger>
  25. </Ellipse.Triggers>
  26. </Ellipse>
  27. <TextBlock x:Name="ToolStatus" Text="繁忙中..." Margin="8,2,0,0" Foreground="{StaticResource DefaultButtonBackground}"/>
  28. </StackPanel>
  29. </Grid>
  30. </Border>
  31. <Grid x:Name="ServerArea" Visibility="Collapsed">
  32. <Grid.RowDefinitions>
  33. <RowDefinition Height="*"/>
  34. <RowDefinition Height="*"/>
  35. <RowDefinition Height="*"/>
  36. </Grid.RowDefinitions>
  37. <StackPanel Grid.Row="0" Orientation="Horizontal">
  38. <TextBlock Margin="15,20,0,0" FontSize="14.5"
  39. VerticalAlignment="Top" Text="服务地址:" />
  40. <TextBlock Margin="15,20,0,0" FontSize="14.5"
  41. Foreground="Red"
  42. x:Name="ServerIPAddress"
  43. VerticalAlignment="Top" Text="--.--.--.--" />
  44. </StackPanel>
  45. <StackPanel Grid.Row="1" Orientation="Horizontal">
  46. <TextBlock Margin="15,20,0,0" FontSize="14.5"
  47. VerticalAlignment="Top" Text="服务状态:" />
  48. <TextBlock Margin="15,20,0,0" FontSize="14.5"
  49. Foreground="Red"
  50. x:Name="ServerStatus"
  51. VerticalAlignment="Top" Text="--" />
  52. </StackPanel>
  53. <StackPanel Grid.Row="2">
  54. <Border BorderThickness="1" BorderBrush="Gray" Width="360" Height="1" />
  55. </StackPanel>
  56. <StackPanel Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Bottom" Margin="0,0,0,10" >
  57. <Button x:Name="ServerControl"
  58. HorizontalAlignment="Left"
  59. VerticalAlignment="Top" Margin="15,18,0,0" Click="ServerControl_Click" Content="开启" />
  60. <Button x:Name="RestartServer"
  61. HorizontalAlignment="Left"
  62. VerticalAlignment="Top" Margin="15,18,0,0" Content="重启" Click="RestartServer_Click" />
  63. </StackPanel>
  64. </Grid>
  65. <Grid x:Name="ClientArea">
  66. <Grid.RowDefinitions>
  67. <RowDefinition Height="*"/>
  68. <RowDefinition Height="*"/>
  69. <RowDefinition Height="*"/>
  70. </Grid.RowDefinitions>
  71. <StackPanel Grid.Row="0" Orientation="Horizontal">
  72. <TextBlock Margin="15,20,0,0" FontSize="17"
  73. VerticalAlignment="Top" Text="IP地址:" />
  74. <TextBox x:Name="ipAddress"
  75. Padding="1"
  76. FontSize="16"
  77. PreviewTextInput="ipAddress_PreviewTextInput" InputMethod.IsInputMethodEnabled="False" Height="25" Width="180"/>
  78. </StackPanel>
  79. <StackPanel Grid.Row="1" Orientation="Horizontal">
  80. <TextBlock Margin="15,20,0,0" FontSize="17"
  81. VerticalAlignment="Top" Text="端口号:" />
  82. <TextBox x:Name="portNum" FontSize="16"
  83. Padding="1"
  84. PreviewTextInput="portNum_PreviewTextInput" InputMethod.IsInputMethodEnabled="False" Height="25" Width="80"/>
  85. </StackPanel>
  86. <StackPanel Grid.Row="2">
  87. <Border BorderThickness="1" BorderBrush="Gray" Width="360" Height="1" />
  88. </StackPanel>
  89. <StackPanel Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Bottom" Margin="0,0,0,10" >
  90. <Button x:Name="SaveAddress"
  91. HorizontalAlignment="Left" Click="SaveAddress_Click"
  92. VerticalAlignment="Top" Margin="15,18,0,0" Content="保存" Width="60" FontSize="14.5" Height="25"/>
  93. </StackPanel>
  94. </Grid>
  95. </Grid>
  96. </Window>