364 lines
17 KiB
XML
364 lines
17 KiB
XML
<UserControl
|
||
x:Class="OrpaonEMS.App.Views.ControlConfigView"
|
||
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:i="http://schemas.microsoft.com/xaml/behaviors"
|
||
xmlns:keyboard="clr-namespace:KeyBoard.WPF.Behavior;assembly=KeyBoard.WPF"
|
||
xmlns:local="clr-namespace:OrpaonEMS.App.Views"
|
||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
xmlns:prism="http://prismlibrary.com/"
|
||
d:DesignHeight="708"
|
||
d:DesignWidth="1024"
|
||
prism:ViewModelLocator.AutoWireViewModel="True"
|
||
mc:Ignorable="d">
|
||
<Grid>
|
||
<!--<Grid.RowDefinitions>
|
||
<RowDefinition />
|
||
<RowDefinition />
|
||
</Grid.RowDefinitions>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition />
|
||
<ColumnDefinition />
|
||
<ColumnDefinition />
|
||
</Grid.ColumnDefinitions>-->
|
||
<Border
|
||
Grid.RowSpan="2"
|
||
Grid.ColumnSpan="2"
|
||
Margin="5,5,5,5"
|
||
Background="White"
|
||
CornerRadius="10">
|
||
<Border.Effect>
|
||
<DropShadowEffect
|
||
BlurRadius="20"
|
||
Direction="280"
|
||
Opacity="0.4"
|
||
ShadowDepth="0"
|
||
Color="DarkGray" />
|
||
</Border.Effect>
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition />
|
||
<RowDefinition />
|
||
<RowDefinition />
|
||
<RowDefinition />
|
||
<RowDefinition />
|
||
<RowDefinition />
|
||
<RowDefinition />
|
||
<RowDefinition />
|
||
<RowDefinition />
|
||
<RowDefinition />
|
||
<RowDefinition />
|
||
<RowDefinition />
|
||
<RowDefinition />
|
||
<RowDefinition />
|
||
<RowDefinition />
|
||
<RowDefinition />
|
||
<RowDefinition />
|
||
<RowDefinition />
|
||
<RowDefinition />
|
||
|
||
</Grid.RowDefinitions>
|
||
<Grid.Resources>
|
||
<Style x:Key="TextIco" TargetType="TextBlock">
|
||
<Setter Property="Margin" Value="0,2,5,2" />
|
||
<Setter Property="FontSize" Value="20" />
|
||
<Setter Property="VerticalAlignment" Value="Bottom" />
|
||
<Setter Property="FontFamily" Value="../Assets/Fonts/#iconfont" />
|
||
<Setter Property="Foreground" Value="Black" />
|
||
</Style>
|
||
<Style x:Key="TextTitle" TargetType="TextBlock">
|
||
<Setter Property="Margin" Value="5,0,10,0" />
|
||
<Setter Property="FontSize" Value="20" />
|
||
<Setter Property="VerticalAlignment" Value="Center" />
|
||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||
<Setter Property="Foreground" Value="Black" />
|
||
</Style>
|
||
<Style x:Key="TextValue" TargetType="TextBlock">
|
||
<Setter Property="Margin" Value="10,0,5,0" />
|
||
<Setter Property="FontSize" Value="20" />
|
||
<Setter Property="VerticalAlignment" Value="Center" />
|
||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||
<Setter Property="Foreground" Value="Black" />
|
||
</Style>
|
||
<Style x:Key="StackPanelText" TargetType="StackPanel">
|
||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||
<Setter Property="VerticalAlignment" Value="Center" />
|
||
<Setter Property="Orientation" Value="Horizontal" />
|
||
</Style>
|
||
</Grid.Resources>
|
||
<StackPanel Orientation="Horizontal">
|
||
<TextBlock
|
||
Margin="5"
|
||
VerticalAlignment="Center"
|
||
FontFamily="../Assets/Fonts/#iconfont"
|
||
FontSize="24"
|
||
Foreground="Black"
|
||
Text="" />
|
||
<TextBlock
|
||
Margin="5"
|
||
VerticalAlignment="Center"
|
||
FontSize="20"
|
||
Foreground="#596B75"
|
||
Text="控制参数配置" />
|
||
</StackPanel>
|
||
|
||
|
||
|
||
<StackPanel Grid.Row="1" Style="{StaticResource StackPanelText}">
|
||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||
<TextBlock Style="{StaticResource TextTitle}" Text="1-光伏充电储能上限(95-99):" />
|
||
<Slider
|
||
x:Name="Slider1"
|
||
Width="280"
|
||
IsSelectionRangeEnabled="True"
|
||
Maximum="100"
|
||
Minimum="50"
|
||
Orientation="Horizontal"
|
||
SelectionEnd="99"
|
||
SelectionStart="95"
|
||
TickFrequency="5"
|
||
TickPlacement="BottomRight"
|
||
Value="{Binding SolarToEsAsFullSoc}" />
|
||
<TextBlock
|
||
Margin="5,0"
|
||
Style="{StaticResource TextValue}"
|
||
Text="{Binding ElementName=Slider1, Path=Value, Mode=OneWay, StringFormat=0}" />
|
||
<!--<TextBox
|
||
Width="180"
|
||
VerticalAlignment="Center"
|
||
materialDesign:HintAssist.Hint="建议数据:【90-99】"
|
||
FontSize="14"
|
||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||
Text="145">
|
||
<i:Interaction.Behaviors>
|
||
<keyboard:NumericKeyboardBehavior />
|
||
</i:Interaction.Behaviors>
|
||
</TextBox>-->
|
||
</StackPanel>
|
||
<StackPanel Grid.Row="2" Style="{StaticResource StackPanelText}">
|
||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||
<TextBlock Style="{StaticResource TextTitle}" Text="2-主模式:切换从模式时主储能Soc下限(0-20):" />
|
||
<Slider
|
||
x:Name="Slider2"
|
||
Width="280"
|
||
IsSelectionRangeEnabled="True"
|
||
Maximum="50"
|
||
Minimum="0"
|
||
Orientation="Horizontal"
|
||
SelectionEnd="10"
|
||
SelectionStart="1"
|
||
TickFrequency="5"
|
||
TickPlacement="BottomRight"
|
||
Value="{Binding Master_ToSlaveByMasterSoc}" />
|
||
<TextBlock
|
||
Margin="5,0"
|
||
Style="{StaticResource TextValue}"
|
||
Text="{Binding ElementName=Slider2, Path=Value, Mode=OneWay, StringFormat=0}" />
|
||
</StackPanel>
|
||
<StackPanel Grid.Row="3" Style="{StaticResource StackPanelText}">
|
||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||
<TextBlock Style="{StaticResource TextTitle}" Text="3-主模式:切换从模式时从储能Soc下限(0-20):" />
|
||
<Slider
|
||
x:Name="Slider3"
|
||
Width="280"
|
||
IsSelectionRangeEnabled="True"
|
||
Maximum="50"
|
||
Minimum="0"
|
||
Orientation="Horizontal"
|
||
SelectionEnd="10"
|
||
SelectionStart="1"
|
||
TickFrequency="5"
|
||
TickPlacement="BottomRight"
|
||
Value="{Binding Master_ToSlaveBySlaveSoc}" />
|
||
<TextBlock
|
||
Margin="5,0"
|
||
Style="{StaticResource TextValue}"
|
||
Text="{Binding ElementName=Slider3, Path=Value, Mode=OneWay, StringFormat=0}" />
|
||
<!--<TextBox
|
||
Width="180"
|
||
VerticalAlignment="Center"
|
||
materialDesign:HintAssist.Hint="建议数据:【90-99】"
|
||
FontSize="14"
|
||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||
Text="145">
|
||
<i:Interaction.Behaviors>
|
||
<keyboard:NumericKeyboardBehavior />
|
||
</i:Interaction.Behaviors>
|
||
</TextBox>-->
|
||
</StackPanel>
|
||
<StackPanel Grid.Row="4" Style="{StaticResource StackPanelText}">
|
||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||
<TextBlock Style="{StaticResource TextTitle}" Text="4-主模式:光伏到从储能已充满,主储能Soc阀值(80-99):" />
|
||
<Slider
|
||
x:Name="Slider4"
|
||
Width="280"
|
||
IsSelectionRangeEnabled="True"
|
||
Maximum="100"
|
||
Minimum="50"
|
||
Orientation="Horizontal"
|
||
SelectionEnd="100"
|
||
SelectionStart="90"
|
||
TickFrequency="5"
|
||
TickPlacement="BottomRight"
|
||
Value="{Binding Master_SolarToSlaveEsFullByMasterSoc}" />
|
||
<TextBlock
|
||
Margin="5,0"
|
||
Style="{StaticResource TextValue}"
|
||
Text="{Binding ElementName=Slider4, Path=Value, Mode=OneWay, StringFormat=0}" />
|
||
<!--<TextBox
|
||
Width="180"
|
||
VerticalAlignment="Center"
|
||
materialDesign:HintAssist.Hint="建议数据:【90-99】"
|
||
FontSize="14"
|
||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||
Text="145">
|
||
<i:Interaction.Behaviors>
|
||
<keyboard:NumericKeyboardBehavior />
|
||
</i:Interaction.Behaviors>
|
||
</TextBox>-->
|
||
</StackPanel>
|
||
|
||
|
||
<StackPanel Grid.Row="6" Style="{StaticResource StackPanelText}">
|
||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||
<TextBlock Style="{StaticResource TextTitle}" Text="5-从模式:切换主模式时从储能Soc下限(0-20):" />
|
||
<Slider
|
||
x:Name="Slider6"
|
||
Width="280"
|
||
IsSelectionRangeEnabled="True"
|
||
Maximum="50"
|
||
Minimum="0"
|
||
Orientation="Horizontal"
|
||
SelectionEnd="10"
|
||
SelectionStart="1"
|
||
TickFrequency="5"
|
||
TickPlacement="BottomRight"
|
||
Value="{Binding Slave_ToMasterBySlaveSoc}" />
|
||
<TextBlock
|
||
Margin="5,0"
|
||
Style="{StaticResource TextValue}"
|
||
Text="{Binding ElementName=Slider6, Path=Value, Mode=OneWay, StringFormat=0}" />
|
||
</StackPanel>
|
||
<StackPanel Grid.Row="7" Style="{StaticResource StackPanelText}">
|
||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||
<TextBlock Style="{StaticResource TextTitle}" Text="6-从模式:切换主模式时主储能Soc下限(0-20):" />
|
||
<Slider
|
||
x:Name="Slider7"
|
||
Width="280"
|
||
IsSelectionRangeEnabled="True"
|
||
Maximum="50"
|
||
Minimum="0"
|
||
Orientation="Horizontal"
|
||
SelectionEnd="10"
|
||
SelectionStart="1"
|
||
TickFrequency="5"
|
||
TickPlacement="BottomRight"
|
||
Value="{Binding Slave_ToMasterByMasterSoc}" />
|
||
<TextBlock
|
||
Margin="5,0"
|
||
Style="{StaticResource TextValue}"
|
||
Text="{Binding ElementName=Slider7, Path=Value, Mode=OneWay, StringFormat=0}" />
|
||
|
||
</StackPanel>
|
||
<StackPanel Grid.Row="8" Style="{StaticResource StackPanelText}">
|
||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||
<TextBlock Style="{StaticResource TextTitle}" Text="7-从模式:光伏到主储能已充满,从储能Soc阀值(80-99):" />
|
||
<Slider
|
||
x:Name="Slider8"
|
||
Width="280"
|
||
IsSelectionRangeEnabled="True"
|
||
Maximum="100"
|
||
Minimum="50"
|
||
Orientation="Horizontal"
|
||
SelectionEnd="100"
|
||
SelectionStart="90"
|
||
TickFrequency="5"
|
||
TickPlacement="BottomRight"
|
||
Value="{Binding Slave_SolarToMasterEsFullBySlaverSoc}" />
|
||
<TextBlock
|
||
Margin="5,0"
|
||
Style="{StaticResource TextValue}"
|
||
Text="{Binding ElementName=Slider8, Path=Value, Mode=OneWay, StringFormat=0}" />
|
||
|
||
</StackPanel>
|
||
|
||
|
||
<StackPanel Grid.Row="10" Style="{StaticResource StackPanelText}">
|
||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||
<TextBlock Style="{StaticResource TextTitle}" Text="8-晚上充电:主储能充满Soc上限(建议90-99):" />
|
||
<Slider
|
||
x:Name="Slider10"
|
||
Width="280"
|
||
IsSelectionRangeEnabled="True"
|
||
Maximum="100"
|
||
Minimum="50"
|
||
Orientation="Horizontal"
|
||
SelectionEnd="99"
|
||
SelectionStart="90"
|
||
TickFrequency="5"
|
||
TickPlacement="BottomRight"
|
||
Value="{Binding NightMaster_ToMasterFullSoc}" />
|
||
<TextBlock
|
||
Margin="5,0"
|
||
Style="{StaticResource TextValue}"
|
||
Text="{Binding ElementName=Slider10, Path=Value, Mode=OneWay, StringFormat=0}" />
|
||
|
||
</StackPanel>
|
||
|
||
<StackPanel Grid.Row="11" Style="{StaticResource StackPanelText}">
|
||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||
<TextBlock Style="{StaticResource TextTitle}" Text="9-晚上充电:从储能充满Soc上限(建议50-90):" />
|
||
<Slider
|
||
x:Name="Slider11"
|
||
Width="280"
|
||
IsSelectionRangeEnabled="True"
|
||
Maximum="100"
|
||
Minimum="0"
|
||
Orientation="Horizontal"
|
||
SelectionEnd="90"
|
||
SelectionStart="50"
|
||
TickFrequency="5"
|
||
TickPlacement="BottomRight"
|
||
Value="{Binding NightSlave_ToSlaveFullSoc}" />
|
||
<TextBlock
|
||
Margin="5,0"
|
||
Style="{StaticResource TextValue}"
|
||
Text="{Binding ElementName=Slider11, Path=Value, Mode=OneWay, StringFormat=0}" />
|
||
|
||
</StackPanel>
|
||
|
||
<StackPanel Grid.Row="13" Style="{StaticResource StackPanelText}">
|
||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||
<TextBlock Style="{StaticResource TextTitle}" Text="放电模式时间:" />
|
||
<ComboBox
|
||
Width="240"
|
||
DisplayMemberPath="DisChargeTime"
|
||
ItemsSource="{Binding DisChargeModels}"
|
||
SelectedValue="{Binding SelectedDisChargeModelId, Mode=TwoWay}"
|
||
SelectedValuePath="Model" />
|
||
</StackPanel>
|
||
|
||
|
||
<StackPanel
|
||
Grid.Row="18"
|
||
Grid.ColumnSpan="2"
|
||
Margin="0,0,20,5"
|
||
HorizontalAlignment="Right"
|
||
VerticalAlignment="Center">
|
||
<Button Command="{Binding BtnConfigSave}" Content="使用并保存配置" />
|
||
</StackPanel>
|
||
<StackPanel
|
||
Grid.Row="18"
|
||
Grid.ColumnSpan="2"
|
||
Margin="20,0,20,5"
|
||
HorizontalAlignment="Left"
|
||
VerticalAlignment="Center">
|
||
<Button Command="{Binding BtnCloseSys}" Content="关闭系统" />
|
||
</StackPanel>
|
||
</Grid>
|
||
</Border>
|
||
</Grid>
|
||
</UserControl>
|