2026-07-01 20:04:27 +08:00
|
|
|
<UserControl x:Class="SSPCTester.UI.Views.SettingsManualView"
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:vm="clr-namespace:SSPCTester.UI.ViewModels"
|
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
mc:Ignorable="d"
|
|
|
|
|
d:DataContext="{d:DesignInstance Type=vm:SettingsViewModel}">
|
|
|
|
|
<Grid Margin="10">
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="34" />
|
2026-07-03 14:16:15 +08:00
|
|
|
<RowDefinition Height="252" />
|
|
|
|
|
<RowDefinition Height="320" />
|
2026-07-01 20:04:27 +08:00
|
|
|
<RowDefinition Height="90" />
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
|
|
<Grid Grid.Row="0">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<TextBlock Text="系统设置" FontSize="{StaticResource FsH1}" FontWeight="Bold" VerticalAlignment="Center" />
|
|
|
|
|
<Button Grid.Column="1" Content="返回" Command="{Binding CloseCommand}" Padding="16,0" />
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
<Border Grid.Row="1" Style="{StaticResource Card}" Padding="12" Margin="0,0,0,8">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="Auto" />
|
2026-07-03 14:16:15 +08:00
|
|
|
<RowDefinition Height="36" />
|
|
|
|
|
<RowDefinition Height="36" />
|
|
|
|
|
<RowDefinition Height="36" />
|
|
|
|
|
<RowDefinition Height="36" />
|
|
|
|
|
<RowDefinition Height="38" />
|
2026-07-01 20:04:27 +08:00
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<TextBlock Grid.Row="0" Style="{StaticResource CardTitle}" Margin="0,0,0,6" Text="设备连接配置" />
|
|
|
|
|
|
2026-07-03 14:16:15 +08:00
|
|
|
<Grid Grid.Row="1" Margin="0,0,0,5">
|
2026-07-01 20:04:27 +08:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="120" />
|
|
|
|
|
<ColumnDefinition Width="150" />
|
|
|
|
|
<ColumnDefinition Width="90" />
|
|
|
|
|
<ColumnDefinition Width="90" />
|
|
|
|
|
<ColumnDefinition Width="90" />
|
|
|
|
|
<ColumnDefinition Width="90" />
|
|
|
|
|
<ColumnDefinition Width="130" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<TextBlock Text="SSPC Modbus" FontWeight="SemiBold" VerticalAlignment="Center" />
|
|
|
|
|
<ComboBox Grid.Column="1" ItemsSource="{Binding PortNames}" Text="{Binding Devices.Sspc.PortName, UpdateSourceTrigger=PropertyChanged}" IsEditable="True" SelectionChanged="DraftChanged" />
|
|
|
|
|
<TextBox Grid.Column="2" Margin="8,0,0,0" Text="{Binding Devices.Sspc.BaudRate, UpdateSourceTrigger=PropertyChanged}" FontFamily="{StaticResource FontMono}" TextChanged="DraftChanged" />
|
|
|
|
|
<CheckBox Grid.Column="3" Margin="10,0,0,0" Content="Mock" IsChecked="{Binding Devices.Sspc.UseMock}" Click="DraftChanged" />
|
|
|
|
|
<CheckBox Grid.Column="4" Margin="10,0,0,0" Content="自连" IsChecked="{Binding Devices.Sspc.AutoConnect}" Click="DraftChanged" />
|
|
|
|
|
<Button Grid.Column="5" Margin="8,0,0,0" Content="测试" Command="{Binding TestSspcCommand}" />
|
|
|
|
|
<Button Grid.Column="6" Margin="8,0,0,0" Content="断开" Command="{Binding DisconnectSspcCommand}" />
|
|
|
|
|
<TextBlock Grid.Column="7" Margin="10,0,0,0" Text="{Binding SspcStatus}" VerticalAlignment="Center" />
|
|
|
|
|
</Grid>
|
|
|
|
|
|
2026-07-03 14:16:15 +08:00
|
|
|
<Grid Grid.Row="2" Margin="0,0,0,5">
|
2026-07-01 20:04:27 +08:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="120" />
|
|
|
|
|
<ColumnDefinition Width="220" />
|
|
|
|
|
<ColumnDefinition Width="80" />
|
|
|
|
|
<ColumnDefinition Width="90" />
|
|
|
|
|
<ColumnDefinition Width="90" />
|
|
|
|
|
<ColumnDefinition Width="90" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<TextBlock Text="电源 UDP5080" FontWeight="SemiBold" VerticalAlignment="Center" />
|
|
|
|
|
<TextBox Grid.Column="1" Text="{Binding Devices.PowerSupply.Host, UpdateSourceTrigger=PropertyChanged}" FontFamily="{StaticResource FontMono}" TextChanged="DraftChanged" />
|
|
|
|
|
<TextBox Grid.Column="2" Margin="8,0,0,0" Text="{Binding Devices.PowerSupply.Port, UpdateSourceTrigger=PropertyChanged}" FontFamily="{StaticResource FontMono}" TextChanged="DraftChanged" />
|
|
|
|
|
<CheckBox Grid.Column="3" Margin="10,0,0,0" Content="Mock" IsChecked="{Binding Devices.PowerSupply.UseMock}" Click="DraftChanged" />
|
|
|
|
|
<CheckBox Grid.Column="4" Margin="10,0,0,0" Content="自连" IsChecked="{Binding Devices.PowerSupply.AutoConnect}" Click="DraftChanged" />
|
|
|
|
|
<Button Grid.Column="5" Margin="8,0,0,0" Content="测试" Command="{Binding TestPowerCommand}" />
|
|
|
|
|
<TextBlock Grid.Column="6" Margin="10,0,0,0" Text="{Binding PowerStatus}" VerticalAlignment="Center" />
|
|
|
|
|
</Grid>
|
|
|
|
|
|
2026-07-03 14:16:15 +08:00
|
|
|
<Grid Grid.Row="3" Margin="0,0,0,5">
|
2026-07-01 20:04:27 +08:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="120" />
|
|
|
|
|
<ColumnDefinition Width="220" />
|
|
|
|
|
<ColumnDefinition Width="80" />
|
|
|
|
|
<ColumnDefinition Width="90" />
|
|
|
|
|
<ColumnDefinition Width="90" />
|
|
|
|
|
<ColumnDefinition Width="90" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<TextBlock Text="负载 IT8702P" FontWeight="SemiBold" VerticalAlignment="Center" />
|
|
|
|
|
<TextBox Grid.Column="1" Text="{Binding Devices.Load.Host, UpdateSourceTrigger=PropertyChanged}" FontFamily="{StaticResource FontMono}" TextChanged="DraftChanged" />
|
|
|
|
|
<TextBox Grid.Column="2" Margin="8,0,0,0" Text="{Binding Devices.Load.Port, UpdateSourceTrigger=PropertyChanged}" FontFamily="{StaticResource FontMono}" TextChanged="DraftChanged" />
|
|
|
|
|
<CheckBox Grid.Column="3" Margin="10,0,0,0" Content="Mock" IsChecked="{Binding Devices.Load.UseMock}" Click="DraftChanged" />
|
|
|
|
|
<CheckBox Grid.Column="4" Margin="10,0,0,0" Content="自连" IsChecked="{Binding Devices.Load.AutoConnect}" Click="DraftChanged" />
|
|
|
|
|
<Button Grid.Column="5" Margin="8,0,0,0" Content="测试" Command="{Binding TestLoadCommand}" />
|
|
|
|
|
<TextBlock Grid.Column="6" Margin="10,0,0,0" Text="{Binding LoadStatus}" VerticalAlignment="Center" />
|
|
|
|
|
</Grid>
|
|
|
|
|
|
2026-07-03 14:16:15 +08:00
|
|
|
<Grid Grid.Row="4" Margin="0,0,0,5">
|
2026-07-01 20:04:27 +08:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="120" />
|
|
|
|
|
<ColumnDefinition Width="260" />
|
|
|
|
|
<ColumnDefinition Width="90" />
|
|
|
|
|
<ColumnDefinition Width="90" />
|
|
|
|
|
<ColumnDefinition Width="90" />
|
|
|
|
|
<ColumnDefinition Width="90" />
|
|
|
|
|
<ColumnDefinition Width="90" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<TextBlock Text="PCIe8586" FontWeight="SemiBold" VerticalAlignment="Center" />
|
|
|
|
|
<ComboBox Grid.Column="1" ItemsSource="{Binding DaqDevices}" SelectedValuePath="LogicalId" SelectedValue="{Binding SelectedDaqLogicalId, UpdateSourceTrigger=PropertyChanged}" SelectionChanged="DraftChanged" />
|
|
|
|
|
<CheckBox Grid.Column="2" Margin="10,0,0,0" Content="Mock" IsChecked="{Binding Devices.Daq.UseMock}" Click="DraftChanged" />
|
|
|
|
|
<CheckBox Grid.Column="3" Margin="10,0,0,0" Content="自连" IsChecked="{Binding Devices.Daq.AutoConnect}" Click="DraftChanged" />
|
|
|
|
|
<Button Grid.Column="4" Margin="8,0,0,0" Content="刷新" Command="{Binding RefreshDaqDevicesCommand}" />
|
|
|
|
|
<Button Grid.Column="5" Margin="8,0,0,0" Content="测试" Command="{Binding TestDaqCommand}" />
|
|
|
|
|
<Button Grid.Column="6" Margin="8,0,0,0" Content="断开" Command="{Binding DisconnectDaqCommand}" />
|
|
|
|
|
<TextBlock Grid.Column="7" Margin="10,0,0,0" Text="{Binding DaqStatus}" VerticalAlignment="Center" />
|
|
|
|
|
</Grid>
|
|
|
|
|
|
2026-07-03 14:16:15 +08:00
|
|
|
<Grid Grid.Row="5" Margin="0,0,74,0">
|
2026-07-01 20:04:27 +08:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="90" />
|
|
|
|
|
<ColumnDefinition Width="48" />
|
|
|
|
|
<ColumnDefinition Width="60" />
|
2026-07-03 14:16:15 +08:00
|
|
|
<ColumnDefinition Width="239" />
|
|
|
|
|
<ColumnDefinition Width="237" />
|
|
|
|
|
<ColumnDefinition Width="67" />
|
|
|
|
|
<ColumnDefinition Width="66" />
|
|
|
|
|
<ColumnDefinition Width="71" />
|
|
|
|
|
<ColumnDefinition Width="93" />
|
|
|
|
|
<ColumnDefinition />
|
2026-07-01 20:04:27 +08:00
|
|
|
</Grid.ColumnDefinitions>
|
2026-07-03 14:16:15 +08:00
|
|
|
<TextBlock FontWeight="SemiBold" VerticalAlignment="Center" Height="18" ><Run Language="zh-cn" Text="报警、急停"/></TextBlock>
|
|
|
|
|
<TextBlock Grid.Column="1" Text="设备ID" Style="{StaticResource FieldLabel}" Margin="8,0,4,0" Height="16" />
|
|
|
|
|
<TextBox Grid.Column="2" Text="{Binding Devices.Pci2312.DeviceId, UpdateSourceTrigger=PropertyChanged}" FontFamily="{StaticResource FontMono}" TextChanged="DraftChanged" Margin="0,4,0,4" />
|
|
|
|
|
<Border Grid.Column="3" Margin="8,0,4,0" Padding="8,0"
|
|
|
|
|
Background="{StaticResource NeutralSoftBrush}" CornerRadius="{StaticResource RadiusSm}">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="40" />
|
|
|
|
|
<ColumnDefinition Width="74" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<TextBlock Text="急停" FontWeight="SemiBold" VerticalAlignment="Center" />
|
|
|
|
|
<ComboBox Grid.Column="1" ItemsSource="{Binding Pci2312Channels}" SelectedItem="{Binding Devices.Pci2312.EmergencyInputChannel}" SelectionChanged="DraftChanged" />
|
|
|
|
|
<CheckBox Grid.Column="2" Margin="8,0,0,0" Content="DI高有效" IsChecked="{Binding Devices.Pci2312.EmergencyInputActiveHigh}" Click="DraftChanged" />
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
<Border Grid.Column="4" Margin="4,0,4,0" Padding="8,0"
|
|
|
|
|
Background="{StaticResource NeutralSoftBrush}" CornerRadius="{StaticResource RadiusSm}">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="40" />
|
|
|
|
|
<ColumnDefinition Width="74" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<TextBlock Text="报警" FontWeight="SemiBold" VerticalAlignment="Center" />
|
|
|
|
|
<ComboBox Grid.Column="1" ItemsSource="{Binding Pci2312Channels}" SelectedItem="{Binding Devices.Pci2312.AlarmOutputChannel}" SelectionChanged="DraftChanged" />
|
|
|
|
|
<CheckBox Grid.Column="2" Margin="8,0,0,0" Content="DO高有效" IsChecked="{Binding Devices.Pci2312.AlarmOutputActiveHigh}" Click="DraftChanged" />
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
<CheckBox Grid.Column="5" Margin="10,0,0,0" Content="启用" IsChecked="{Binding Devices.Pci2312.Enabled}" Click="DraftChanged" />
|
|
|
|
|
<CheckBox Grid.Column="6" Margin="10,0,0,0" Content="Mock" IsChecked="{Binding Devices.Pci2312.UseMock}" Click="DraftChanged" />
|
|
|
|
|
<CheckBox Grid.Column="7" Margin="10,0,0,0" Content="自连" IsChecked="{Binding Devices.Pci2312.AutoConnect}" Click="DraftChanged" />
|
|
|
|
|
<Button Grid.Column="8" Margin="8,4,0,4" Content="测试" Command="{Binding TestPci2312Command}" />
|
|
|
|
|
<TextBlock Grid.Column="9" Margin="10,0,0,0" Text="{Binding Pci2312Status}" VerticalAlignment="Center" Height="18" />
|
2026-07-01 20:04:27 +08:00
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<Border Grid.Row="2" Style="{StaticResource Card}" Padding="12" Margin="0,0,0,8">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
<RowDefinition Height="32" />
|
|
|
|
|
<RowDefinition Height="24" />
|
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<TextBlock Grid.Row="0" Style="{StaticResource CardTitle}" Margin="0,0,0,6" Text="采集参数和通道角色" />
|
|
|
|
|
|
|
|
|
|
<Grid Grid.Row="1" Margin="0,0,0,3">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="70" />
|
|
|
|
|
<ColumnDefinition Width="90" />
|
|
|
|
|
<ColumnDefinition Width="48" />
|
|
|
|
|
<ColumnDefinition Width="120" />
|
|
|
|
|
<ColumnDefinition Width="56" />
|
|
|
|
|
<ColumnDefinition Width="110" />
|
|
|
|
|
<ColumnDefinition Width="80" />
|
|
|
|
|
<ColumnDefinition Width="95" />
|
|
|
|
|
<ColumnDefinition Width="80" />
|
|
|
|
|
<ColumnDefinition Width="95" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<TextBlock Text="通道数" Style="{StaticResource FieldLabel}" />
|
|
|
|
|
<ComboBox Grid.Column="1" ItemsSource="{Binding DaqChannelCounts}" SelectedItem="{Binding Devices.Daq.ChannelCount}" SelectionChanged="DraftChanged" />
|
|
|
|
|
<TextBlock Grid.Column="2" Text="量程" Style="{StaticResource FieldLabel}" Margin="14,0,6,0" />
|
|
|
|
|
<ComboBox Grid.Column="3" ItemsSource="{Binding DaqInputRanges}" SelectedItem="{Binding Devices.Daq.InputRange}" SelectionChanged="DraftChanged" />
|
|
|
|
|
<TextBlock Grid.Column="4" Text="分频" Style="{StaticResource FieldLabel}" Margin="14,0,6,0" />
|
|
|
|
|
<ComboBox Grid.Column="5" ItemsSource="{Binding DaqClockDividerOptions}" SelectedItem="{Binding Devices.Daq.ClockDivider, UpdateSourceTrigger=PropertyChanged}" Text="{Binding Devices.Daq.ClockDivider, UpdateSourceTrigger=PropertyChanged}" IsEditable="True" SelectionChanged="DraftChanged" />
|
|
|
|
|
<TextBlock Grid.Column="6" Text="前置(ms)" Style="{StaticResource FieldLabel}" Margin="14,0,6,0" />
|
|
|
|
|
<TextBox Grid.Column="7" Text="{Binding Devices.Daq.PreTriggerMs, UpdateSourceTrigger=PropertyChanged}" TextChanged="DraftChanged" FontFamily="{StaticResource FontMono}" />
|
|
|
|
|
<TextBlock Grid.Column="8" Text="后置(ms)" Style="{StaticResource FieldLabel}" Margin="14,0,6,0" />
|
|
|
|
|
<TextBox Grid.Column="9" Text="{Binding Devices.Daq.PostTriggerMs, UpdateSourceTrigger=PropertyChanged}" TextChanged="DraftChanged" FontFamily="{StaticResource FontMono}" />
|
|
|
|
|
<TextBlock Grid.Column="10" Margin="12,0,0,0" VerticalAlignment="Center" Text="{Binding DaqActualSampleRateHz, StringFormat=实际采样率 {0:N0} Hz}" />
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
<TextBlock Grid.Row="2" Text="{Binding DaqValidationMessage}" Foreground="{StaticResource TextSecondaryBrush}" VerticalAlignment="Center" />
|
|
|
|
|
|
|
|
|
|
<ItemsControl Grid.Row="3" ItemsSource="{Binding DaqChannelEditors}">
|
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<Grid Height="30" Margin="0">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="52" />
|
|
|
|
|
<ColumnDefinition Width="64" />
|
|
|
|
|
<ColumnDefinition Width="170" />
|
|
|
|
|
<ColumnDefinition Width="170" />
|
|
|
|
|
<ColumnDefinition Width="120" />
|
|
|
|
|
<ColumnDefinition Width="120" />
|
|
|
|
|
<ColumnDefinition Width="110" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<TextBlock Text="{Binding ChannelName}" FontWeight="SemiBold" VerticalAlignment="Center" />
|
|
|
|
|
<CheckBox Grid.Column="1" Content="启用" IsChecked="{Binding IsEnabled}" IsHitTestVisible="False" Focusable="False" />
|
|
|
|
|
<ComboBox Grid.Column="2" ItemsSource="{Binding DataContext.DaqRoleOptions, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" DisplayMemberPath="Name" SelectedValuePath="Value" SelectedValue="{Binding Role, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
|
|
<TextBox Grid.Column="3" Margin="8,0,0,0" Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TextChanged="DraftChanged" />
|
|
|
|
|
<TextBox Grid.Column="4" Margin="8,0,0,0" Text="{Binding Scale, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TextChanged="DraftChanged" FontFamily="{StaticResource FontMono}" />
|
|
|
|
|
<TextBox Grid.Column="5" Margin="8,0,0,0" Text="{Binding Offset, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TextChanged="DraftChanged" FontFamily="{StaticResource FontMono}" />
|
|
|
|
|
<CheckBox Grid.Column="6" Margin="10,0,0,0" Content="已标定" IsChecked="{Binding IsCalibrated, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Click="DraftChanged" />
|
|
|
|
|
<Border Grid.Column="7" Margin="8,14,0,0" Height="1" Background="{StaticResource BorderSubtleBrush}" />
|
|
|
|
|
</Grid>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
|
</ItemsControl>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<Grid Grid.Row="3">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
<ColumnDefinition Width="16" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<Border Style="{StaticResource Card}" Padding="12" Visibility="Hidden">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
<RowDefinition Height="36" />
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<TextBlock Style="{StaticResource CardTitle}" Margin="0,0,0,6" Text="报告设置" />
|
|
|
|
|
<Grid Grid.Row="1">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="70" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
<ColumnDefinition Width="90" />
|
|
|
|
|
<ColumnDefinition Width="70" />
|
|
|
|
|
<ColumnDefinition Width="80" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<TextBlock Text="路径" Style="{StaticResource FieldLabel}" />
|
|
|
|
|
<TextBox Grid.Column="1" Text="{Binding Report.SavePath, UpdateSourceTrigger=PropertyChanged}" TextChanged="DraftChanged" FontFamily="{StaticResource FontMono}" />
|
|
|
|
|
<ComboBox Grid.Column="2" Margin="8,0,0,0" ItemsSource="{Binding ReportFormatOptions}" SelectedItem="{Binding Report.Format}" SelectionChanged="DraftChanged" />
|
|
|
|
|
<Button Grid.Column="3" Margin="8,0,0,0" Content="浏览" Command="{Binding BrowseReportsCommand}" />
|
|
|
|
|
<Button Grid.Column="4" Margin="8,0,0,0" Content="打开" Command="{Binding OpenReportsDirectoryCommand}" />
|
|
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<Border Style="{StaticResource Card}" Padding="12" Grid.ColumnSpan="3">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
<RowDefinition Height="36" />
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<TextBlock Style="{StaticResource CardTitle}" Margin="0,0,0,6" Text="项目数据路径" />
|
|
|
|
|
<Grid Grid.Row="1">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="70" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
<ColumnDefinition Width="70" />
|
2026-07-08 00:25:45 +08:00
|
|
|
<ColumnDefinition Width="92" />
|
2026-07-01 20:04:27 +08:00
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<TextBlock Text="根目录" Style="{StaticResource FieldLabel}" />
|
|
|
|
|
<TextBox Grid.Column="1" Text="{Binding Storage.ProjectsRoot, UpdateSourceTrigger=PropertyChanged}" TextChanged="DraftChanged" FontFamily="{StaticResource FontMono}" />
|
2026-07-08 00:25:45 +08:00
|
|
|
<Button Grid.Column="2" Margin="8,0,0,0" Content="设置" Command="{Binding BrowseProjectsCommand}" />
|
|
|
|
|
<Button Grid.Column="3" Margin="8,0,0,0" Content="刷新工程" Command="{Binding RefreshProjectsCommand}" />
|
2026-07-01 20:04:27 +08:00
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
<Grid Grid.Row="4" Margin="0,8,0,0">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<TextBlock VerticalAlignment="Center" Foreground="{StaticResource WarningBrush}" Text="有未保存设置" Visibility="{Binding HasUnsavedChanges, Converter={StaticResource BoolToVis}}" />
|
|
|
|
|
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
|
|
|
|
<Button Content="刷新串口" Command="{Binding RefreshPortsCommand}" Margin="0,0,8,0" />
|
|
|
|
|
<Button Content="重新连接" Command="{Binding ReconnectAllCommand}" Margin="0,0,8,0" />
|
|
|
|
|
<Button Style="{StaticResource PrimaryButton}" Content="保存设置" Command="{Binding SaveSettingsCommand}" />
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
|
|
|
|
</UserControl>
|