App.xaml 11 KB

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