V1版本
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
x:Name="MeterConfigInstance"
|
||||
d:DesignHeight="400"
|
||||
d:DesignWidth="300"
|
||||
d:DesignWidth="400"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Resources>
|
||||
<local:BoolNgConvert x:Key="BoolNgConverter" />
|
||||
@@ -29,31 +29,18 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<DockPanel Background="White">
|
||||
<!--<StackPanel DockPanel.Dock="Left" Orientation="Horizontal">
|
||||
<Border Background="#FF03A9F4">
|
||||
<TextBlock
|
||||
Margin="15,0,5,0"
|
||||
Margin="0,0,5,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="常值/斜率:" />
|
||||
<ToggleButton
|
||||
x:Name="TBSwitchConstSlop"
|
||||
Command="{Binding ElementName=MeterConfigInstance, Path=SwitchConstSlopCommand}"
|
||||
CommandParameter="{Binding ElementName=TBSwitchConstSlop, Path=IsChecked}"
|
||||
IsChecked="{Binding ElementName=MeterConfigInstance, Path=SwitchConstSlopPar}"
|
||||
Style="{StaticResource MaterialDesignSwitchToggleButton}"
|
||||
ToolTip="常值和斜率选项" />
|
||||
-->
|
||||
<!-- IsChecked="{Binding ElementName=MeterConfigInstance, Path=SwitchConstSlopPar}" -->
|
||||
<!--
|
||||
</StackPanel>-->
|
||||
DockPanel.Dock="Right"
|
||||
FontSize="18"
|
||||
Foreground="White"
|
||||
Text="{Binding ElementName=MeterConfigInstance, Path=MeterName}"
|
||||
TextAlignment="Right" />
|
||||
</Border>
|
||||
|
||||
|
||||
<TextBlock
|
||||
Margin="0,0,5,0"
|
||||
VerticalAlignment="Center"
|
||||
DockPanel.Dock="Right"
|
||||
FontSize="18"
|
||||
Foreground="Blue"
|
||||
Text="{Binding ElementName=MeterConfigInstance, Path=MeterName}"
|
||||
TextAlignment="Right" />
|
||||
</DockPanel>
|
||||
<TabControl
|
||||
x:Name="MainTabControl"
|
||||
@@ -77,11 +64,29 @@
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
<!-- IsEnabled="{Binding IsChecked, ElementName=TBSwitchConstSlop, Converter={StaticResource BoolNgConverter}}" -->
|
||||
<TabItem Header="常值">
|
||||
<TabItem>
|
||||
<TabItem.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<!--<TextBlock
|
||||
Margin="5,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily=".../Assets/Fonts/#iconfont"
|
||||
FontSize="20"
|
||||
Foreground="White"
|
||||
Text="" />-->
|
||||
<TextBlock
|
||||
Margin="2,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="20"
|
||||
Foreground="White"
|
||||
Text="常值" />
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="80" />
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
@@ -101,13 +106,37 @@
|
||||
Content="确定"
|
||||
Foreground="White" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="2" VerticalAlignment="Center">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="16"
|
||||
Foreground="Gray"
|
||||
Text="持续时间请参照速度时间" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<!-- IsEnabled="{Binding IsChecked, ElementName=TBSwitchConstSlop}" -->
|
||||
<TabItem Header="斜率">
|
||||
<TabItem>
|
||||
<TabItem.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<!--<TextBlock
|
||||
Margin="5,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily=".../Assets/Fonts/#iconfont"
|
||||
FontSize="20"
|
||||
Foreground="White"
|
||||
Text="" />-->
|
||||
<TextBlock
|
||||
Margin="2,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="20"
|
||||
Foreground="White"
|
||||
Text="斜率" />
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="70" />
|
||||
<RowDefinition Height="55" />
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
@@ -116,9 +145,12 @@
|
||||
<ColumnDefinition Width="0.8*" />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="1.4*" />
|
||||
<ColumnDefinition Width="1.5*" />
|
||||
<ColumnDefinition Width="0.8*" />
|
||||
<ColumnDefinition Width="0.8*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Margin="1,10,0,0">
|
||||
|
||||
<!--<StackPanel Margin="1,10,0,0">
|
||||
<TextBox
|
||||
VerticalAlignment="Top"
|
||||
materialDesign:HintAssist.Hint="序号"
|
||||
@@ -172,10 +204,10 @@
|
||||
</TextBox.ToolTip>
|
||||
</TextBox>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="3" Margin="1,10,3,0">
|
||||
<StackPanel Grid.Column="3" Margin="1,10,0,0">
|
||||
<TextBox
|
||||
VerticalAlignment="Top"
|
||||
materialDesign:HintAssist.Hint="维持时间"
|
||||
materialDesign:HintAssist.Hint="持续时间"
|
||||
FontSize="13"
|
||||
FontWeight="Bold"
|
||||
IsEnabled="True"
|
||||
@@ -190,7 +222,83 @@
|
||||
Text="维持时间" />
|
||||
</TextBox.ToolTip>
|
||||
</TextBox>
|
||||
</StackPanel>-->
|
||||
|
||||
<StackPanel Margin="3,5,3,0">
|
||||
<TextBox
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:HintAssist.Hint="序号"
|
||||
FontSize="16"
|
||||
FontWeight="Bold"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Text="{Binding ElementName=MeterConfigInstance, Path=SelectedMeter.StepNo}"
|
||||
TextWrapping="NoWrap"
|
||||
ToolTip="新增时自动填充序号;可手动修改序号"
|
||||
VerticalScrollBarVisibility="Disabled" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Margin="2,5,3,0">
|
||||
<TextBox
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:HintAssist.Hint="起始值"
|
||||
FontSize="16"
|
||||
FontWeight="Bold"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Text="{Binding ElementName=MeterConfigInstance, Path=SelectedMeter.StartValue}"
|
||||
TextWrapping="NoWrap"
|
||||
ToolTip="起始值"
|
||||
VerticalScrollBarVisibility="Disabled" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="2" Margin="2,5,3,0">
|
||||
<TextBox
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:HintAssist.Hint="结束值"
|
||||
FontSize="16"
|
||||
FontWeight="Bold"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Text="{Binding ElementName=MeterConfigInstance, Path=SelectedMeter.EndValue}"
|
||||
TextWrapping="NoWrap"
|
||||
ToolTip="结束值"
|
||||
VerticalScrollBarVisibility="Disabled" />
|
||||
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="3" Margin="2,5,3,0">
|
||||
<TextBox
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:HintAssist.Hint="持续时间"
|
||||
FontSize="16"
|
||||
FontWeight="Bold"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Text="{Binding ElementName=MeterConfigInstance, Path=SelectedMeter.KeepTime, Converter={StaticResource SecToStrConverter}}"
|
||||
TextWrapping="NoWrap"
|
||||
ToolTip="持续时间"
|
||||
VerticalScrollBarVisibility="Disabled" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Column="4" Margin="2,5,3,0">
|
||||
<TextBox
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:HintAssist.Hint="PID"
|
||||
FontSize="16"
|
||||
FontWeight="Bold"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Text="{Binding ElementName=MeterConfigInstance, Path=SelectedMeter.PIDNo}"
|
||||
TextWrapping="NoWrap"
|
||||
ToolTip="PID"
|
||||
VerticalScrollBarVisibility="Disabled" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="5" Margin="2,5,3,0">
|
||||
<TextBox
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:HintAssist.Hint="限幅"
|
||||
FontSize="16"
|
||||
FontWeight="Bold"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Text="{Binding ElementName=MeterConfigInstance, Path=SelectedMeter.LimitNo}"
|
||||
TextWrapping="NoWrap"
|
||||
ToolTip="限幅"
|
||||
VerticalScrollBarVisibility="Disabled" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal">
|
||||
<Button
|
||||
@@ -276,7 +384,8 @@
|
||||
<ListView
|
||||
x:Name="listviewMeter"
|
||||
Foreground="Black"
|
||||
ItemsSource="{Binding ElementName=MeterConfigInstance, Path=ListMeter}">
|
||||
ItemsSource="{Binding ElementName=MeterConfigInstance, Path=ListMeter}"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<i:InvokeCommandAction Command="{Binding ElementName=MeterConfigInstance, Path=MeterSelectedChangedCmd}" CommandParameter="{Binding ElementName=listviewMeter, Path=SelectedItem}" />
|
||||
@@ -286,21 +395,30 @@
|
||||
|
||||
<GridView ColumnHeaderContainerStyle="{StaticResource myHeaderStyle1}">
|
||||
<GridViewColumn
|
||||
Width="40"
|
||||
Width="38"
|
||||
DisplayMemberBinding="{Binding StepNo}"
|
||||
Header="序号" />
|
||||
<GridViewColumn
|
||||
Width="60"
|
||||
Width="58"
|
||||
DisplayMemberBinding="{Binding StartValue}"
|
||||
Header="起始值" />
|
||||
<GridViewColumn
|
||||
Width="60"
|
||||
Width="58"
|
||||
DisplayMemberBinding="{Binding EndValue}"
|
||||
Header="结束值" />
|
||||
<GridViewColumn
|
||||
Width="100"
|
||||
Width="85"
|
||||
DisplayMemberBinding="{Binding KeepTime, Converter={StaticResource SecToStrConverter}}"
|
||||
Header="维持时间" />
|
||||
|
||||
<GridViewColumn
|
||||
Width="40"
|
||||
DisplayMemberBinding="{Binding PIDNo}"
|
||||
Header="PID" />
|
||||
<GridViewColumn
|
||||
Width="42"
|
||||
DisplayMemberBinding="{Binding LimitNo}"
|
||||
Header="限幅" />
|
||||
</GridView>
|
||||
|
||||
</ListView.View>
|
||||
@@ -314,7 +432,114 @@
|
||||
</Border>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem>
|
||||
<TabItem.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="2,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="20"
|
||||
Foreground="White"
|
||||
Text="其他" />
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="5"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="22"
|
||||
Text="默认参数设置" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="5"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Text="PIDNo:" />
|
||||
<TextBox
|
||||
Width="40"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="16"
|
||||
Text="{Binding ElementName=MeterConfigInstance, Path=DefaultPIDNo}" />
|
||||
</StackPanel>
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="5"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Text="限幅No:" />
|
||||
<TextBox
|
||||
Width="40"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="16"
|
||||
Text="{Binding ElementName=MeterConfigInstance, Path=DefaultLimitNo}" />
|
||||
</StackPanel>
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="0,5"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Text="报警限幅No:" />
|
||||
<TextBox
|
||||
Width="40"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="16"
|
||||
Text="{Binding ElementName=MeterConfigInstance, Path=DefaultAlarmNo}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="2" VerticalAlignment="Center">
|
||||
<TextBlock
|
||||
Margin="5"
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="14"
|
||||
Foreground="Gray"
|
||||
Text="默认数据将为常值配置使用"
|
||||
TextWrapping="WrapWithOverflow" />
|
||||
</StackPanel>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="4"
|
||||
HorizontalAlignment="Center"
|
||||
Cursor=""
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Margin="10,0"
|
||||
Command="{Binding ElementName=MeterConfigInstance, Path=ParConfigCommand}"
|
||||
CommandParameter="PID"
|
||||
Content="PID参数"
|
||||
Foreground="White" />
|
||||
<Button
|
||||
Margin="10,0"
|
||||
Command="{Binding ElementName=MeterConfigInstance, Path=ParConfigCommand}"
|
||||
CommandParameter="Limit"
|
||||
Content="限幅参数"
|
||||
Foreground="White" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
||||
</Grid>
|
||||
|
||||
Reference in New Issue
Block a user