429 lines
32 KiB
XML
429 lines
32 KiB
XML
<UserControl x:Class="PowerAdaptabilityModule.Views.PowerAdaptabilityView"
|
||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
mc:Ignorable="d"
|
||
xmlns:prism="http://prismlibrary.com/"
|
||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||
xmlns:converters="clr-namespace:UIShare.Converters;assembly=UIShare"
|
||
prism:ViewModelLocator.AutoWireViewModel="True"
|
||
d:DesignHeight="1080"
|
||
d:DesignWidth="1920">
|
||
<UserControl.Resources>
|
||
<converters:BooleanToVisibilityConverter x:Key="BoolToVis" />
|
||
</UserControl.Resources>
|
||
|
||
<Border Background="#F5F7FA">
|
||
<Grid Margin="8">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<!-- ============ 左侧:Chroma 命令面板 ============ -->
|
||
<ScrollViewer Grid.Column="0"
|
||
VerticalScrollBarVisibility="Auto"
|
||
HorizontalScrollBarVisibility="Disabled"
|
||
Margin="0,0,8,0">
|
||
<StackPanel>
|
||
|
||
<!-- 设备状态卡片 -->
|
||
<materialDesign:Card Margin="0,0,0,8" Padding="12,8">
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="Auto" />
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="Auto" />
|
||
</Grid.ColumnDefinitions>
|
||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||
<materialDesign:PackIcon Kind="Flash"
|
||
Width="22" Height="22"
|
||
Foreground="#1565C0"
|
||
Margin="0,0,8,0"
|
||
VerticalAlignment="Center" />
|
||
<TextBlock Text="电源适应性测试 · Chroma61800"
|
||
FontSize="15" FontWeight="Bold"
|
||
VerticalAlignment="Center" />
|
||
<TextBlock Text="{Binding DeviceName, StringFormat=' [{0}]'}"
|
||
FontSize="13" Foreground="#757575"
|
||
VerticalAlignment="Center" Margin="4,0,0,0" />
|
||
</StackPanel>
|
||
<StackPanel Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center">
|
||
<Border Width="10" Height="10" CornerRadius="5" Margin="0,0,6,0">
|
||
<Border.Style>
|
||
<Style TargetType="Border">
|
||
<Setter Property="Background" Value="#F44336" />
|
||
<Style.Triggers>
|
||
<DataTrigger Binding="{Binding IsConnected}" Value="True">
|
||
<Setter Property="Background" Value="#4CAF50" />
|
||
</DataTrigger>
|
||
</Style.Triggers>
|
||
</Style>
|
||
</Border.Style>
|
||
</Border>
|
||
<TextBlock VerticalAlignment="Center" FontSize="12">
|
||
<TextBlock.Style>
|
||
<Style TargetType="TextBlock">
|
||
<Setter Property="Text" Value="未连接" />
|
||
<Setter Property="Foreground" Value="#F44336" />
|
||
<Style.Triggers>
|
||
<DataTrigger Binding="{Binding IsConnected}" Value="True">
|
||
<Setter Property="Text" Value="已连接" />
|
||
<Setter Property="Foreground" Value="#4CAF50" />
|
||
</DataTrigger>
|
||
</Style.Triggers>
|
||
</Style>
|
||
</TextBlock.Style>
|
||
</TextBlock>
|
||
<ProgressBar IsIndeterminate="True" Width="60" Height="4"
|
||
Margin="12,0,0,0"
|
||
Visibility="{Binding IsBusy, Converter={StaticResource BoolToVis}}" />
|
||
</StackPanel>
|
||
</Grid>
|
||
</materialDesign:Card>
|
||
|
||
<!-- 三相输出控制 -->
|
||
<GroupBox Header="三相输出控制" Margin="0,0,0,8"
|
||
materialDesign:ColorZoneAssist.Mode="PrimaryLight">
|
||
<StackPanel Margin="4">
|
||
<StackPanel Orientation="Horizontal" Margin="0,4">
|
||
<Button Content="开启输出" Command="{Binding OutputOnCommand}"
|
||
Style="{StaticResource CmdBtn}"
|
||
Background="#388E3C" Foreground="White" />
|
||
<Button Content="关闭输出" Command="{Binding OutputOffCommand}"
|
||
Style="{StaticResource WarnBtn}" />
|
||
<Button Content="复位" Command="{Binding ResetCommand}"
|
||
Style="{StaticResource CmdBtn}" />
|
||
<Button Content="退出远程" Command="{Binding ExitRemoteCommand}"
|
||
Style="{StaticResource CmdBtn}"
|
||
ToolTip="SYST:LOC:退出远程状态、恢复前面板操作(手册注明僅 RS-232 控制下有效)" />
|
||
<Button Content="查询 IDN" Command="{Binding QueryIdnCommand}"
|
||
Style="{StaticResource CmdBtn}" />
|
||
</StackPanel>
|
||
<StackPanel Orientation="Horizontal" Margin="0,4">
|
||
<TextBlock Text="相模式" Style="{StaticResource ParamLabel}" />
|
||
<Button Content="三相" Command="{Binding SetThreePhaseModeCommand}"
|
||
Style="{StaticResource CmdBtn}" />
|
||
<Button Content="单相" Command="{Binding SetSinglePhaseModeCommand}"
|
||
Style="{StaticResource CmdBtn}" />
|
||
</StackPanel>
|
||
<StackPanel Orientation="Horizontal" Margin="0,4">
|
||
<TextBlock Text="耦合模式" Style="{StaticResource ParamLabel}" />
|
||
<ComboBox Width="110" Height="32" FontSize="12" Margin="4,0"
|
||
ItemsSource="{Binding CouplingOptions}"
|
||
SelectedItem="{Binding CouplingMode}" />
|
||
<Button Content="应用" Command="{Binding ApplyCouplingCommand}"
|
||
Style="{StaticResource CmdBtn}" />
|
||
</StackPanel>
|
||
<StackPanel Orientation="Horizontal" Margin="0,4">
|
||
<TextBlock Text="三相关系" Style="{StaticResource ParamLabel}" />
|
||
<ComboBox Width="110" Height="32" FontSize="12" Margin="4,0"
|
||
ItemsSource="{Binding RelationOptions}"
|
||
SelectedItem="{Binding ThreePhaseRelation}" />
|
||
<Button Content="应用" Command="{Binding ApplyRelationCommand}"
|
||
Style="{StaticResource CmdBtn}" />
|
||
</StackPanel>
|
||
<StackPanel Orientation="Horizontal" Margin="0,4">
|
||
<TextBlock Text="输出继电器" Style="{StaticResource ParamLabel}" />
|
||
<Button Content="开启" Command="{Binding RelayOnCommand}"
|
||
Style="{StaticResource CmdBtn}" />
|
||
<Button Content="关闭" Command="{Binding RelayOffCommand}"
|
||
Style="{StaticResource CmdBtn}" />
|
||
</StackPanel>
|
||
</StackPanel>
|
||
</GroupBox>
|
||
|
||
<!-- 输出参数设置 -->
|
||
<GroupBox Header="输出参数设置" Margin="0,0,0,8"
|
||
materialDesign:ColorZoneAssist.Mode="PrimaryLight">
|
||
<StackPanel Margin="4">
|
||
<StackPanel Orientation="Horizontal" Margin="0,4">
|
||
<TextBlock Text="相位选择" Style="{StaticResource ParamLabel}" />
|
||
<ComboBox Width="130" Height="32" FontSize="12" Margin="4,0"
|
||
ItemsSource="{Binding PhaseOptions}"
|
||
SelectedIndex="{Binding SelectedPhaseIndex}" />
|
||
</StackPanel>
|
||
<StackPanel Orientation="Horizontal" Margin="0,4">
|
||
<TextBlock Text="电压 (V)" Style="{StaticResource ParamLabel}" />
|
||
<TextBox Style="{StaticResource NumInput}"
|
||
Text="{Binding Voltage, UpdateSourceTrigger=PropertyChanged}" />
|
||
<Button Content="设置" Command="{Binding SetVoltageCommand}"
|
||
Style="{StaticResource CmdBtn}" />
|
||
</StackPanel>
|
||
<StackPanel Orientation="Horizontal" Margin="0,4">
|
||
<TextBlock Text="频率 (Hz)" Style="{StaticResource ParamLabel}" />
|
||
<TextBox Style="{StaticResource NumInput}"
|
||
Text="{Binding Frequency, UpdateSourceTrigger=PropertyChanged}" />
|
||
<Button Content="设置" Command="{Binding SetFrequencyCommand}"
|
||
Style="{StaticResource CmdBtn}" />
|
||
</StackPanel>
|
||
<StackPanel Orientation="Horizontal" Margin="0,4">
|
||
<TextBlock Text="波形" Style="{StaticResource ParamLabel}" />
|
||
<ComboBox Width="130" Height="32" FontSize="12" Margin="4,0"
|
||
ItemsSource="{Binding WaveformOptions}"
|
||
SelectedItem="{Binding Waveform}" />
|
||
<Button Content="设置" Command="{Binding SetWaveformCommand}"
|
||
Style="{StaticResource CmdBtn}" />
|
||
</StackPanel>
|
||
</StackPanel>
|
||
</GroupBox>
|
||
|
||
<!-- LIST 模式(三相独立) -->
|
||
<GroupBox Header="LIST 模式(三相独立)" Margin="0,0,0,8"
|
||
materialDesign:ColorZoneAssist.Mode="PrimaryLight">
|
||
<StackPanel Margin="4">
|
||
<StackPanel Orientation="Horizontal" Margin="0,4">
|
||
<TextBlock Text="测试项" Style="{StaticResource ParamLabel}" />
|
||
<ComboBox Width="230" Height="32" FontSize="12" Margin="4,0"
|
||
ItemsSource="{Binding PresetOptions}"
|
||
SelectedIndex="{Binding SelectedPresetIndex}" />
|
||
<Button Content="载入" Command="{Binding LoadPresetCommand}"
|
||
Style="{StaticResource CmdBtn}" />
|
||
</StackPanel>
|
||
<StackPanel Orientation="Horizontal" Margin="0,4">
|
||
<TextBlock Text="名称" Style="{StaticResource ParamLabel}" />
|
||
<TextBox Style="{StaticResource NumInput}" Width="150"
|
||
ToolTip="保存时作为文件名(写入 D:\acp\源测试);选中已有测试项会自动填充,可改名另存"
|
||
Text="{Binding PresetName, UpdateSourceTrigger=PropertyChanged}" />
|
||
<Button Content="保存" Command="{Binding SavePresetCommand}"
|
||
Style="{StaticResource CmdBtn}"
|
||
Background="#388E3C" Foreground="White" />
|
||
<Button Content="删除" Command="{Binding DeletePresetCommand}"
|
||
Style="{StaticResource WarnBtn}"
|
||
ToolTip="删除下拉框当前选中的测试项文件(带二次确认)" />
|
||
</StackPanel>
|
||
<TextBox Margin="4,0,4,2" FontSize="11" Foreground="#1565C0"
|
||
Height="46" TextWrapping="Wrap" AcceptsReturn="True"
|
||
VerticalScrollBarVisibility="Auto" VerticalContentAlignment="Top"
|
||
ToolTip="测试项说明(随文件一并保存)"
|
||
Text="{Binding PresetNote, UpdateSourceTrigger=PropertyChanged}" />
|
||
<TextBlock Text="{Binding PresetStorageHint}"
|
||
FontSize="11" Foreground="#757575"
|
||
Margin="4,0,4,4" TextWrapping="Wrap" />
|
||
|
||
<Separator Margin="0,4" />
|
||
<StackPanel Orientation="Horizontal" Margin="0,4">
|
||
<TextBlock Text="操作模态" Style="{StaticResource ParamLabel}" />
|
||
<Button Content="FIXED 固定" Command="{Binding SetFixedModeCommand}"
|
||
Style="{StaticResource CmdBtn}" />
|
||
<Button Content="进入 LIST" Command="{Binding EnterListModeCommand}"
|
||
Style="{StaticResource CmdBtn}" />
|
||
</StackPanel>
|
||
<StackPanel Orientation="Horizontal" Margin="0,4">
|
||
<TextBlock Text="执行次数" Style="{StaticResource ParamLabel}" />
|
||
<TextBox Style="{StaticResource NumInput}" Width="60"
|
||
ToolTip="0 = 无限循环"
|
||
Text="{Binding ListCount, UpdateSourceTrigger=PropertyChanged}" />
|
||
<TextBlock Text="触发" Style="{StaticResource ParamLabel}" />
|
||
<ComboBox Width="88" Height="32" FontSize="12" Margin="4,0"
|
||
ItemsSource="{Binding ListTriggerOptions}"
|
||
SelectedItem="{Binding ListTrigger}" />
|
||
<TextBlock Text="时基" Style="{StaticResource ParamLabel}" />
|
||
<ComboBox Width="80" Height="32" FontSize="12" Margin="4,0"
|
||
ItemsSource="{Binding ListTimeBaseOptions}"
|
||
SelectedItem="{Binding ListTimeBase}" />
|
||
</StackPanel>
|
||
|
||
<Separator Margin="0,6" />
|
||
<StackPanel Orientation="Horizontal" Margin="0,4">
|
||
<TextBlock Text="编辑相位" Style="{StaticResource ParamLabel}" />
|
||
<ComboBox Width="100" Height="32" FontSize="12" Margin="4,0"
|
||
ItemsSource="{Binding ListPhaseOptions}"
|
||
SelectedIndex="{Binding ListEditPhaseIndex}" />
|
||
<TextBlock Text="该相波形" Style="{StaticResource ParamLabel}" />
|
||
<ComboBox Width="80" Height="32" FontSize="12" Margin="4,0"
|
||
ItemsSource="{Binding WaveformOptions}"
|
||
SelectedItem="{Binding ListWaveform}" />
|
||
</StackPanel>
|
||
<Button Content="复制当前相到三相(B/C 相位角自动 ±120°)"
|
||
Command="{Binding CopyPhaseToThreeCommand}"
|
||
Style="{StaticResource CmdBtn}"
|
||
HorizontalAlignment="Left" Margin="0,4" />
|
||
<TextBlock Text="序列设置(英文逗号分隔,留空则不下发;作用于上方选中的相位)"
|
||
FontSize="12" Foreground="#616161" Margin="4,2" TextWrapping="Wrap" />
|
||
<Grid Margin="0,2">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="92" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
|
||
<TextBlock Grid.Row="0" Grid.Column="0" Text="相位角度"
|
||
Style="{StaticResource ParamLabel}" />
|
||
<TextBox Grid.Row="0" Grid.Column="1" Style="{StaticResource NumInput}"
|
||
Width="240" ToolTip="LIST:DEGR,单位 °,如 0,90,0;三相基准 0/120/240"
|
||
Text="{Binding ListDegrText, UpdateSourceTrigger=PropertyChanged}" />
|
||
|
||
<TextBlock Grid.Row="1" Grid.Column="0" Text="AC起始电压"
|
||
Style="{StaticResource ParamLabel}" />
|
||
<TextBox Grid.Row="1" Grid.Column="1" Style="{StaticResource NumInput}"
|
||
Width="240" ToolTip="LIST:VOLT:AC:STAR,单位 V,如 230,11.5,230"
|
||
Text="{Binding ListVoltAcStartText, UpdateSourceTrigger=PropertyChanged}" />
|
||
|
||
<TextBlock Grid.Row="2" Grid.Column="0" Text="AC结束电压"
|
||
Style="{StaticResource ParamLabel}" />
|
||
<TextBox Grid.Row="2" Grid.Column="1" Style="{StaticResource NumInput}"
|
||
Width="240" ToolTip="LIST:VOLT:AC:END,单位 V,如 230,11.5,230"
|
||
Text="{Binding ListVoltAcEndText, UpdateSourceTrigger=PropertyChanged}" />
|
||
|
||
<TextBlock Grid.Row="3" Grid.Column="0" Text="DC起始电压"
|
||
Style="{StaticResource ParamLabel}" />
|
||
<TextBox Grid.Row="3" Grid.Column="1" Style="{StaticResource NumInput}"
|
||
Width="240" ToolTip="LIST:VOLT:DC:STAR,单位 V,如 10,10,10"
|
||
Text="{Binding ListVoltDcStartText, UpdateSourceTrigger=PropertyChanged}" />
|
||
|
||
<TextBlock Grid.Row="4" Grid.Column="0" Text="DC结束电压"
|
||
Style="{StaticResource ParamLabel}" />
|
||
<TextBox Grid.Row="4" Grid.Column="1" Style="{StaticResource NumInput}"
|
||
Width="240" ToolTip="LIST:VOLT:DC:END,单位 V,如 10,10,10"
|
||
Text="{Binding ListVoltDcEndText, UpdateSourceTrigger=PropertyChanged}" />
|
||
|
||
<TextBlock Grid.Row="5" Grid.Column="0" Text="起始频率"
|
||
Style="{StaticResource ParamLabel}" />
|
||
<TextBox Grid.Row="5" Grid.Column="1" Style="{StaticResource NumInput}"
|
||
Width="240" ToolTip="LIST:FREQ:STAR,单位 Hz,如 50,50,50"
|
||
Text="{Binding ListFreqStartText, UpdateSourceTrigger=PropertyChanged}" />
|
||
|
||
<TextBlock Grid.Row="6" Grid.Column="0" Text="结束频率"
|
||
Style="{StaticResource ParamLabel}" />
|
||
<TextBox Grid.Row="6" Grid.Column="1" Style="{StaticResource NumInput}"
|
||
Width="240" ToolTip="LIST:FREQ:END,单位 Hz,如 50,50,50"
|
||
Text="{Binding ListFreqEndText, UpdateSourceTrigger=PropertyChanged}" />
|
||
|
||
<TextBlock Grid.Row="7" Grid.Column="0" Text="静止时间"
|
||
Style="{StaticResource ParamLabel}" />
|
||
<TextBox Grid.Row="7" Grid.Column="1" Style="{StaticResource NumInput}"
|
||
Width="240" ToolTip="LIST:DWEL,单位 ms,如 20000,280,20000"
|
||
Text="{Binding ListDwellText, UpdateSourceTrigger=PropertyChanged}" />
|
||
|
||
<TextBlock Grid.Row="8" Grid.Column="0" Text="波形顺序"
|
||
Style="{StaticResource ParamLabel}" />
|
||
<TextBox Grid.Row="8" Grid.Column="1" Style="{StaticResource NumInput}"
|
||
Width="240" ToolTip="LIST:SHAP,A / B 序列,如 A,A,A(可留空)"
|
||
Text="{Binding ListShapeText, UpdateSourceTrigger=PropertyChanged}" />
|
||
</Grid>
|
||
|
||
<Separator Margin="0,6" />
|
||
<StackPanel Orientation="Horizontal" Margin="0,4">
|
||
<Button Content="下发三相并启动 LIST" Command="{Binding DownloadThreePhaseListCommand}"
|
||
Style="{StaticResource CmdBtn}"
|
||
Background="#388E3C" Foreground="White" />
|
||
<Button Content="停止 LIST" Command="{Binding ListStopCommand}"
|
||
Style="{StaticResource WarnBtn}" />
|
||
</StackPanel>
|
||
</StackPanel>
|
||
</GroupBox>
|
||
|
||
<!-- SYNTHESIS 自定义谐波波形输出 -->
|
||
<GroupBox Header="SYNTHESIS 波形输出(自定义谐波)" Margin="0,0,0,8"
|
||
materialDesign:ColorZoneAssist.Mode="PrimaryLight">
|
||
<StackPanel Margin="4">
|
||
<StackPanel Orientation="Horizontal" Margin="0,4">
|
||
<TextBlock Text="波形文件" Style="{StaticResource ParamLabel}" />
|
||
<ComboBox Width="210" Height="32" FontSize="12" Margin="4,0"
|
||
ItemsSource="{Binding SynthPresetOptions}"
|
||
SelectedIndex="{Binding SelectedSynthPresetIndex}" />
|
||
<Button Content="载入" Command="{Binding LoadSynthPresetCommand}"
|
||
Style="{StaticResource CmdBtn}" />
|
||
</StackPanel>
|
||
<StackPanel Orientation="Horizontal" Margin="0,4">
|
||
<TextBlock Text="名称" Style="{StaticResource ParamLabel}" />
|
||
<TextBox Style="{StaticResource NumInput}" Width="150"
|
||
ToolTip="保存时作为文件名(写入 D:\acp\源测试\合成波形);选中已有波形会自动填充,可改名另存"
|
||
Text="{Binding SynthPresetName, UpdateSourceTrigger=PropertyChanged}" />
|
||
<Button Content="保存" Command="{Binding SaveSynthPresetCommand}"
|
||
Style="{StaticResource CmdBtn}"
|
||
Background="#388E3C" Foreground="White" />
|
||
<Button Content="删除" Command="{Binding DeleteSynthPresetCommand}"
|
||
Style="{StaticResource WarnBtn}"
|
||
ToolTip="删除下拉框当前选中的波形文件(带二次确认)" />
|
||
</StackPanel>
|
||
<TextBox Margin="4,0,4,2" FontSize="11" Foreground="#1565C0"
|
||
Height="40" TextWrapping="Wrap" AcceptsReturn="True"
|
||
VerticalScrollBarVisibility="Auto" VerticalContentAlignment="Top"
|
||
ToolTip="波形说明(随文件一并保存)"
|
||
Text="{Binding SynthPresetNote, UpdateSourceTrigger=PropertyChanged}" />
|
||
<TextBlock Text="{Binding SynthStorageHint}"
|
||
FontSize="11" Foreground="#757575"
|
||
Margin="4,0,4,4" TextWrapping="Wrap" />
|
||
|
||
<Separator Margin="0,4" />
|
||
<StackPanel Orientation="Horizontal" Margin="0,4">
|
||
<TextBlock Text="数据格式" Style="{StaticResource ParamLabel}" />
|
||
<ComboBox Width="120" Height="32" FontSize="12" Margin="4,0"
|
||
ToolTip="SYNT:COMP,VALUE=绝对值 / PERCENT=基频百分率,后缀 1/2/3 为三段波形"
|
||
ItemsSource="{Binding SynthComposeOptions}"
|
||
SelectedItem="{Binding SynthCompose}" />
|
||
<TextBlock Text="基频" Style="{StaticResource ParamLabel}" />
|
||
<ComboBox Width="70" Height="32" FontSize="12" Margin="4,0"
|
||
ToolTip="SYNT:FREQ,仅支持 50 / 60 Hz"
|
||
ItemsSource="{Binding SynthFrequencyOptions}"
|
||
SelectedItem="{Binding SynthFrequency}" />
|
||
</StackPanel>
|
||
<StackPanel Orientation="Horizontal" Margin="0,4">
|
||
<TextBlock Text="基波电压" Style="{StaticResource ParamLabel}" />
|
||
<TextBox Style="{StaticResource NumInput}"
|
||
ToolTip="SYNT:FUND,基波交流电压,单位 V,0.0 ~ 300.0"
|
||
Text="{Binding SynthFundamental, UpdateSourceTrigger=PropertyChanged}" />
|
||
<TextBlock Text="V" VerticalAlignment="Center" Margin="2,0,10,0" />
|
||
<TextBlock Text="直流" Style="{StaticResource ParamLabel}" />
|
||
<TextBox Style="{StaticResource NumInput}"
|
||
ToolTip="SYNT:DC,叠加直流电压,单位 V,-424.2 ~ 424.2"
|
||
Text="{Binding SynthDc, UpdateSourceTrigger=PropertyChanged}" />
|
||
<TextBlock Text="V" VerticalAlignment="Center" Margin="2,0,0,0" />
|
||
</StackPanel>
|
||
<StackPanel Orientation="Horizontal" Margin="0,4">
|
||
<TextBlock Text="起始相位" Style="{StaticResource ParamLabel}" />
|
||
<TextBox Style="{StaticResource NumInput}"
|
||
ToolTip="SYNT:SPH,起始相位角,单位 °,0.0 ~ 359.9"
|
||
Text="{Binding SynthStartPhase, UpdateSourceTrigger=PropertyChanged}" />
|
||
<TextBlock Text="°" VerticalAlignment="Center" Margin="2,0,0,0" />
|
||
</StackPanel>
|
||
<TextBlock Text="谐波振幅(SYNT:AMPL,英文逗号分隔,首值=2次谐波,依次 3/4/5…最多 50 阶,留空不下发)"
|
||
FontSize="11" Foreground="#616161" Margin="4,4,4,2" TextWrapping="Wrap" />
|
||
<TextBox Style="{StaticResource NumInput}" Width="380" HorizontalAlignment="Left" Margin="4,0"
|
||
ToolTip="如 0,10,0,5 表示 2次=0、3次=10、4次=0、5次=5(VALUE 为绝对值 V,PERCENT 为基波百分率)"
|
||
Text="{Binding SynthAmplitudeText, UpdateSourceTrigger=PropertyChanged}" />
|
||
<TextBlock Text="谐波相位(SYNT:PHAS,英文逗号分隔,与振幅逐阶对应,单位 °,0~359.9,留空不下发)"
|
||
FontSize="11" Foreground="#616161" Margin="4,4,4,2" TextWrapping="Wrap" />
|
||
<TextBox Style="{StaticResource NumInput}" Width="380" HorizontalAlignment="Left" Margin="4,0"
|
||
ToolTip="如 0,180,90 与振幅序列逐阶对应"
|
||
Text="{Binding SynthPhaseText, UpdateSourceTrigger=PropertyChanged}" />
|
||
<Separator Margin="0,6" />
|
||
<StackPanel Orientation="Horizontal" Margin="0,4">
|
||
<Button Content="下发并启动 SYNTH" Command="{Binding DownloadSynthesisCommand}"
|
||
Style="{StaticResource CmdBtn}"
|
||
Background="#388E3C" Foreground="White" />
|
||
<Button Content="停止 SYNTH" Command="{Binding SynthStopCommand}"
|
||
Style="{StaticResource WarnBtn}" />
|
||
</StackPanel>
|
||
</StackPanel>
|
||
</GroupBox>
|
||
|
||
<!-- 日志 -->
|
||
<GroupBox Header="日志" materialDesign:ColorZoneAssist.Mode="PrimaryLight">
|
||
<ScrollViewer Height="150" VerticalScrollBarVisibility="Auto">
|
||
<TextBox Text="{Binding ResponseLog, Mode=OneWay}"
|
||
IsReadOnly="True" TextWrapping="Wrap"
|
||
FontSize="11" FontFamily="Consolas"
|
||
Background="#FAFAFA" BorderThickness="0"
|
||
VerticalAlignment="Top" />
|
||
</ScrollViewer>
|
||
</GroupBox>
|
||
</StackPanel>
|
||
</ScrollViewer>
|
||
</Grid>
|
||
</Border>
|
||
</UserControl>
|