添加项目文件。
This commit is contained in:
885
OrpaonEMS.App/Views/SysConfigView.xaml
Normal file
885
OrpaonEMS.App/Views/SysConfigView.xaml
Normal file
@@ -0,0 +1,885 @@
|
||||
<UserControl
|
||||
x:Class="OrpaonEMS.App.Views.SysConfigView"
|
||||
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:localConverter="clr-namespace:OrpaonEMS.Core.Converts;assembly=OrpaonEMS.Core"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
xmlns:root="clr-namespace:OrpaonEMS.App"
|
||||
d:DesignHeight="708"
|
||||
d:DesignWidth="1024"
|
||||
prism:ViewModelLocator.AutoWireViewModel="True"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Resources>
|
||||
<localConverter:ElePvConverter x:Key="ElePvConverter" />
|
||||
<localConverter:RatioConverter x:Key="RatioConverter" />
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="0.8*" />
|
||||
<RowDefinition Height="1.2*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border
|
||||
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 />
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.Resources>
|
||||
<Style x:Key="TextIco" TargetType="TextBlock">
|
||||
<Setter Property="Margin" Value="0,2,10,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="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="Mqtt配置" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="1" Style="{StaticResource StackPanelText}">
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||||
<TextBox
|
||||
Width="100"
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:HintAssist.Hint="IP地址"
|
||||
FontSize="14"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Text="{Binding ConfigDataService.MqttServerUrl}">
|
||||
<i:Interaction.Behaviors>
|
||||
<keyboard:NumericKeyboardBehavior />
|
||||
</i:Interaction.Behaviors>
|
||||
</TextBox>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Style="{StaticResource StackPanelText}">
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||||
<TextBox
|
||||
Width="100"
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:HintAssist.Hint="端口号"
|
||||
FontSize="14"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Text="{Binding ConfigDataService.MqttServerPort}">
|
||||
<i:Interaction.Behaviors>
|
||||
<keyboard:NumericKeyboardBehavior />
|
||||
</i:Interaction.Behaviors>
|
||||
</TextBox>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Style="{StaticResource StackPanelText}">
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||||
<TextBox
|
||||
Width="100"
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:HintAssist.Hint="用户名"
|
||||
FontSize="14"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Text="{Binding ConfigDataService.MqttUser}">
|
||||
<i:Interaction.Behaviors>
|
||||
<keyboard:KeyboardBehavior />
|
||||
</i:Interaction.Behaviors>
|
||||
</TextBox>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Style="{StaticResource StackPanelText}">
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||||
<TextBox
|
||||
Width="100"
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:HintAssist.Hint="密码"
|
||||
FontSize="14"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Text="{Binding ConfigDataService.MqttPwd}">
|
||||
<i:Interaction.Behaviors>
|
||||
<keyboard:KeyboardBehavior />
|
||||
</i:Interaction.Behaviors>
|
||||
</TextBox>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Row="3"
|
||||
Grid.ColumnSpan="2"
|
||||
Style="{StaticResource StackPanelText}">
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||||
<TextBox
|
||||
Width="260"
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:HintAssist.Hint="客户端标识"
|
||||
FontSize="14"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Text="{Binding ConfigDataService.MqttClientId}">
|
||||
<i:Interaction.Behaviors>
|
||||
<keyboard:KeyboardBehavior />
|
||||
</i:Interaction.Behaviors>
|
||||
</TextBox>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Row="4"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="0,0,20,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center">
|
||||
<Button Command="{Binding BtnMqttConfigSave}" Content="保存配置" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
<Border
|
||||
Grid.Column="1"
|
||||
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 />
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.Resources>
|
||||
<Style x:Key="TextIco" TargetType="TextBlock">
|
||||
<Setter Property="Margin" Value="0,2,10,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="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="" />
|
||||
<CheckBox
|
||||
Width="100"
|
||||
Content="是否主站"
|
||||
FontSize="16"
|
||||
IsChecked="{Binding ConfigDataService.IsMaster}" />
|
||||
<!--<TextBox
|
||||
Width="100"
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:HintAssist.Hint="是否主站"
|
||||
FontSize="14"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}" />-->
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Style="{StaticResource StackPanelText}">
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||||
<TextBox
|
||||
Width="100"
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:HintAssist.Hint="站号"
|
||||
FontSize="14"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Text="{Binding ConfigDataService.Station}">
|
||||
<i:Interaction.Behaviors>
|
||||
<keyboard:NumericKeyboardBehavior />
|
||||
</i:Interaction.Behaviors>
|
||||
</TextBox>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Style="{StaticResource StackPanelText}">
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||||
<TextBox
|
||||
Width="100"
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:HintAssist.Hint="BMS IP"
|
||||
FontSize="14"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Text="{Binding ConfigDataService.BMSIP}">
|
||||
<i:Interaction.Behaviors>
|
||||
<keyboard:NumericKeyboardBehavior />
|
||||
</i:Interaction.Behaviors>
|
||||
</TextBox>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Style="{StaticResource StackPanelText}">
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||||
<TextBox
|
||||
Width="100"
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:HintAssist.Hint="PCS IP"
|
||||
FontSize="14"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Text="{Binding ConfigDataService.PCSIP}">
|
||||
<i:Interaction.Behaviors>
|
||||
<keyboard:NumericKeyboardBehavior />
|
||||
</i:Interaction.Behaviors>
|
||||
</TextBox>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Style="{StaticResource StackPanelText}">
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||||
<TextBox
|
||||
Width="260"
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:HintAssist.Hint="EMS服务Url"
|
||||
FontSize="14"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Text="{Binding ConfigDataService.ServerUrl}">
|
||||
<i:Interaction.Behaviors>
|
||||
<keyboard:KeyboardBehavior />
|
||||
</i:Interaction.Behaviors>
|
||||
</TextBox>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="4"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="0,0,20,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center">
|
||||
<Button Command="{Binding BtnComConfigSave}" Content="保存配置" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
<Border
|
||||
Grid.Column="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 />
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.Resources>
|
||||
<Style x:Key="TextIco" TargetType="TextBlock">
|
||||
<Setter Property="Margin" Value="0,2,10,2" />
|
||||
<Setter Property="FontSize" Value="20" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="FontFamily" Value="../Assets/Fonts/#iconfont" />
|
||||
<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 Grid.ColumnSpan="2" 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"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="18,0"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource StackPanelText}">
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="数据记录:" />
|
||||
<ToggleButton
|
||||
Width="60"
|
||||
IsChecked="{Binding ConfigDataService.IsSaveDataLog}"
|
||||
Style="{StaticResource MaterialDesignSwitchToggleButton}"
|
||||
ToolTip="Default ToggleButton Style" />
|
||||
<Button
|
||||
Width="100"
|
||||
Height="25"
|
||||
Margin="5,5"
|
||||
Command="{Binding BtnDataLogFileOpen}"
|
||||
Content="文本查看"
|
||||
Style="{StaticResource MaterialDesignRaisedLightButton}" />
|
||||
</StackPanel>
|
||||
<!--<StackPanel
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Style="{StaticResource StackPanelText}">
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||||
<TextBox
|
||||
Width="100"
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:HintAssist.Hint="端口号"
|
||||
FontSize="14"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Style="{StaticResource StackPanelText}">
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||||
<TextBox
|
||||
Width="100"
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:HintAssist.Hint="用户名"
|
||||
FontSize="14"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}" />
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Style="{StaticResource StackPanelText}">
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||||
<TextBox
|
||||
Width="100"
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:HintAssist.Hint="密码"
|
||||
FontSize="14"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}" />
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Row="3"
|
||||
Grid.ColumnSpan="2"
|
||||
Style="{StaticResource StackPanelText}">
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||||
<TextBox
|
||||
Width="260"
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:HintAssist.Hint="客户端标识"
|
||||
FontSize="14"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}" />
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Row="4"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="0,0,20,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center">
|
||||
<Button Content="保存配置" />
|
||||
</StackPanel>-->
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Margin="5,5"
|
||||
Background="White"
|
||||
CornerRadius="10">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect
|
||||
BlurRadius="20"
|
||||
Direction="280"
|
||||
Opacity="0.4"
|
||||
ShadowDepth="0"
|
||||
Color="DarkGray" />
|
||||
</Border.Effect>
|
||||
<TabControl
|
||||
materialDesign:ColorZoneAssist.Background="{DynamicResource MaterialDesignLightBackground}"
|
||||
materialDesign:ColorZoneAssist.Foreground="{DynamicResource PrimaryHueMidBrush}"
|
||||
materialDesign:ColorZoneAssist.Mode="Custom"
|
||||
Style="{StaticResource MaterialDesignFilledTabControl}">
|
||||
<TabItem>
|
||||
<TabItem.Header>
|
||||
<TextBlock FontSize="16" Text="储能运行策略配置1" />
|
||||
</TabItem.Header>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="8*" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.Resources>
|
||||
<Style x:Key="TextIco" TargetType="TextBlock">
|
||||
<Setter Property="Margin" Value="0,2,10,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="StackPanelText" TargetType="StackPanel">
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="Orientation" Value="Horizontal" />
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
|
||||
<StackPanel Grid.Row="0" Style="{StaticResource StackPanelText}">
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="最大充电功率比率:" />
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="{Binding ElementName=Slider1, Path=Value, Mode=OneWay, StringFormat={}{0:p1}}" />
|
||||
<Slider
|
||||
x:Name="Slider1"
|
||||
Width="620"
|
||||
IsSelectionRangeEnabled="True"
|
||||
Maximum="1"
|
||||
Minimum="0"
|
||||
Orientation="Horizontal"
|
||||
SelectionEnd="1"
|
||||
SelectionStart="0.7"
|
||||
TickFrequency="0.05"
|
||||
TickPlacement="BottomRight"
|
||||
Value="{Binding ConfigDataService.energyStorageRunConfig.MaxBatChargRatio}" />
|
||||
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="1" Style="{StaticResource StackPanelText}">
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="最大放电功率比率:" />
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="{Binding ElementName=Slider2, Path=Value, Mode=OneWay, StringFormat={}{0:p1}}" />
|
||||
<Slider
|
||||
x:Name="Slider2"
|
||||
Width="620"
|
||||
IsSelectionRangeEnabled="True"
|
||||
Maximum="1"
|
||||
Minimum="0"
|
||||
Orientation="Horizontal"
|
||||
SelectionEnd="1"
|
||||
SelectionStart="0.7"
|
||||
TickFrequency="0.05"
|
||||
TickPlacement="BottomRight"
|
||||
Value="{Binding ConfigDataService.energyStorageRunConfig.MaxBatDisChargRatio}" />
|
||||
|
||||
</StackPanel>
|
||||
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Margin="0,0,10,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center">
|
||||
<Button Command="{Binding BtnRunConfigSave1}" Content="保存配置" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem>
|
||||
<TabItem.Header>
|
||||
<TextBlock FontSize="16" Text="储能运行策略配置2" />
|
||||
</TabItem.Header>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="8*" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.Resources>
|
||||
<Style x:Key="TextIco" TargetType="TextBlock">
|
||||
<Setter Property="Margin" Value="0,2,10,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="StackPanelText" TargetType="StackPanel">
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="Orientation" Value="Horizontal" />
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
|
||||
<StackPanel Grid.Row="0" Style="{StaticResource StackPanelText}">
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="BMS的SOC满阀值:" />
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="{Binding ElementName=Slider3, Path=Value, Mode=OneWay, StringFormat={}{0:p1}}" />
|
||||
<Slider
|
||||
x:Name="Slider3"
|
||||
Width="620"
|
||||
IsSelectionRangeEnabled="True"
|
||||
Maximum="1"
|
||||
Minimum="0"
|
||||
Orientation="Horizontal"
|
||||
SelectionEnd="1"
|
||||
SelectionStart="0.8"
|
||||
TickFrequency="0.05"
|
||||
TickPlacement="BottomRight"
|
||||
Value="{Binding ConfigDataService.energyStorageRunConfig.BMSSocUpSignLimitValue, Converter={StaticResource RatioConverter}}" />
|
||||
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="1" Style="{StaticResource StackPanelText}">
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="BMS的SOC亏阀值:" />
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="{Binding ElementName=Slider4, Path=Value, Mode=OneWay, StringFormat={}{0:p1}}" />
|
||||
<Slider
|
||||
x:Name="Slider4"
|
||||
Width="620"
|
||||
IsSelectionRangeEnabled="True"
|
||||
Maximum="1"
|
||||
Minimum="0"
|
||||
Orientation="Horizontal"
|
||||
SelectionEnd="0.1"
|
||||
SelectionStart="0.0"
|
||||
TickFrequency="0.05"
|
||||
TickPlacement="BottomRight"
|
||||
Value="{Binding ConfigDataService.energyStorageRunConfig.BMSSocDownSignLimitValue, Converter={StaticResource RatioConverter}}" />
|
||||
|
||||
</StackPanel>
|
||||
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Margin="0,0,10,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center">
|
||||
<Button Command="{Binding BtnRunConfigSave2}" Content="保存配置" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem>
|
||||
<TabItem.Header>
|
||||
<TextBlock FontSize="16" Text="储能运行策略配置3" />
|
||||
</TabItem.Header>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.Resources>
|
||||
<Style x:Key="TextIco" TargetType="TextBlock">
|
||||
<Setter Property="Margin" Value="0,2,10,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="StackPanelText" TargetType="StackPanel">
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="Orientation" Value="Horizontal" />
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
<StackPanel Grid.Row="0" Style="{StaticResource StackPanelText}">
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="关口电表调控值:" />
|
||||
<TextBox
|
||||
Width="100"
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:HintAssist.Hint="输入数据"
|
||||
FontSize="14"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Text="{Binding ConfigDataService.EMSActionLimitValue.TargetValue}">
|
||||
<i:Interaction.Behaviors>
|
||||
<keyboard:NumericKeyboardBehavior />
|
||||
</i:Interaction.Behaviors>
|
||||
</TextBox>
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="kW" />
|
||||
|
||||
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="1" Style="{StaticResource StackPanelText}">
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="PCS的调度阀值:" />
|
||||
<TextBox
|
||||
Width="100"
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:HintAssist.Hint="输入数据"
|
||||
FontSize="14"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Text="{Binding ConfigDataService.PcsChangeValue}">
|
||||
<i:Interaction.Behaviors>
|
||||
<keyboard:NumericKeyboardBehavior />
|
||||
</i:Interaction.Behaviors>
|
||||
</TextBox>
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="kW" />
|
||||
|
||||
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Style="{StaticResource StackPanelText}">
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="" />
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="变压器容量:" />
|
||||
<TextBox
|
||||
Width="100"
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:HintAssist.Hint="输入数据"
|
||||
FontSize="14"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Text="{Binding ConfigDataService.TransformerCapacity}">
|
||||
<i:Interaction.Behaviors>
|
||||
<keyboard:NumericKeyboardBehavior />
|
||||
</i:Interaction.Behaviors>
|
||||
</TextBox>
|
||||
<TextBlock Style="{StaticResource TextIco}" Text="KVA" />
|
||||
|
||||
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Margin="0,0,10,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center">
|
||||
<Button Command="{Binding BtnRunConfigSave3}" Content="保存配置" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem>
|
||||
<TabItem.Header>
|
||||
<TextBlock FontSize="16" Text="储能运行策略配置4" />
|
||||
</TabItem.Header>
|
||||
|
||||
</TabItem>
|
||||
<TabItem>
|
||||
<TabItem.Header>
|
||||
<TextBlock FontSize="16" Text="储能运行策略配置5" />
|
||||
</TabItem.Header>
|
||||
|
||||
</TabItem>
|
||||
|
||||
</TabControl>
|
||||
|
||||
|
||||
</Border>
|
||||
|
||||
<Border
|
||||
Grid.Row="2"
|
||||
Margin="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 Height="40" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel
|
||||
Margin="3,2"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
|
||||
<Button
|
||||
Width="60"
|
||||
Margin="5,0"
|
||||
Command="{Binding PeakValleyConfigAddCmd}"
|
||||
Content="新增" />
|
||||
<Button
|
||||
Width="60"
|
||||
Margin="5,0"
|
||||
Click="ButtonUp_Click"
|
||||
Content=""
|
||||
FontFamily="../Assets/Fonts/#iconfont" />
|
||||
<Button
|
||||
Width="60"
|
||||
Margin="5,0"
|
||||
Click="ButtonDown_Click"
|
||||
Content=""
|
||||
FontFamily="../Assets/Fonts/#iconfont" />
|
||||
</StackPanel>
|
||||
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Margin="2,0"
|
||||
BorderBrush="Gray"
|
||||
BorderThickness="1">
|
||||
<DataGrid
|
||||
x:Name="ConfigDatagrid"
|
||||
AutoGenerateColumns="False"
|
||||
IsReadOnly="True"
|
||||
ItemsSource="{Binding ListPeakValleyDtoItems}"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
SelectionMode="Extended">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn
|
||||
Width="100"
|
||||
Binding="{Binding Index}"
|
||||
Header="序号" />
|
||||
<DataGridTextColumn
|
||||
Width="200"
|
||||
Binding="{Binding ElePV, Converter={StaticResource ElePvConverter}}"
|
||||
Header="类型" />
|
||||
<DataGridTextColumn
|
||||
Width="100"
|
||||
Binding="{Binding StartTime}"
|
||||
Header="开始时间" />
|
||||
<DataGridTextColumn
|
||||
Width="100"
|
||||
Binding="{Binding EndTime}"
|
||||
Header="结束时间" />
|
||||
<DataGridTextColumn
|
||||
Width="100"
|
||||
Binding="{Binding Price}"
|
||||
Header="价格" />
|
||||
<DataGridCheckBoxColumn
|
||||
Width="100"
|
||||
Binding="{Binding Enable}"
|
||||
Header="启用" />
|
||||
<DataGridTemplateColumn Header="操作">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
|
||||
<!-- 框 -->
|
||||
<Button
|
||||
Margin="5,0"
|
||||
Command="{Binding DataContext.PeakValleyConfigEditCmd, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
|
||||
CommandParameter="{Binding}"
|
||||
Content="编辑" />
|
||||
<Button
|
||||
Margin="5,0"
|
||||
Command="{Binding DataContext.PeakValleyConfigDeleteCmd, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
|
||||
CommandParameter="{Binding}"
|
||||
Content="删除" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<prism:InvokeCommandAction Command="{Binding GridSelectionChangedCmd}" CommandParameter="{Binding ElementName=ConfigDatagrid, Path=SelectedItem}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
|
||||
<!--<DataGrid.RowStyle>
|
||||
<Style TargetType="{x:Type DataGridRow}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="ItemsControl.AlternationIndex" Value="0">
|
||||
<Setter Property="Background" Value="AliceBlue" />
|
||||
</Trigger>
|
||||
<Trigger Property="ItemsControl.AlternationIndex" Value="1">
|
||||
<Setter Property="Background" Value="#FFF2F2F2" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>-->
|
||||
</DataGrid>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user