218 lines
8.2 KiB
XML
218 lines
8.2 KiB
XML
<UserControl
|
|
x:Class="OrpaonEMS.App.Views.TimeConfigView"
|
|
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
|
|
Width="960"
|
|
Height="300"
|
|
mc:Ignorable="d">
|
|
<UserControl.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<!--<ResourceDictionary Source="/KylinEMS.Assets;component/Styles/MaterialDesignThemesResources.xaml" />-->
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary>
|
|
</UserControl.Resources>
|
|
<Grid Margin="10">
|
|
<Grid.Resources>
|
|
<Style x:Key="TextBlockIco" TargetType="TextBlock">
|
|
<Setter Property="FontFamily" Value="../Assets/Fonts/#iconfont" />
|
|
<Setter Property="Foreground" Value="Gray" />
|
|
<Setter Property="FontSize" Value="26" />
|
|
<Setter Property="Margin" Value="5,0" />
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
</Style>
|
|
<Style x:Key="HeadTitleIndex" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="36" />
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
</Style>
|
|
</Grid.Resources>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="100" />
|
|
<RowDefinition />
|
|
<RowDefinition Height="100" />
|
|
</Grid.RowDefinitions>
|
|
<Grid Margin="5,40,5,5" Background="#FFB8D2AA">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition Width="0.5*" />
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<Label
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Content="序号"
|
|
FontSize="22" />
|
|
<Label
|
|
Grid.Column="1"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Content="启用"
|
|
FontSize="22" />
|
|
<Label
|
|
Grid.Column="2"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Content="类型"
|
|
FontSize="22" />
|
|
<Label
|
|
Grid.Column="3"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Content="开始时间"
|
|
FontSize="22" />
|
|
<Label
|
|
Grid.Column="4"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Content="结束时间"
|
|
FontSize="22" />
|
|
<Label
|
|
Grid.Column="5"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Content="价格(元)"
|
|
FontSize="22" />
|
|
</Grid>
|
|
<Grid
|
|
Grid.Row="1"
|
|
Height="100"
|
|
Margin="5,0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition Width="0.5*" />
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock Style="{StaticResource TextBlockIco}" Text="" />
|
|
<TextBox
|
|
Width="100"
|
|
FontSize="26"
|
|
FontStyle="Italic"
|
|
Text="{Binding SelectedPeakValley.Index}">
|
|
<i:Interaction.Behaviors>
|
|
<keyboard:NumericKeyboardBehavior />
|
|
</i:Interaction.Behaviors>
|
|
</TextBox>
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
Grid.Column="1"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center">
|
|
<CheckBox
|
|
x:Name="MaterialDesignFilledTextBoxEnabledComboBox"
|
|
Content="启用"
|
|
FontSize="20"
|
|
IsChecked="{Binding SelectedPeakValley.Enable}" />
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Column="2"
|
|
Margin="5"
|
|
Orientation="Horizontal">
|
|
<TextBlock Style="{StaticResource TextBlockIco}" Text="" />
|
|
<syncfusion:ComboBoxAdv
|
|
Width="100"
|
|
Height="30"
|
|
DisplayMemberPath="Text"
|
|
ItemsSource="{Binding CbxTime}"
|
|
SelectedValue="{Binding SelectedElePvEnum}"
|
|
SelectedValuePath="Text" />
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Column="3"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="5,0"
|
|
Style="{StaticResource TextBlockIco}"
|
|
Text="" />
|
|
<syncfusion:SfTimePicker
|
|
x:Name="sfTimePickerStart1"
|
|
Width="80"
|
|
Height="40"
|
|
FontSize="20"
|
|
FormatString="HH:mm"
|
|
Watermark="开始时间"
|
|
Value="{Binding StartTime, Mode=TwoWay}" />
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Column="4"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock Style="{StaticResource TextBlockIco}" Text="" />
|
|
<syncfusion:SfTimePicker
|
|
x:Name="sfTimePickerEnd1"
|
|
Width="80"
|
|
Height="40"
|
|
FontSize="20"
|
|
FormatString="HH:mm"
|
|
Watermark="结束时间"
|
|
Value="{Binding EndTime, Mode=TwoWay}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
Grid.Column="5"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock Style="{StaticResource TextBlockIco}" Text="" />
|
|
<TextBox
|
|
Width="100"
|
|
Margin="10"
|
|
FontSize="26"
|
|
Text="{Binding SelectedPeakValley.Price}">
|
|
<i:Interaction.Behaviors>
|
|
<keyboard:NumericKeyboardBehavior />
|
|
</i:Interaction.Behaviors>
|
|
</TextBox>
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
|
|
<StackPanel
|
|
Grid.Row="5"
|
|
Grid.ColumnSpan="2"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<Button
|
|
Width="150"
|
|
Height="50"
|
|
Margin="10"
|
|
Command="{Binding CancelCmd}"
|
|
FontSize="22"
|
|
Foreground="White">
|
|
取消
|
|
</Button>
|
|
<Button
|
|
Width="150"
|
|
Height="50"
|
|
Margin="10"
|
|
Command="{Binding SaveCmd}"
|
|
FontSize="22"
|
|
Foreground="White">
|
|
保存配置
|
|
</Button>
|
|
</StackPanel>
|
|
</Grid>
|
|
</UserControl>
|