RecomendWindow.xaml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. <Window x:Class="NEIntelligentControl2.Windows.RecomendWindow"
  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:NEIntelligentControl2.Windows"
  7. xmlns:basic="clr-namespace:NEIntelligentControl2.Views.Basic"
  8. mc:Ignorable="d"
  9. Title="启停推荐" Height="850" Width="1806" Background="#FF434343" WindowStyle="None" WindowStartupLocation="CenterOwner" Closing="Window_Closing" Loaded="Window_Loaded">
  10. <WindowChrome.WindowChrome>
  11. <WindowChrome/>
  12. </WindowChrome.WindowChrome>
  13. <Window.Resources>
  14. <ItemsPanelTemplate x:Key="ItemsPanelTemplateMian">
  15. <VirtualizingStackPanel IsItemsHost="True" Orientation="Horizontal"/>
  16. </ItemsPanelTemplate>
  17. <Style x:Key="ConfirmButtonStyle" TargetType="{x:Type Button}">
  18. <Setter Property="Background" Value="#FF006ACC"/>
  19. <Setter Property="Foreground" Value="WhiteSmoke"/>
  20. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  21. <Setter Property="VerticalContentAlignment" Value="Center"/>
  22. <Setter Property="Padding" Value="17,6"/>
  23. <Setter Property="FontSize" Value="14"/>
  24. <Setter Property="BorderThickness" Value="0"/>
  25. <Setter Property="Margin" Value="20,0"/>
  26. <Setter Property="Template">
  27. <Setter.Value>
  28. <ControlTemplate TargetType="{x:Type Button}">
  29. <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true" CornerRadius="3">
  30. <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  31. </Border>
  32. <ControlTemplate.Triggers>
  33. <Trigger Property="IsMouseOver" Value="true">
  34. <Setter Property="Background" TargetName="border" Value="#FF2E81CC"/>
  35. </Trigger>
  36. <Trigger Property="IsPressed" Value="true">
  37. <Setter Property="Background" TargetName="border" Value="#FF006ACC"/>
  38. </Trigger>
  39. </ControlTemplate.Triggers>
  40. </ControlTemplate>
  41. </Setter.Value>
  42. </Setter>
  43. </Style>
  44. <Style TargetType="{x:Type ScrollBar}">
  45. <Setter Property="Background" Value="#77F0F8FF"/>
  46. <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
  47. <Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
  48. <!--滚动条宽度-->
  49. <Setter Property="Width" Value="8"/>
  50. <Setter Property="MinWidth" Value="6"/>
  51. <Setter Property="Template">
  52. <Setter.Value>
  53. <ControlTemplate TargetType="{x:Type ScrollBar}">
  54. <!--滚动条背景色-->
  55. <Grid x:Name="Bg" Background="#77DDDDDD" SnapsToDevicePixels="true" Width="8">
  56. <Grid.RowDefinitions>
  57. <RowDefinition />
  58. </Grid.RowDefinitions>
  59. <Track x:Name="PART_Track" IsDirectionReversed="true" IsEnabled="{TemplateBinding IsMouseOver}">
  60. <Track.DecreaseRepeatButton>
  61. <RepeatButton Command="{x:Static ScrollBar.PageUpCommand}" Style="{StaticResource VerticalScrollBarPageButton}"/>
  62. </Track.DecreaseRepeatButton>
  63. <Track.IncreaseRepeatButton>
  64. <RepeatButton Command="{x:Static ScrollBar.PageDownCommand}" Style="{StaticResource VerticalScrollBarPageButton}"/>
  65. </Track.IncreaseRepeatButton>
  66. <Track.Thumb>
  67. <Thumb Style="{StaticResource ScrollBarThumb}"/>
  68. </Track.Thumb>
  69. </Track>
  70. </Grid>
  71. <ControlTemplate.Triggers>
  72. <Trigger Property="IsEnabled" Value="false">
  73. <Setter Property="Background" TargetName="Bg" Value="{StaticResource ScrollBarDisabledBackground}"/>
  74. </Trigger>
  75. </ControlTemplate.Triggers>
  76. </ControlTemplate>
  77. </Setter.Value>
  78. </Setter>
  79. <Style.Triggers>
  80. <Trigger Property="Orientation" Value="Horizontal">
  81. <Setter Property="Width" Value="Auto"/>
  82. <Setter Property="MinWidth" Value="0"/>
  83. <Setter Property="Height" Value="6"/>
  84. <Setter Property="MinHeight" Value="6"/>
  85. <Setter Property="Background" Value="#77F0F8FF"/>
  86. <Setter Property="Template">
  87. <Setter.Value>
  88. <ControlTemplate TargetType="{x:Type ScrollBar}">
  89. <Grid x:Name="Bg" Background="#77F0F8FF" SnapsToDevicePixels="true">
  90. <Grid.ColumnDefinitions>
  91. <ColumnDefinition />
  92. </Grid.ColumnDefinitions>
  93. <Track x:Name="PART_Track" IsEnabled="{TemplateBinding IsMouseOver}">
  94. <Track.DecreaseRepeatButton>
  95. <RepeatButton Command="{x:Static ScrollBar.PageLeftCommand}" Style="{StaticResource HorizontalScrollBarPageButton}"/>
  96. </Track.DecreaseRepeatButton>
  97. <Track.IncreaseRepeatButton>
  98. <RepeatButton Command="{x:Static ScrollBar.PageRightCommand}" Style="{StaticResource HorizontalScrollBarPageButton}"/>
  99. </Track.IncreaseRepeatButton>
  100. <Track.Thumb>
  101. <Thumb Style="{StaticResource ScrollBarThumb}" />
  102. </Track.Thumb>
  103. </Track>
  104. </Grid>
  105. <ControlTemplate.Triggers>
  106. <Trigger Property="IsEnabled" Value="false">
  107. <Setter Property="Background" TargetName="Bg" Value="{StaticResource ScrollBarDisabledBackground}"/>
  108. </Trigger>
  109. </ControlTemplate.Triggers>
  110. </ControlTemplate>
  111. </Setter.Value>
  112. </Setter>
  113. </Trigger>
  114. </Style.Triggers>
  115. </Style>
  116. </Window.Resources>
  117. <Grid>
  118. <Grid.ColumnDefinitions>
  119. <ColumnDefinition Width="Auto"/>
  120. <ColumnDefinition/>
  121. </Grid.ColumnDefinitions>
  122. <Grid.RowDefinitions>
  123. <RowDefinition Height="Auto"/>
  124. <RowDefinition/>
  125. </Grid.RowDefinitions>
  126. <ListBox Grid.Row="1" x:Name="_LBOperation" SelectedIndex="0" SelectionChanged="_LBOperation_SelectionChanged" Background="{x:Null}" BorderBrush="{x:Null}" BorderThickness="0,0,0,0">
  127. <ListBoxItem Tag="all">
  128. <Grid Margin="10" Width="170">
  129. <Grid.ColumnDefinitions>
  130. <ColumnDefinition/>
  131. <ColumnDefinition Width="3*"/>
  132. <ColumnDefinition Width="1.5*"/>
  133. </Grid.ColumnDefinitions>
  134. <Image Width="24" Height="24" Source="pack://application:,,,/智动启停;component/Images/Remomend/calc_all.png"/>
  135. <TextBlock Text="全部" Grid.Column="1" Foreground="WhiteSmoke" FontSize="16" Margin="12,0"/>
  136. <TextBlock x:Name="_TBAll" Text="0" Grid.Column="2" Foreground="WhiteSmoke" FontSize="16" Margin="12,0"/>
  137. </Grid>
  138. </ListBoxItem>
  139. <ListBoxItem Tag="Start">
  140. <Grid Margin="10" Width="170">
  141. <Grid.ColumnDefinitions>
  142. <ColumnDefinition/>
  143. <ColumnDefinition Width="3*"/>
  144. <ColumnDefinition Width="1.5*"/>
  145. </Grid.ColumnDefinitions>
  146. <Image Width="24" Height="24" Source="pack://application:,,,/智动启停;component/Images/Remomend/calc_startr.png"/>
  147. <TextBlock Text="待启动" Grid.Column="1" Foreground="WhiteSmoke" FontSize="16" Margin="12,0"/>
  148. <TextBlock x:Name="_TBStart" Text="0" Grid.Column="2" Foreground="WhiteSmoke" FontSize="16" Margin="12,0"/>
  149. </Grid>
  150. </ListBoxItem>
  151. <ListBoxItem Tag="Stop">
  152. <Grid Margin="10" Width="170">
  153. <Grid.ColumnDefinitions>
  154. <ColumnDefinition/>
  155. <ColumnDefinition Width="3*"/>
  156. <ColumnDefinition Width="1.5*"/>
  157. </Grid.ColumnDefinitions>
  158. <Image Width="24" Height="24" Source="pack://application:,,,/智动启停;component/Images/Remomend/calc_stop.png"/>
  159. <TextBlock Text="待停机" Grid.Column="1" Foreground="WhiteSmoke" FontSize="16" Margin="12,0"/>
  160. <TextBlock x:Name="_TBStop" Text="0" Grid.Column="2" Foreground="WhiteSmoke" FontSize="16" Margin="12,0"/>
  161. </Grid>
  162. </ListBoxItem>
  163. <ListBoxItem Tag="Reset">
  164. <Grid Margin="10" Width="170">
  165. <Grid.ColumnDefinitions>
  166. <ColumnDefinition/>
  167. <ColumnDefinition Width="3*"/>
  168. <ColumnDefinition Width="1.5*"/>
  169. </Grid.ColumnDefinitions>
  170. <Image Width="24" Height="24" Source="pack://application:,,,/智动启停;component/Images/Remomend/calc_reset.png"/>
  171. <TextBlock Text="待复位" Grid.Column="1" Foreground="WhiteSmoke" FontSize="16" Margin="12,0"/>
  172. <TextBlock x:Name="_TBReset" Text="0" Grid.Column="2" Foreground="WhiteSmoke" FontSize="16" Margin="12,0"/>
  173. </Grid>
  174. </ListBoxItem>
  175. <ListBoxItem Tag="Maintain">
  176. <Grid Margin="10" Width="170">
  177. <Grid.ColumnDefinitions>
  178. <ColumnDefinition/>
  179. <ColumnDefinition Width="3*"/>
  180. <ColumnDefinition Width="1.5*"/>
  181. </Grid.ColumnDefinitions>
  182. <Image Width="24" Height="24" Source="pack://application:,,,/智动启停;component/Images/Remomend/calc_maintain.png"/>
  183. <TextBlock Text="待维护" Grid.Column="1" Foreground="WhiteSmoke" FontSize="16" Margin="12,0"/>
  184. <TextBlock x:Name="_TBMaintain" Text="0" Grid.Column="2" Foreground="WhiteSmoke" FontSize="16" Margin="12,0"/>
  185. </Grid>
  186. </ListBoxItem>
  187. <ListBoxItem Tag="UnMaintain">
  188. <Grid Margin="10" Width="170">
  189. <Grid.ColumnDefinitions>
  190. <ColumnDefinition/>
  191. <ColumnDefinition Width="3*"/>
  192. <ColumnDefinition Width="1.5*"/>
  193. </Grid.ColumnDefinitions>
  194. <Image Width="24" Height="24" Source="pack://application:,,,/智动启停;component/Images/Remomend/calc_unmaintian.png"/>
  195. <TextBlock Text="待取消维护" Grid.Column="1" Foreground="WhiteSmoke" FontSize="16" Margin="5,0"/>
  196. <TextBlock x:Name="_TBUnMaintain" Text="0" Grid.Column="2" Foreground="WhiteSmoke" FontSize="16" Margin="12,0"/>
  197. </Grid>
  198. </ListBoxItem>
  199. </ListBox>
  200. <ListBox x:Name="_LBMain" DisplayMemberPath="Name" SelectionChanged="_LBMain_SelectionChanged" Margin="5" Foreground="WhiteSmoke" FontSize="16" ItemsPanel="{StaticResource ItemsPanelTemplateMian}" Grid.Column="1" Background="{x:Null}" BorderBrush="{x:Null}" BorderThickness="0,0,0,0" Height="33" VerticalAlignment="Bottom" ScrollViewer.VerticalScrollBarVisibility="Hidden" ScrollViewer.HorizontalScrollBarVisibility="Hidden" WindowChrome.IsHitTestVisibleInChrome="True"/>
  201. <Grid Grid.Column="1" Grid.Row="1" Margin="0,0,10,10">
  202. <Grid.RowDefinitions>
  203. <RowDefinition/>
  204. <RowDefinition Height="Auto"/>
  205. </Grid.RowDefinitions>
  206. <Border CornerRadius="7" Background="WhiteSmoke" Margin="0,5">
  207. <ScrollViewer Margin="5">
  208. <basic:OptionalUniformGrid x:Name="_OPUGMain" Columns="9" MinHeight="70"/>
  209. </ScrollViewer>
  210. </Border>
  211. <StackPanel Grid.Row="1" Background="WhiteSmoke">
  212. <Button Content="发 送" HorizontalAlignment="Right" Margin="20,5" Padding="17,3" FontSize="14" Style="{DynamicResource ConfirmButtonStyle}" Click="Button_Click" Tag="send"/>
  213. </StackPanel>
  214. </Grid>
  215. <Button Grid.ColumnSpan="2" Height="25" Width="51.8" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="3,0" BorderBrush="{x:Null}" Foreground="{x:Null}" Padding="0,0,0,0" BorderThickness="0,0,0,0" Background="{x:Null}" Click="Button_Click_1" WindowChrome.IsHitTestVisibleInChrome="True">
  216. <Image Source="pack://application:,,,/智动启停;component/Images/PV/close.png"/>
  217. </Button>
  218. </Grid>
  219. </Window>