InverterInfoWindow.xaml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. <Window x:Class="NEIntelligentControl2.Windows.PV.InverterInfoWindow"
  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.PV"
  7. xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
  8. mc:Ignorable="d"
  9. d:DesignHeight="722" d:DesignWidth="1306" Title="光伏详情页" Width="1306" Height="722" Background="#FF454545" WindowStyle="None" WindowStartupLocation="CenterScreen" MouseLeftButtonDown="Window_MouseLeftButtonDown" Loaded="Window_Loaded">
  10. <WindowChrome.WindowChrome>
  11. <WindowChrome/>
  12. </WindowChrome.WindowChrome>
  13. <Window.Resources>
  14. <!--内容顶部标题-->
  15. <Style x:Key="ContentTopTitle" TargetType="TextBlock">
  16. <Setter Property="Foreground" Value="#FFD4D4D4"/>
  17. <Setter Property="HorizontalAlignment" Value="Center"/>
  18. <Setter Property="Margin" Value="3"/>
  19. <Setter Property="FontSize" Value="17"/>
  20. </Style>
  21. <!--FF232D38-->
  22. <!--内容背景-->
  23. <SolidColorBrush x:Key="ContentBackground" Color="#FF232D38"/>
  24. <!--内容标题背景-->
  25. <SolidColorBrush x:Key="ContentTitleBackground" Color="#FF253443"/>
  26. </Window.Resources>
  27. <Grid>
  28. <Grid.RowDefinitions>
  29. <RowDefinition Height="Auto"/>
  30. <RowDefinition/>
  31. </Grid.RowDefinitions>
  32. <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=PVName}" Foreground="WhiteSmoke" HorizontalAlignment="Center" Margin="0,5"/>
  33. <Button 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" WindowChrome.IsHitTestVisibleInChrome="True">
  34. <Image Source="pack://application:,,,/智动启停;component/Images/PV/close.png"/>
  35. </Button>
  36. <Border Background="#FF19222A" CornerRadius="7" Grid.Row="1" Margin="5">
  37. <Grid>
  38. <Grid.RowDefinitions>
  39. <RowDefinition Height="4*"/>
  40. <RowDefinition Height="7*"/>
  41. </Grid.RowDefinitions>
  42. <Grid.ColumnDefinitions>
  43. <ColumnDefinition Width="2*"/>
  44. <ColumnDefinition Width="7*"/>
  45. </Grid.ColumnDefinitions>
  46. <StackPanel Grid.RowSpan="2" Margin="10" x:Name="_SPPoints">
  47. <Border CornerRadius="7" Background="{StaticResource ContentBackground}">
  48. <Grid>
  49. <TextBlock Text="逆变器状态" Foreground="#FFD4D4D4" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" Margin="10"/>
  50. <Image Width="32" Height="32" HorizontalAlignment="Right" Margin="10">
  51. <Image.Style>
  52. <Style TargetType="Image">
  53. <Style.Triggers>
  54. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=Status}" Value="Standby">
  55. <Setter Property="Source" Value="pack://application:,,,/智动启停;component/Images/PV/pv_state_gre.png"/>
  56. </DataTrigger>
  57. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=Status}" Value="GridConnected">
  58. <Setter Property="Source" Value="pack://application:,,,/智动启停;component/Images/PV/pv_state_blue.png"/>
  59. </DataTrigger>
  60. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=Status}" Value="Malfunction">
  61. <Setter Property="Source" Value="pack://application:,,,/智动启停;component/Images/PV/pv_state_red.png"/>
  62. </DataTrigger>
  63. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=Status}" Value="Offline">
  64. <Setter Property="Source" Value="pack://application:,,,/智动启停;component/Images/PV/pv_state_grey.png"/>
  65. </DataTrigger>
  66. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=Status}" Value="Maintain">
  67. <Setter Property="Source" Value="pack://application:,,,/智动启停;component/Images/PV/pv_state_org.png"/>
  68. </DataTrigger>
  69. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=Status}" Value="Restriction">
  70. <Setter Property="Source" Value="pack://application:,,,/智动启停;component/Images/PV/pv_state_vio.png"/>
  71. </DataTrigger>
  72. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=Status}" Value="RestrictionShutdown">
  73. <Setter Property="Source" Value="pack://application:,,,/智动启停;component/Images/PV/pv_state_vio.png"/>
  74. </DataTrigger>
  75. </Style.Triggers>
  76. </Style>
  77. </Image.Style>
  78. </Image>
  79. </Grid>
  80. </Border>
  81. <UniformGrid x:Name="_UGSid" Columns="1" Margin="0,3,0,0">
  82. </UniformGrid>
  83. </StackPanel>
  84. <Border Grid.Column="1" CornerRadius="7" Background="{StaticResource ContentBackground}" Margin="0,10,10,10">
  85. <Grid>
  86. <Grid.RowDefinitions>
  87. <RowDefinition Height="Auto"/>
  88. <RowDefinition/>
  89. </Grid.RowDefinitions>
  90. <Border CornerRadius="7,7,0,0" Background="{StaticResource ContentTitleBackground}">
  91. <Grid>
  92. <Grid.ColumnDefinitions>
  93. <ColumnDefinition/>
  94. <ColumnDefinition/>
  95. <ColumnDefinition/>
  96. <ColumnDefinition/>
  97. </Grid.ColumnDefinitions>
  98. <TextBlock Text="光伏板" Style="{StaticResource ContentTopTitle}"/>
  99. <TextBlock Grid.Column="1">
  100. <TextBlock.Style>
  101. <Style TargetType="TextBlock">
  102. <Setter Property="Foreground" Value="#FFD4D4D4"/>
  103. <Setter Property="HorizontalAlignment" Value="Center"/>
  104. <Setter Property="Margin" Value="3"/>
  105. <Setter Property="FontSize" Value="17"/>
  106. <Style.Triggers>
  107. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=IsSUN2000}" Value="True">
  108. <Setter Property="Text" Value="箱变"/>
  109. </DataTrigger>
  110. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=IsSUN2000}" Value="False">
  111. <Setter Property="Text" Value="汇流箱"/>
  112. </DataTrigger>
  113. </Style.Triggers>
  114. </Style>
  115. </TextBlock.Style>
  116. </TextBlock>
  117. <TextBlock Grid.Column="2" Text="逆变器" Style="{StaticResource ContentTopTitle}"/>
  118. <TextBlock Grid.Column="3" Text="电网" Style="{StaticResource ContentTopTitle}"/>
  119. </Grid>
  120. </Border>
  121. <Grid Grid.Row="1">
  122. <Grid.ColumnDefinitions>
  123. <ColumnDefinition/>
  124. <ColumnDefinition Width="Auto"/>
  125. <ColumnDefinition/>
  126. <ColumnDefinition Width="Auto"/>
  127. <ColumnDefinition/>
  128. <ColumnDefinition Width="Auto"/>
  129. <ColumnDefinition/>
  130. </Grid.ColumnDefinitions>
  131. <Image Source="pack://application:,,,/智动启停;component/Images/PV/pv_pic.png" Stretch="None"/>
  132. <Image Grid.Column="1" Source="pack://application:,,,/智动启停;component/Images/PV/pv_arrow_pic.png" Stretch="None"/>
  133. <Border Grid.Column="2" CornerRadius="7" Margin="5">
  134. <Border.Style>
  135. <Style TargetType="Border">
  136. <Style.Triggers>
  137. <Trigger Property="IsMouseOver" Value="True">
  138. <Setter Property="Background" Value="#FF485461"/>
  139. </Trigger>
  140. </Style.Triggers>
  141. </Style>
  142. </Border.Style>
  143. <Image Stretch="None" MouseLeftButtonDown="Image_MouseLeftButtonDown">
  144. <Image.Style>
  145. <Style TargetType="Image">
  146. <Style.Triggers>
  147. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=IsSUN2000}" Value="True">
  148. <Setter Property="Source" Value="pack://application:,,,/智动启停;component/Images/PV/pv_box_transformer.png"/>
  149. </DataTrigger>
  150. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=IsSUN2000}" Value="False">
  151. <Setter Property="Source" Value="pack://application:,,,/智动启停;component/Images/PV/pv_box_pic.png"/>
  152. </DataTrigger>
  153. </Style.Triggers>
  154. </Style>
  155. </Image.Style>
  156. </Image>
  157. </Border>
  158. <Image Grid.Column="3" Source="pack://application:,,,/智动启停;component/Images/PV/pv_arrow_pic.png" Stretch="None"/>
  159. <Image Grid.Column="4" Source="pack://application:,,,/智动启停;component/Images/PV/pv_nb_pic.png" Stretch="None"/>
  160. <Image Grid.Column="5" Source="pack://application:,,,/智动启停;component/Images/PV/pv_arrow_pic.png" Stretch="None"/>
  161. <Image Grid.Column="6" Source="pack://application:,,,/智动启停;component/Images/PV/pv_elec_pic.png" Stretch="None"/>
  162. </Grid>
  163. </Grid>
  164. </Border>
  165. <Border Grid.Column="1" Grid.Row="1" CornerRadius="7" Background="{StaticResource ContentBackground}" Margin="0,0,10,10">
  166. <Grid>
  167. <Grid.RowDefinitions>
  168. <RowDefinition Height="Auto"/>
  169. <RowDefinition/>
  170. </Grid.RowDefinitions>
  171. <Border CornerRadius="7,7,0,0" Background="{StaticResource ContentTitleBackground}">
  172. <TextBlock Text="功率曲线" Style="{StaticResource ContentTopTitle}"/>
  173. </Border>
  174. <lvc:CartesianChart x:Name="_Chart" Grid.Row="1" LegendLocation="Bottom" Foreground="#FFD4D4D4">
  175. <lvc:CartesianChart.AxisX>
  176. <lvc:Axis x:Name="_ChartAxisX">
  177. <lvc:Axis.Separator>
  178. <lvc:Separator Stroke="{x:Null}"/>
  179. </lvc:Axis.Separator>
  180. </lvc:Axis>
  181. </lvc:CartesianChart.AxisX>
  182. <lvc:CartesianChart.AxisY>
  183. <lvc:Axis>
  184. <lvc:Axis.Separator>
  185. <lvc:Separator Stroke="#FF2B3744"/>
  186. </lvc:Axis.Separator>
  187. </lvc:Axis>
  188. </lvc:CartesianChart.AxisY>
  189. <lvc:CartesianChart.DataTooltip>
  190. <lvc:DefaultTooltip Background="#CC2B4056" CornerRadius="7"/>
  191. </lvc:CartesianChart.DataTooltip>
  192. <lvc:CartesianChart.Series>
  193. <lvc:LineSeries Title="温度" x:Name="_LineChartTemperature" PointForeground="{StaticResource ContentBackground}">
  194. <lvc:LineSeries.Fill>
  195. <SolidColorBrush Color="#00F3A289"/>
  196. </lvc:LineSeries.Fill>
  197. <lvc:LineSeries.Stroke>
  198. <LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
  199. <LinearGradientBrush.RelativeTransform>
  200. <TransformGroup>
  201. <ScaleTransform CenterY="0.5" CenterX="0.5"/>
  202. <SkewTransform CenterY="0.5" CenterX="0.5"/>
  203. <RotateTransform Angle="90" CenterY="0.5" CenterX="0.5"/>
  204. <TranslateTransform/>
  205. </TransformGroup>
  206. </LinearGradientBrush.RelativeTransform>
  207. <GradientStop Color="#FF20DBB5"/>
  208. <GradientStop Color="#FF34E3F3" Offset="1"/>
  209. </LinearGradientBrush>
  210. </lvc:LineSeries.Stroke>
  211. </lvc:LineSeries>
  212. <lvc:LineSeries Title="功率" x:Name="_LineChartPower" PointForeground="{StaticResource ContentBackground}">
  213. <lvc:LineSeries.Fill>
  214. <SolidColorBrush Color="#00F34336"/>
  215. </lvc:LineSeries.Fill>
  216. <lvc:LineSeries.Stroke>
  217. <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
  218. <LinearGradientBrush.RelativeTransform>
  219. <TransformGroup>
  220. <ScaleTransform CenterY="0.5" CenterX="0.5"/>
  221. <SkewTransform CenterY="0.5" CenterX="0.5"/>
  222. <RotateTransform Angle="90" CenterY="0.5" CenterX="0.5"/>
  223. <TranslateTransform/>
  224. </TransformGroup>
  225. </LinearGradientBrush.RelativeTransform>
  226. <GradientStop Color="#FF2772E3" Offset="0"/>
  227. <GradientStop Color="#FF4B94F8" Offset="1"/>
  228. </LinearGradientBrush>
  229. </lvc:LineSeries.Stroke>
  230. </lvc:LineSeries>
  231. <lvc:LineSeries Title="日照" x:Name="_LineChartSunshine" PointForeground="{StaticResource ContentBackground}">
  232. <lvc:LineSeries.Fill>
  233. <SolidColorBrush Color="#00FEC007"/>
  234. </lvc:LineSeries.Fill>
  235. <lvc:LineSeries.Stroke>
  236. <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
  237. <LinearGradientBrush.RelativeTransform>
  238. <TransformGroup>
  239. <ScaleTransform CenterY="0.5" CenterX="0.5"/>
  240. <SkewTransform CenterY="0.5" CenterX="0.5"/>
  241. <RotateTransform Angle="90" CenterY="0.5" CenterX="0.5"/>
  242. <TranslateTransform/>
  243. </TransformGroup>
  244. </LinearGradientBrush.RelativeTransform>
  245. <GradientStop Color="#FFE065B5" Offset="0"/>
  246. <GradientStop Color="#FFB96EDA" Offset="1"/>
  247. </LinearGradientBrush>
  248. </lvc:LineSeries.Stroke>
  249. </lvc:LineSeries>
  250. </lvc:CartesianChart.Series>
  251. </lvc:CartesianChart>
  252. </Grid>
  253. </Border>
  254. </Grid>
  255. </Border>
  256. </Grid>
  257. </Window>