123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269 |
- <Window x:Class="NEIntelligentControl2.Windows.PV.InverterInfoWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:local="clr-namespace:NEIntelligentControl2.Windows.PV"
- xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
- mc:Ignorable="d"
- d:DesignHeight="722" d:DesignWidth="1306" Title="光伏详情页" Width="1306" Height="722" Background="#FF454545" WindowStyle="None" WindowStartupLocation="CenterScreen" MouseLeftButtonDown="Window_MouseLeftButtonDown" Loaded="Window_Loaded">
- <WindowChrome.WindowChrome>
- <WindowChrome/>
- </WindowChrome.WindowChrome>
- <Window.Resources>
- <!--内容顶部标题-->
- <Style x:Key="ContentTopTitle" TargetType="TextBlock">
- <Setter Property="Foreground" Value="#FFD4D4D4"/>
- <Setter Property="HorizontalAlignment" Value="Center"/>
- <Setter Property="Margin" Value="3"/>
- <Setter Property="FontSize" Value="17"/>
- </Style>
- <!--FF232D38-->
- <!--内容背景-->
- <SolidColorBrush x:Key="ContentBackground" Color="#FF232D38"/>
- <!--内容标题背景-->
- <SolidColorBrush x:Key="ContentTitleBackground" Color="#FF253443"/>
- </Window.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=PVName}" Foreground="WhiteSmoke" HorizontalAlignment="Center" Margin="0,5"/>
- <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">
- <Image Source="pack://application:,,,/智动启停;component/Images/PV/close.png"/>
- </Button>
- <Border Background="#FF19222A" CornerRadius="7" Grid.Row="1" Margin="5">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="4*"/>
- <RowDefinition Height="7*"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="2*"/>
- <ColumnDefinition Width="7*"/>
- </Grid.ColumnDefinitions>
- <StackPanel Grid.RowSpan="2" Margin="10" x:Name="_SPPoints">
- <Border CornerRadius="7" Background="{StaticResource ContentBackground}">
- <Grid>
- <TextBlock Text="逆变器状态" Foreground="#FFD4D4D4" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" Margin="10"/>
- <Image Width="32" Height="32" HorizontalAlignment="Right" Margin="10">
- <Image.Style>
- <Style TargetType="Image">
- <Style.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=Status}" Value="Standby">
- <Setter Property="Source" Value="pack://application:,,,/智动启停;component/Images/PV/pv_state_gre.png"/>
- </DataTrigger>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=Status}" Value="GridConnected">
- <Setter Property="Source" Value="pack://application:,,,/智动启停;component/Images/PV/pv_state_blue.png"/>
- </DataTrigger>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=Status}" Value="Malfunction">
- <Setter Property="Source" Value="pack://application:,,,/智动启停;component/Images/PV/pv_state_red.png"/>
- </DataTrigger>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=Status}" Value="Offline">
- <Setter Property="Source" Value="pack://application:,,,/智动启停;component/Images/PV/pv_state_grey.png"/>
- </DataTrigger>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=Status}" Value="Maintain">
- <Setter Property="Source" Value="pack://application:,,,/智动启停;component/Images/PV/pv_state_org.png"/>
- </DataTrigger>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=Status}" Value="Restriction">
- <Setter Property="Source" Value="pack://application:,,,/智动启停;component/Images/PV/pv_state_vio.png"/>
- </DataTrigger>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=Status}" Value="RestrictionShutdown">
- <Setter Property="Source" Value="pack://application:,,,/智动启停;component/Images/PV/pv_state_vio.png"/>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Image.Style>
- </Image>
- </Grid>
- </Border>
- <UniformGrid x:Name="_UGSid" Columns="1" Margin="0,3,0,0">
- </UniformGrid>
- </StackPanel>
- <Border Grid.Column="1" CornerRadius="7" Background="{StaticResource ContentBackground}" Margin="0,10,10,10">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Border CornerRadius="7,7,0,0" Background="{StaticResource ContentTitleBackground}">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition/>
- <ColumnDefinition/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <TextBlock Text="光伏板" Style="{StaticResource ContentTopTitle}"/>
- <TextBlock Grid.Column="1">
- <TextBlock.Style>
- <Style TargetType="TextBlock">
- <Setter Property="Foreground" Value="#FFD4D4D4"/>
- <Setter Property="HorizontalAlignment" Value="Center"/>
- <Setter Property="Margin" Value="3"/>
- <Setter Property="FontSize" Value="17"/>
- <Style.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=IsSUN2000}" Value="True">
- <Setter Property="Text" Value="箱变"/>
- </DataTrigger>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=IsSUN2000}" Value="False">
- <Setter Property="Text" Value="汇流箱"/>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </TextBlock.Style>
- </TextBlock>
- <TextBlock Grid.Column="2" Text="逆变器" Style="{StaticResource ContentTopTitle}"/>
- <TextBlock Grid.Column="3" Text="电网" Style="{StaticResource ContentTopTitle}"/>
- </Grid>
- </Border>
- <Grid Grid.Row="1">
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition/>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition/>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <Image Source="pack://application:,,,/智动启停;component/Images/PV/pv_pic.png" Stretch="None"/>
- <Image Grid.Column="1" Source="pack://application:,,,/智动启停;component/Images/PV/pv_arrow_pic.png" Stretch="None"/>
- <Border Grid.Column="2" CornerRadius="7" Margin="5">
- <Border.Style>
- <Style TargetType="Border">
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Background" Value="#FF485461"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- </Border.Style>
- <Image Stretch="None" MouseLeftButtonDown="Image_MouseLeftButtonDown">
- <Image.Style>
- <Style TargetType="Image">
- <Style.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=IsSUN2000}" Value="True">
- <Setter Property="Source" Value="pack://application:,,,/智动启停;component/Images/PV/pv_box_transformer.png"/>
- </DataTrigger>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}, Path=IsSUN2000}" Value="False">
- <Setter Property="Source" Value="pack://application:,,,/智动启停;component/Images/PV/pv_box_pic.png"/>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Image.Style>
- </Image>
- </Border>
- <Image Grid.Column="3" Source="pack://application:,,,/智动启停;component/Images/PV/pv_arrow_pic.png" Stretch="None"/>
- <Image Grid.Column="4" Source="pack://application:,,,/智动启停;component/Images/PV/pv_nb_pic.png" Stretch="None"/>
- <Image Grid.Column="5" Source="pack://application:,,,/智动启停;component/Images/PV/pv_arrow_pic.png" Stretch="None"/>
- <Image Grid.Column="6" Source="pack://application:,,,/智动启停;component/Images/PV/pv_elec_pic.png" Stretch="None"/>
- </Grid>
- </Grid>
- </Border>
- <Border Grid.Column="1" Grid.Row="1" CornerRadius="7" Background="{StaticResource ContentBackground}" Margin="0,0,10,10">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Border CornerRadius="7,7,0,0" Background="{StaticResource ContentTitleBackground}">
- <TextBlock Text="功率曲线" Style="{StaticResource ContentTopTitle}"/>
- </Border>
- <lvc:CartesianChart x:Name="_Chart" Grid.Row="1" LegendLocation="Bottom" Foreground="#FFD4D4D4">
- <lvc:CartesianChart.AxisX>
- <lvc:Axis x:Name="_ChartAxisX">
- <lvc:Axis.Separator>
- <lvc:Separator Stroke="{x:Null}"/>
- </lvc:Axis.Separator>
- </lvc:Axis>
- </lvc:CartesianChart.AxisX>
- <lvc:CartesianChart.AxisY>
- <lvc:Axis>
- <lvc:Axis.Separator>
- <lvc:Separator Stroke="#FF2B3744"/>
- </lvc:Axis.Separator>
- </lvc:Axis>
- </lvc:CartesianChart.AxisY>
- <lvc:CartesianChart.DataTooltip>
- <lvc:DefaultTooltip Background="#CC2B4056" CornerRadius="7"/>
- </lvc:CartesianChart.DataTooltip>
- <lvc:CartesianChart.Series>
- <lvc:LineSeries Title="温度" x:Name="_LineChartTemperature" PointForeground="{StaticResource ContentBackground}">
- <lvc:LineSeries.Fill>
- <SolidColorBrush Color="#00F3A289"/>
- </lvc:LineSeries.Fill>
- <lvc:LineSeries.Stroke>
- <LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
- <LinearGradientBrush.RelativeTransform>
- <TransformGroup>
- <ScaleTransform CenterY="0.5" CenterX="0.5"/>
- <SkewTransform CenterY="0.5" CenterX="0.5"/>
- <RotateTransform Angle="90" CenterY="0.5" CenterX="0.5"/>
- <TranslateTransform/>
- </TransformGroup>
- </LinearGradientBrush.RelativeTransform>
- <GradientStop Color="#FF20DBB5"/>
- <GradientStop Color="#FF34E3F3" Offset="1"/>
- </LinearGradientBrush>
- </lvc:LineSeries.Stroke>
- </lvc:LineSeries>
- <lvc:LineSeries Title="功率" x:Name="_LineChartPower" PointForeground="{StaticResource ContentBackground}">
- <lvc:LineSeries.Fill>
- <SolidColorBrush Color="#00F34336"/>
- </lvc:LineSeries.Fill>
- <lvc:LineSeries.Stroke>
- <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
- <LinearGradientBrush.RelativeTransform>
- <TransformGroup>
- <ScaleTransform CenterY="0.5" CenterX="0.5"/>
- <SkewTransform CenterY="0.5" CenterX="0.5"/>
- <RotateTransform Angle="90" CenterY="0.5" CenterX="0.5"/>
- <TranslateTransform/>
- </TransformGroup>
- </LinearGradientBrush.RelativeTransform>
- <GradientStop Color="#FF2772E3" Offset="0"/>
- <GradientStop Color="#FF4B94F8" Offset="1"/>
- </LinearGradientBrush>
- </lvc:LineSeries.Stroke>
- </lvc:LineSeries>
- <lvc:LineSeries Title="日照" x:Name="_LineChartSunshine" PointForeground="{StaticResource ContentBackground}">
- <lvc:LineSeries.Fill>
- <SolidColorBrush Color="#00FEC007"/>
- </lvc:LineSeries.Fill>
- <lvc:LineSeries.Stroke>
- <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
- <LinearGradientBrush.RelativeTransform>
- <TransformGroup>
- <ScaleTransform CenterY="0.5" CenterX="0.5"/>
- <SkewTransform CenterY="0.5" CenterX="0.5"/>
- <RotateTransform Angle="90" CenterY="0.5" CenterX="0.5"/>
- <TranslateTransform/>
- </TransformGroup>
- </LinearGradientBrush.RelativeTransform>
- <GradientStop Color="#FFE065B5" Offset="0"/>
- <GradientStop Color="#FFB96EDA" Offset="1"/>
- </LinearGradientBrush>
- </lvc:LineSeries.Stroke>
- </lvc:LineSeries>
- </lvc:CartesianChart.Series>
- </lvc:CartesianChart>
- </Grid>
- </Border>
- </Grid>
- </Border>
- </Grid>
- </Window>
|