终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

197 lines
7.0 KiB

  1. <Window
  2. x:Class="BPASmart.VariableManager.Views.NewDeviceView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:BPASmart.VariableManager.Views"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:vm="clr-namespace:BPASmart.VariableManager.ViewModels"
  9. Title="NewDeviceView"
  10. Width="400"
  11. Height="275"
  12. AllowsTransparency="True"
  13. Background="{x:Null}"
  14. Opacity="0.8"
  15. Topmost="false"
  16. WindowStartupLocation="CenterScreen"
  17. WindowStyle="None"
  18. mc:Ignorable="d">
  19. <Window.DataContext>
  20. <vm:NewDeviceViewModel />
  21. </Window.DataContext>
  22. <Window.Resources>
  23. <!--<ResourceDictionary Source="../Resource/Style/BasicStyle.xaml">
  24. <ResourceDictionary.MergedDictionaries>-->
  25. <ResourceDictionary>
  26. <Style x:Key="buttonStyle" TargetType="Button">
  27. <Setter Property="FontFamily" Value="楷体" />
  28. <Setter Property="Width" Value="100" />
  29. <Setter Property="FontSize" Value="18" />
  30. <Setter Property="Foreground" Value="Aqua" />
  31. <Setter Property="Template">
  32. <Setter.Value>
  33. <ControlTemplate TargetType="Button">
  34. <Grid x:Name="gr">
  35. <ContentControl
  36. HorizontalAlignment="Center"
  37. VerticalAlignment="Center"
  38. Content="{TemplateBinding Content}"
  39. Foreground="{TemplateBinding Foreground}" />
  40. <Polygon
  41. x:Name="poly"
  42. Points="0 0,80 0,100 30,20 30"
  43. Stroke="#FF34F7F7"
  44. StrokeThickness="2" />
  45. </Grid>
  46. <ControlTemplate.Triggers>
  47. <Trigger Property="IsMouseOver" Value="True">
  48. <Setter TargetName="poly" Property="Fill" Value="#2234F7F7" />
  49. </Trigger>
  50. </ControlTemplate.Triggers>
  51. </ControlTemplate>
  52. </Setter.Value>
  53. </Setter>
  54. </Style>
  55. </ResourceDictionary>
  56. <!--</ResourceDictionary.MergedDictionaries>
  57. </ResourceDictionary>-->
  58. </Window.Resources>
  59. <Grid Background="#103153">
  60. <Grid.RowDefinitions>
  61. <RowDefinition Height="35" />
  62. <RowDefinition />
  63. </Grid.RowDefinitions>
  64. <!--#region 标题栏设置-->
  65. <Border
  66. x:Name="MoveBorder"
  67. Height="35"
  68. VerticalAlignment="Top"
  69. Background="#0C2349"
  70. BorderBrush="#55ffffff"
  71. BorderThickness="0,0,0,1">
  72. <StackPanel Orientation="Horizontal">
  73. <!--<Image Margin="15,5,0,5" Source="../Resource/Images/HBL.png" />-->
  74. <TextBlock
  75. Name="tbTitle"
  76. Margin="10,0"
  77. HorizontalAlignment="Left"
  78. VerticalAlignment="Center"
  79. FontSize="18"
  80. Foreground="White"
  81. Text="设备管理" />
  82. </StackPanel>
  83. </Border>
  84. <UniformGrid
  85. Width="150"
  86. Height="30"
  87. HorizontalAlignment="Right"
  88. Columns="3">
  89. <Button
  90. Name="ButMin"
  91. Content="&#xe664;"
  92. Style="{StaticResource TitleBarStyle}"
  93. Visibility="Hidden" />
  94. <Button
  95. Name="ButMax"
  96. Content="&#xe65d;"
  97. Style="{StaticResource TitleBarStyle}"
  98. Visibility="Hidden" />
  99. <Button
  100. Name="ButClose"
  101. Content="&#xe639;"
  102. FontSize="30"
  103. Style="{StaticResource TitleBarStyle}" />
  104. </UniformGrid>
  105. <!--#endregion-->
  106. <!--#region 内容显示区-->
  107. <Grid Grid.Row="1" Margin="20">
  108. <Grid.RowDefinitions>
  109. <RowDefinition />
  110. <RowDefinition />
  111. <RowDefinition />
  112. <RowDefinition />
  113. </Grid.RowDefinitions>
  114. <Grid.ColumnDefinitions>
  115. <ColumnDefinition />
  116. <ColumnDefinition />
  117. </Grid.ColumnDefinitions>
  118. <TextBlock
  119. HorizontalAlignment="Right"
  120. VerticalAlignment="Center"
  121. FontFamily="楷体"
  122. FontSize="20"
  123. Foreground="#FF34F7F7"
  124. Text="请选择设备类型:" />
  125. <ComboBox
  126. Grid.Column="1"
  127. VerticalAlignment="Center"
  128. BorderBrush="#FF23CACA"
  129. BorderThickness="1"
  130. FontFamily="楷体"
  131. FontSize="20"
  132. Foreground="#ff23caca"
  133. IsEditable="False"
  134. ItemsSource="{Binding DeviceType}"
  135. SelectedIndex="0"
  136. Style="{StaticResource ComboBoxStyle}"
  137. Text="{Binding devcieManagerResult.DeviceType}" />
  138. <TextBlock
  139. Grid.Row="1"
  140. HorizontalAlignment="Right"
  141. VerticalAlignment="Center"
  142. FontFamily="楷体"
  143. FontSize="20"
  144. Foreground="#FF34F7F7"
  145. Text="请输入设备名称:" />
  146. <TextBox
  147. Grid.Row="1"
  148. Grid.Column="1"
  149. Margin="0,10"
  150. VerticalAlignment="Center"
  151. Background="Transparent"
  152. BorderBrush="#FF23CACA"
  153. CaretBrush="Aqua"
  154. FontFamily="楷体"
  155. FontSize="21"
  156. Foreground="#ff34f7f7"
  157. Text="{Binding devcieManagerResult.DeviceName}" />
  158. <TextBlock
  159. Grid.Row="2"
  160. Grid.ColumnSpan="2"
  161. Margin="20,0,0,0"
  162. VerticalAlignment="Center"
  163. FontFamily="楷体"
  164. FontSize="16"
  165. Foreground="#FFE2415C"
  166. Text="{Binding LogInfo}"
  167. TextWrapping="Wrap" />
  168. <Button
  169. Grid.Row="3"
  170. Margin="20,10"
  171. Command="{Binding CancelCommand}"
  172. Content="取消"
  173. Style="{StaticResource buttonStyle}" />
  174. <Button
  175. Grid.Row="3"
  176. Grid.Column="1"
  177. Margin="20,10"
  178. Command="{Binding ConfirmCommand}"
  179. Content="确认"
  180. Style="{StaticResource buttonStyle}" />
  181. </Grid>
  182. <!--#endregion-->
  183. </Grid>
  184. </Window>