App.xaml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. <Application x:Class="SCADA_DAQ.App"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
  5. xmlns:wpf="clr-namespace:SCADA.CommonCtrl.WpfControl;assembly=SCADA.CommonCtrl"
  6. xmlns:wpffrm="clr-namespace:SCADA.CommonCtrl.WpfWindow;assembly=SCADA.CommonCtrl"
  7. xmlns:System="clr-namespace:System;assembly=mscorlib" xmlns:scadaui="clr-namespace:SCADA.CommonCtrl.SCADAUI;assembly=SCADA.CommonCtrl"
  8. Startup="Application_Startup"
  9. Exit="Application_Exit"
  10. SessionEnding="Application_SessionEnding">
  11. <Application.Resources>
  12. <ResourceDictionary>
  13. <ResourceDictionary.MergedDictionaries>
  14. <ResourceDictionary Source="pack://application:,,,/SCADA.CommonCtrl;component/Themes/Colors.xaml" />
  15. <ResourceDictionary Source="pack://application:,,,/SCADA.CommonCtrl;component/Themes/Fonts.xaml" />
  16. <ResourceDictionary Source="pack://application:,,,/SCADA_DAQ.Language;component/de-de.xaml" />
  17. <ResourceDictionary Source="pack://application:,,,/SCADA_DAQ.Language;component/en-us.xaml" />
  18. <ResourceDictionary Source="pack://application:,,,/SCADA_DAQ.Language;component/ja-jp.xaml" />
  19. <ResourceDictionary Source="pack://application:,,,/SCADA_DAQ.Language;component/ko-kr.xaml" />
  20. <ResourceDictionary Source="pack://application:,,,/SCADA_DAQ.Language;component/ru-ru.xaml" />
  21. <ResourceDictionary Source="pack://application:,,,/SCADA_DAQ.Language;component/th-th.xaml" />
  22. <ResourceDictionary Source="pack://application:,,,/SCADA_DAQ.Language;component/zh-tw.xaml" />
  23. <ResourceDictionary Source="pack://application:,,,/SCADA_DAQ.Language;component/zh-cn.xaml" />
  24. <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
  25. <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
  26. <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/Light.Blue.xaml" />
  27. </ResourceDictionary.MergedDictionaries>
  28. <SolidColorBrush x:Key="MenuIconBrush"
  29. Color="{DynamicResource MahApps.Color.Gray3}" />
  30. <FontFamily x:Key="DefaultFont">Microsoft YaHei UI</FontFamily>
  31. <System:Double x:Key="DefaultFontSize">14</System:Double>
  32. <FontWeight x:Key="DefaultFontWeight">Normal</FontWeight>
  33. <Style TargetType="DataGridCell"
  34. x:Key="ResultGridCellStyle">
  35. <Style.Triggers>
  36. <DataTrigger Binding="{Binding TestResult_Int}"
  37. Value="1">
  38. <Setter Property="Background"
  39. Value="{DynamicResource Background-Success1}" />
  40. <Setter Property="Foreground"
  41. Value="White" />
  42. </DataTrigger>
  43. <DataTrigger Binding="{Binding Path=TestResult_Int}"
  44. Value="2">
  45. <Setter Property="Background"
  46. Value="{DynamicResource Background-Danger1}" />
  47. <Setter Property="Foreground"
  48. Value="{DynamicResource Foreground-Danger}" />
  49. </DataTrigger>
  50. </Style.Triggers>
  51. </Style>
  52. <Style x:Key="BaseControl"
  53. TargetType="Control">
  54. <Setter Property="Foreground"
  55. Value="{DynamicResource Mahapps.Brushes.Text}" />
  56. <Setter Property="Background"
  57. Value="{DynamicResource MahApps.Brushes.ThemeBackground}" />
  58. </Style>
  59. <Style TargetType="Window"
  60. BasedOn="{StaticResource BaseControl}" />
  61. <Style TargetType="ScrollViewer"
  62. BasedOn="{StaticResource BaseControl}" />
  63. <Style TargetType="{x:Type TextBox}"
  64. BasedOn="{StaticResource BaseControl}" />
  65. <Style TargetType="Label"
  66. BasedOn="{StaticResource BaseControl}" />
  67. <Style TargetType="GroupBox"
  68. BasedOn="{StaticResource BaseControl}" />
  69. <Style TargetType="ToolBar"
  70. BasedOn="{StaticResource BaseControl}" />
  71. <Style TargetType="CheckBox"
  72. BasedOn="{StaticResource BaseControl}" />
  73. <Style TargetType="ListView"
  74. BasedOn="{StaticResource BaseControl}" />
  75. <!--<Style TargetType="ComboBox"
  76. BasedOn="{DynamicResource MetroComboBox}" />-->
  77. <Style TargetType="ContextMenu"
  78. BasedOn="{StaticResource BaseControl}" />
  79. <Style TargetType="Button"
  80. BasedOn="{StaticResource BaseControl}" />
  81. <Style TargetType="Viewbox"
  82. BasedOn="{x:Null}" />
  83. <Style TargetType="{x:Type wpf:TitleBackground}"
  84. BasedOn="{StaticResource BaseControl}" />
  85. <Style TargetType="{x:Type wpf:WelComePage}"
  86. BasedOn="{StaticResource BaseControl}" />
  87. <Style TargetType="{x:Type toolkit:DateTimeUpDown}"
  88. BasedOn="{StaticResource BaseControl}" />
  89. <Style TargetType="{x:Type toolkit:TimeSpanUpDown}"
  90. BasedOn="{StaticResource BaseControl}" />
  91. <Style TargetType="{x:Type toolkit:LongUpDown}"
  92. BasedOn="{StaticResource BaseControl}" />
  93. <Style TargetType="{x:Type toolkit:IntegerUpDown}"
  94. BasedOn="{StaticResource BaseControl}" />
  95. <Style TargetType="{x:Type toolkit:DecimalUpDown}"
  96. BasedOn="{StaticResource BaseControl}" />
  97. <Style TargetType="{x:Type toolkit:DoubleUpDown}"
  98. BasedOn="{StaticResource BaseControl}" />
  99. <Style TargetType="{x:Type toolkit:WatermarkComboBox}"
  100. BasedOn="{StaticResource BaseControl}" />
  101. <Style TargetType="{x:Type wpf:AutoFilteredComboBox}"
  102. BasedOn="{StaticResource BaseControl}" />
  103. <Style TargetType="{x:Type wpf:MyTreeView}"
  104. BasedOn="{StaticResource BaseControl}" />
  105. <Style TargetType="{x:Type toolkit:CheckComboBox}"
  106. BasedOn="{StaticResource BaseControl}" />
  107. <Style TargetType="{x:Type toolkit:WatermarkPasswordBox}"
  108. BasedOn="{StaticResource BaseControl}" />
  109. <Style TargetType="{x:Type toolkit:SingleUpDown}"
  110. BasedOn="{StaticResource BaseControl}" />
  111. <Style TargetType="{x:Type toolkit:DateTimePicker}"
  112. BasedOn="{StaticResource BaseControl}" />
  113. <Style TargetType="{x:Type toolkit:TimePicker}"
  114. BasedOn="{StaticResource BaseControl}" />
  115. <Style TargetType="{x:Type toolkit:ButtonSpinner}"
  116. BasedOn="{StaticResource BaseControl}" />
  117. <Style TargetType="{x:Type toolkit:MultiLineTextEditor}"
  118. BasedOn="{StaticResource BaseControl}" />
  119. <!--<Style TargetType="{x:Type wpf:SmartGrid}"
  120. BasedOn="{StaticResource BaseControl}">
  121. <Setter Property="ColumnHeaderStyle"
  122. Value="{StaticResource BaseControl}" />
  123. <Setter Property="RowStyle"
  124. Value="{StaticResource BaseControl}" />
  125. <Setter Property="RowHeaderStyle">
  126. <Setter.Value>
  127. <Style TargetType="DataGridRowHeader"
  128. BasedOn="{StaticResource BaseControl}">
  129. <Setter Property="MinWidth"
  130. Value="32" />
  131. </Style>
  132. </Setter.Value>
  133. </Setter>
  134. </Style>-->
  135. <Style TargetType="{x:Type wpf:BaseUctFrm}">
  136. <Setter Property="Foreground"
  137. Value="{DynamicResource MahApps.Brushes.ThemeForeground}" />
  138. <Setter Property="Background"
  139. Value="{DynamicResource MahApps.Brushes.ThemeBackground}" />
  140. </Style>
  141. <Style TargetType="{x:Type wpf:ChildWindow}"
  142. BasedOn="{StaticResource BaseControl}">
  143. </Style>
  144. <Style TargetType="{x:Type wpf:AutoView}"
  145. BasedOn="{StaticResource BaseControl}" />
  146. <Style TargetType="{x:Type wpffrm:FrmInputForm}"
  147. BasedOn="{StaticResource BaseControl}" />
  148. <Style TargetType="{x:Type wpf:MyTabControl}"
  149. BasedOn="{StaticResource BaseControl}" />
  150. <Style TargetType="{x:Type TabControl}"
  151. BasedOn="{StaticResource BaseControl}"/>
  152. <Style TargetType="{x:Type TabItem}"
  153. BasedOn="{StaticResource BaseControl}"/>
  154. <Style TargetType="{x:Type wpf:CloseTabItem}"
  155. BasedOn="{StaticResource BaseControl}" />
  156. <Style TargetType="{x:Type ToolTip}"
  157. BasedOn="{StaticResource BaseControl}" />
  158. <Style TargetType="{x:Type StatusBar}"
  159. BasedOn="{StaticResource BaseControl}" />
  160. <Style TargetType="{x:Type wpffrm:WrapWindow}"
  161. BasedOn="{StaticResource BaseControl}" />
  162. <Style TargetType="{x:Type MenuItem}"
  163. BasedOn="{StaticResource BaseControl}">
  164. <Setter Property="VerticalContentAlignment" Value="Center"/>
  165. </Style>
  166. <Style TargetType="{x:Type PasswordBox}"
  167. BasedOn="{StaticResource BaseControl}"/>
  168. <Style TargetType="{x:Type ComboBox}"
  169. BasedOn="{StaticResource BaseControl}"/>
  170. <Style TargetType="{x:Type wpf:Card}"
  171. BasedOn="{StaticResource BaseControl}"/>
  172. <Style TargetType="{x:Type scadaui:RegViewPanelGroup}"
  173. BasedOn="{StaticResource BaseControl}"/>
  174. <Style TargetType="{x:Type wpf:BaseUserControl}"
  175. BasedOn="{StaticResource BaseControl}"/>
  176. </ResourceDictionary>
  177. </Application.Resources>
  178. </Application>