终端一体化运控平台
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.

пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. <Window
  2. x:Class="FryPot_DosingSystem.View.MainWindow"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:control="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:local="clr-namespace:FryPot_DosingSystem.View"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:vm="clr-namespace:FryPot_DosingSystem.ViewModel"
  10. Title="MainWindow"
  11. Width="1300"
  12. Height="800"
  13. AllowsTransparency="True"
  14. Background="{x:Null}"
  15. Topmost="False"
  16. WindowStartupLocation="CenterScreen"
  17. WindowStyle="None"
  18. mc:Ignorable="d">
  19. <Window.Resources>
  20. <ResourceDictionary>
  21. <ResourceDictionary.MergedDictionaries>
  22. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
  23. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
  24. <ResourceDictionary>
  25. <!--#region ListBox样式-->
  26. <Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
  27. <Setter Property="OverridesDefaultStyle" Value="True" />
  28. <Setter Property="SnapsToDevicePixels" Value="True" />
  29. <Setter Property="BorderBrush" Value="{x:Null}" />
  30. <Setter Property="Foreground" Value="White" />
  31. <Setter Property="FontSize" Value="20" />
  32. <Setter Property="HorizontalContentAlignment" Value="Center" />
  33. <Setter Property="VerticalContentAlignment" Value="Center" />
  34. <Setter Property="Template">
  35. <Setter.Value>
  36. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  37. <Border x:Name="border" CornerRadius="8">
  38. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
  39. </Border>
  40. </ControlTemplate>
  41. </Setter.Value>
  42. </Setter>
  43. </Style>
  44. <!--#endregion-->
  45. </ResourceDictionary>
  46. </ResourceDictionary.MergedDictionaries>
  47. </ResourceDictionary>
  48. </Window.Resources>
  49. <Window.DataContext>
  50. <vm:MainViewModel />
  51. </Window.DataContext>
  52. <Border x:Name="br" Style="{DynamicResource border主窗体背景}">
  53. <Grid x:Name="grid_main">
  54. <Grid.RowDefinitions>
  55. <RowDefinition Height="60" />
  56. <RowDefinition />
  57. </Grid.RowDefinitions>
  58. <!-- 标题 -->
  59. <Grid Grid.Row="0">
  60. <Grid.ColumnDefinitions>
  61. <ColumnDefinition Width="300" />
  62. <ColumnDefinition />
  63. </Grid.ColumnDefinitions>
  64. <Border
  65. Grid.ColumnSpan="2"
  66. Height="52"
  67. VerticalAlignment="Top"
  68. Style="{DynamicResource bordertop矩形}" />
  69. <Border Style="{DynamicResource bordertopL}" />
  70. <Image
  71. Margin="20,0,0,0"
  72. VerticalAlignment="Center"
  73. Style="{DynamicResource imagetop_Title}" />
  74. <Grid Grid.Column="1">
  75. <ListBox
  76. x:Name="lstEnt"
  77. Margin="0,0,293,0"
  78. Background="{x:Null}"
  79. BorderBrush="{x:Null}"
  80. BorderThickness="0"
  81. ItemContainerStyle="{StaticResource ResourceKey=ListBoxItemStyle1}"
  82. ItemsSource="{Binding DisplayMenus}"
  83. ScrollViewer.CanContentScroll="False"
  84. ScrollViewer.HorizontalScrollBarVisibility="Hidden"
  85. ScrollViewer.VerticalScrollBarVisibility="Disabled">
  86. <ListBox.ItemsPanel>
  87. <ItemsPanelTemplate>
  88. <StackPanel Orientation="Horizontal" />
  89. </ItemsPanelTemplate>
  90. </ListBox.ItemsPanel>
  91. <ListBox.ItemTemplate>
  92. <DataTemplate>
  93. <RadioButton
  94. Command="{Binding DataContext.TogglePag, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}"
  95. CommandParameter="{Binding CommandParameter}"
  96. Content="{Binding MenuName}"
  97. GroupName="all"
  98. Style="{StaticResource MenuRadioButtonStyle}" />
  99. </DataTemplate>
  100. </ListBox.ItemTemplate>
  101. </ListBox>
  102. </Grid>
  103. <StackPanel
  104. Grid.Column="4"
  105. Height="50"
  106. HorizontalAlignment="Right"
  107. VerticalAlignment="Top"
  108. Orientation="Horizontal">
  109. <Border Style="{DynamicResource border竖线}" />
  110. <Grid>
  111. <ToggleButton
  112. Name="tb"
  113. Margin="5"
  114. HorizontalAlignment="Center"
  115. VerticalAlignment="Center"
  116. Cursor="Hand"
  117. IsChecked="{Binding UserManagement}"
  118. Style="{DynamicResource StatusBtnStyle网络连接状态}"
  119. ToolTip="用户管理" />
  120. <!-- 当 StaysOpen 设置为 True 时 popup失去焦点的时候不会自动关闭 -->
  121. <Popup
  122. AllowsTransparency="True"
  123. Focusable="False"
  124. IsOpen="{Binding IsChecked, ElementName=tb}"
  125. Placement="Bottom"
  126. PlacementTarget="{Binding ElementName=tb}"
  127. StaysOpen="False">
  128. <Border Background="#081424" ClipToBounds="True">
  129. <Grid Width="100" Margin="0">
  130. <StackPanel Width="{Binding RelativeSource={RelativeSource AncestorLevel=1, AncestorType=Grid}, Path=ActualWidth}">
  131. <Button
  132. Width="{Binding RelativeSource={RelativeSource AncestorLevel=1, AncestorType=Grid}, Path=ActualWidth}"
  133. Margin="0,5,0,1"
  134. HorizontalAlignment="Center"
  135. VerticalAlignment="Center"
  136. Command="{Binding PasswordChange}"
  137. Content="密码修改"
  138. Cursor="Hand" />
  139. <Button
  140. Width="{Binding RelativeSource={RelativeSource AncestorLevel=1, AncestorType=Grid}, Path=ActualWidth}"
  141. Margin="0,5,0,1"
  142. HorizontalAlignment="Center"
  143. VerticalAlignment="Center"
  144. Command="{Binding Login}"
  145. Content="登录账号"
  146. Cursor="Hand" />
  147. <Button
  148. Width="{Binding RelativeSource={RelativeSource AncestorLevel=1, AncestorType=Grid}, Path=ActualWidth}"
  149. Margin="0,5,0,1"
  150. HorizontalAlignment="Center"
  151. VerticalAlignment="Center"
  152. Command="{Binding ExitLogin}"
  153. Content="退出登录"
  154. Cursor="Hand" />
  155. </StackPanel>
  156. </Grid>
  157. </Border>
  158. </Popup>
  159. </Grid>
  160. <Border Style="{DynamicResource border竖线}" />
  161. <ToggleButton
  162. HorizontalAlignment="Center"
  163. VerticalAlignment="Center"
  164. Cursor="Hand"
  165. DataContext="{Binding IsAlarm}"
  166. Style="{DynamicResource StatusBtnStyle告警}"
  167. ToolTip="告警消息" />
  168. <Border Style="{DynamicResource border竖线}" />
  169. <control:DateTimeUI Margin="10,0,10,0" VerticalAlignment="Center" />
  170. <Border Style="{DynamicResource border竖线}" />
  171. <Button
  172. x:Name="ButClose"
  173. Grid.Column="4"
  174. Margin="10,0,20,0"
  175. VerticalAlignment="Center"
  176. Content="退出"
  177. Cursor="Hand"
  178. Style="{DynamicResource CommonBtn_返回}"
  179. ToolTip="退出程序" />
  180. </StackPanel>
  181. </Grid>
  182. <!-- 底部窗体 -->
  183. <Grid Grid.Row="1" Margin="10">
  184. <Grid.RowDefinitions>
  185. <RowDefinition Height="45" />
  186. <RowDefinition />
  187. </Grid.RowDefinitions>
  188. <!-- 顶部装饰 -->
  189. <Border
  190. Grid.Row="0"
  191. Grid.RowSpan="2"
  192. Style="{DynamicResource border右下}" />
  193. <Border
  194. Grid.Row="0"
  195. Grid.RowSpan="2"
  196. Style="{DynamicResource border左下}" />
  197. <Border
  198. Grid.Row="0"
  199. Grid.RowSpan="2"
  200. Style="{DynamicResource border右上}" />
  201. <Border
  202. Grid.Row="0"
  203. Grid.RowSpan="2"
  204. Style="{DynamicResource border左上}" />
  205. <Grid Margin="10">
  206. <Border Width="600" Style="{DynamicResource borderFromTitle}" />
  207. <StackPanel Orientation="Horizontal">
  208. <CheckBox
  209. Margin="5,0,5,0"
  210. Content="开机启动"
  211. IsChecked="{Binding AutoStart}" />
  212. <CheckBox
  213. Margin="5,0,5,0"
  214. Content="设备初始化"
  215. IsChecked="{Binding Status}" />
  216. </StackPanel>
  217. <TextBlock
  218. x:Name="Title"
  219. HorizontalAlignment="Center"
  220. VerticalAlignment="Top"
  221. FontSize="16"
  222. Foreground="#feffff"
  223. Text="{Binding WindowTitleName}" />
  224. </Grid>
  225. <!--#region 底部窗体栏-->
  226. <ContentControl
  227. x:Name="contentRegion"
  228. Grid.Row="1"
  229. Content="{Binding MyWindow}" />
  230. <!--#endregion-->
  231. </Grid>
  232. </Grid>
  233. </Border>
  234. </Window>