320 lines
26 KiB
Plaintext
320 lines
26 KiB
Plaintext
|
|
<UserControl x:Class="SSPCTester.UI.Views.SettingsView"
|
|||
|
|
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:cfg="clr-namespace:SSPCTester.Devices.Config;assembly=SSPCTester.Devices"
|
|||
|
|
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}">
|
|||
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto" Padding="24">
|
|||
|
|
<StackPanel>
|
|||
|
|
<Grid Margin="0,0,0,16">
|
|||
|
|
<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="14,7" />
|
|||
|
|
</Grid>
|
|||
|
|
<Border Style="{StaticResource Card}" RenderTransformOrigin="0.5,0.491">
|
|||
|
|
<StackPanel>
|
|||
|
|
<TextBlock Style="{StaticResource CardTitle}" Text="设备连接配置" />
|
|||
|
|
<Border BorderBrush="{StaticResource BorderSubtleBrush}" BorderThickness="0,0,0,1" Padding="0,4,0,14" Margin="0,0,0,12" Height="55">
|
|||
|
|
<StackPanel>
|
|||
|
|
<Grid Margin="0,0,0,8">
|
|||
|
|
<Grid.ColumnDefinitions>
|
|||
|
|
<ColumnDefinition Width="120" />
|
|||
|
|
<ColumnDefinition Width="160" />
|
|||
|
|
<ColumnDefinition Width="100" />
|
|||
|
|
<ColumnDefinition Width="100" />
|
|||
|
|
<ColumnDefinition Width="100" />
|
|||
|
|
<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="SettingChanged" />
|
|||
|
|
<TextBox Grid.Column="2" Text="{Binding Devices.Sspc.BaudRate, UpdateSourceTrigger=PropertyChanged}" Margin="8,0,0,0"
|
|||
|
|
FontFamily="{StaticResource FontMono}" TextChanged="SettingChanged" />
|
|||
|
|
<Button Grid.Column="3" Margin="8,0,0,0" Content="连接/测试" Command="{Binding TestSspcCommand}" />
|
|||
|
|
<Button Grid.Column="4" Margin="8,0,0,0" Content="断开" Command="{Binding DisconnectSspcCommand}" />
|
|||
|
|
<TextBlock Grid.Column="5" Margin="10,0,0,0" Text="{Binding SspcStatus}" VerticalAlignment="Center" />
|
|||
|
|
</Grid>
|
|||
|
|
<WrapPanel Visibility="Hidden">
|
|||
|
|
<CheckBox Content="使用 Mock" IsChecked="{Binding Devices.Sspc.UseMock}" Click="SettingChanged" Margin="0,0,18,0" />
|
|||
|
|
<CheckBox Content="启动自动连接" IsChecked="{Binding Devices.Sspc.AutoConnect}" Click="SettingChanged" Margin="0,0,18,0" />
|
|||
|
|
<CheckBox Content="断开时全部关断" IsChecked="{Binding Devices.Sspc.CloseAllRelaysOnDisconnect}" Click="SettingChanged" Margin="0,0,18,0" />
|
|||
|
|
<CheckBox Content="记录原始帧" IsChecked="{Binding Devices.Sspc.LogRawFrames}" Click="SettingChanged" />
|
|||
|
|
</WrapPanel>
|
|||
|
|
<Grid Margin="0,8,0,0" Visibility="Hidden">
|
|||
|
|
<Grid.ColumnDefinitions>
|
|||
|
|
<ColumnDefinition Width="120" />
|
|||
|
|
<ColumnDefinition Width="*" />
|
|||
|
|
<ColumnDefinition Width="80" />
|
|||
|
|
<ColumnDefinition Width="80" />
|
|||
|
|
<ColumnDefinition Width="80" />
|
|||
|
|
<ColumnDefinition Width="80" />
|
|||
|
|
<ColumnDefinition Width="80" />
|
|||
|
|
</Grid.ColumnDefinitions>
|
|||
|
|
<TextBlock Text="设备 Profile" VerticalAlignment="Center" />
|
|||
|
|
<TextBox Grid.Column="1" Text="{Binding Devices.Sspc.DeviceProfilePath, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
FontFamily="{StaticResource FontMono}" TextChanged="SettingChanged" />
|
|||
|
|
<TextBox Grid.Column="2" Margin="8,0,0,0" Text="{Binding Devices.Sspc.DataBits, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
ToolTip="数据位" TextChanged="SettingChanged" />
|
|||
|
|
<TextBox Grid.Column="3" Margin="8,0,0,0" Text="{Binding Devices.Sspc.Parity, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
ToolTip="校验" TextChanged="SettingChanged" />
|
|||
|
|
<TextBox Grid.Column="4" Margin="8,0,0,0" Text="{Binding Devices.Sspc.StopBits, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
ToolTip="停止位" TextChanged="SettingChanged" />
|
|||
|
|
<TextBox Grid.Column="5" Margin="8,0,0,0" Text="{Binding Devices.Sspc.ReadTimeoutMs, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
ToolTip="超时(ms)" TextChanged="SettingChanged" />
|
|||
|
|
<TextBox Grid.Column="6" Margin="8,0,0,0" Text="{Binding Devices.Sspc.Retry, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
ToolTip="重试次数" TextChanged="SettingChanged" />
|
|||
|
|
</Grid>
|
|||
|
|
</StackPanel>
|
|||
|
|
</Border>
|
|||
|
|
<Grid Margin="0,4,0,12">
|
|||
|
|
<Grid.ColumnDefinitions>
|
|||
|
|
<ColumnDefinition Width="120" />
|
|||
|
|
<ColumnDefinition Width="*" />
|
|||
|
|
<ColumnDefinition Width="120" />
|
|||
|
|
<ColumnDefinition Width="120" />
|
|||
|
|
<ColumnDefinition Width="120" />
|
|||
|
|
</Grid.ColumnDefinitions>
|
|||
|
|
<TextBlock Text="电源 UDP5080" FontWeight="SemiBold" VerticalAlignment="Center" />
|
|||
|
|
<TextBox Grid.Column="1" Text="{Binding Devices.PowerSupply.Host, UpdateSourceTrigger=PropertyChanged}" FontFamily="{StaticResource FontMono}" TextChanged="SettingChanged" />
|
|||
|
|
<TextBox Grid.Column="2" Text="{Binding Devices.PowerSupply.Port, UpdateSourceTrigger=PropertyChanged}" Margin="8,0" FontFamily="{StaticResource FontMono}" TextChanged="SettingChanged" />
|
|||
|
|
<Button Grid.Column="3" Margin="0,0,8,0" Content="测试连接" Command="{Binding TestPowerCommand}" />
|
|||
|
|
<TextBlock Grid.Column="4" Text="{Binding PowerStatus}" VerticalAlignment="Center" Foreground="{StaticResource SuccessBrush}" />
|
|||
|
|
</Grid>
|
|||
|
|
<StackPanel Orientation="Horizontal" Margin="120,0,0,8" Visibility="Hidden">
|
|||
|
|
<CheckBox Content="电源使用 Mock" IsChecked="{Binding Devices.PowerSupply.UseMock}" Click="SettingChanged" Margin="0,0,18,0" />
|
|||
|
|
<CheckBox Content="启动自动连接" IsChecked="{Binding Devices.PowerSupply.AutoConnect}" Click="SettingChanged" />
|
|||
|
|
</StackPanel>
|
|||
|
|
<Grid>
|
|||
|
|
<Grid.ColumnDefinitions>
|
|||
|
|
<ColumnDefinition Width="120" />
|
|||
|
|
<ColumnDefinition Width="*" />
|
|||
|
|
<ColumnDefinition Width="120" />
|
|||
|
|
<ColumnDefinition Width="120" />
|
|||
|
|
<ColumnDefinition Width="120" />
|
|||
|
|
</Grid.ColumnDefinitions>
|
|||
|
|
<TextBlock Text="负载:IT8702P" FontWeight="SemiBold" VerticalAlignment="Center" />
|
|||
|
|
<TextBox Grid.Column="1" Text="{Binding Devices.Load.Host, UpdateSourceTrigger=PropertyChanged}" FontFamily="{StaticResource FontMono}" TextChanged="SettingChanged" ToolTip="IT8702P IP" />
|
|||
|
|
<TextBox Grid.Column="2" Text="{Binding Devices.Load.Port, UpdateSourceTrigger=PropertyChanged}" Margin="8,0" FontFamily="{StaticResource FontMono}" TextChanged="SettingChanged" ToolTip="IT8702P port" />
|
|||
|
|
<Button Grid.Column="3" Margin="0,0,8,0" Content="测试连接" Command="{Binding TestLoadCommand}" />
|
|||
|
|
<TextBlock Grid.Column="4" Text="{Binding LoadStatus}" VerticalAlignment="Center" Foreground="{StaticResource SuccessBrush}" />
|
|||
|
|
</Grid>
|
|||
|
|
<Grid Margin="120,0,0,12" Visibility="Hidden">
|
|||
|
|
<Grid.ColumnDefinitions>
|
|||
|
|
<ColumnDefinition Width="90" />
|
|||
|
|
<ColumnDefinition Width="*" />
|
|||
|
|
<ColumnDefinition Width="*" />
|
|||
|
|
</Grid.ColumnDefinitions>
|
|||
|
|
<TextBox Text="{Binding Devices.PowerSupply.TimeoutSeconds, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
ToolTip="UDP5080 TCP 超时(s)" FontFamily="{StaticResource FontMono}" TextChanged="SettingChanged" />
|
|||
|
|
<TextBox Grid.Column="1" Margin="8,0,0,0"
|
|||
|
|
Text="{Binding Devices.PowerSupply.VoltageCommand, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
ToolTip="读取电压 SCPI 命令" FontFamily="{StaticResource FontMono}" TextChanged="SettingChanged" />
|
|||
|
|
<TextBox Grid.Column="2" Margin="8,0,0,0"
|
|||
|
|
Text="{Binding Devices.PowerSupply.CurrentCommand, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
ToolTip="读取电流 SCPI 命令" FontFamily="{StaticResource FontMono}" TextChanged="SettingChanged" />
|
|||
|
|
</Grid>
|
|||
|
|
<Border BorderBrush="{StaticResource BorderSubtleBrush}" BorderThickness="0,1,0,0" Padding="0,14,0,0">
|
|||
|
|
<StackPanel>
|
|||
|
|
<Grid Margin="0,0,0,8">
|
|||
|
|
<Grid.ColumnDefinitions>
|
|||
|
|
<ColumnDefinition Width="150" />
|
|||
|
|
<ColumnDefinition Width="*" />
|
|||
|
|
<ColumnDefinition Width="100" />
|
|||
|
|
<ColumnDefinition Width="100" />
|
|||
|
|
<ColumnDefinition Width="120" />
|
|||
|
|
</Grid.ColumnDefinitions>
|
|||
|
|
<TextBlock Text="PCIe8586 高速采集卡" FontWeight="SemiBold" VerticalAlignment="Center" />
|
|||
|
|
<ComboBox Grid.Column="1" ItemsSource="{Binding DaqDevices}"
|
|||
|
|
SelectedValuePath="LogicalId"
|
|||
|
|
SelectedValue="{Binding SelectedDaqLogicalId, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
SelectionChanged="SettingChanged" />
|
|||
|
|
<Button Grid.Column="2" Margin="8,0,0,0" Content="刷新设备" Command="{Binding RefreshDaqDevicesCommand}" />
|
|||
|
|
<Button Grid.Column="3" Margin="8,0,0,0" Content="连接/测试" Command="{Binding TestDaqCommand}" />
|
|||
|
|
<TextBlock Grid.Column="4" Margin="10,0,0,0" Text="{Binding DaqStatus}" VerticalAlignment="Center" />
|
|||
|
|
</Grid>
|
|||
|
|
<WrapPanel Margin="150,0,0,8" Visibility="Hidden">
|
|||
|
|
<CheckBox Content="使用 Mock" IsChecked="{Binding Devices.Daq.UseMock}" Click="SettingChanged" Margin="0,0,18,0" />
|
|||
|
|
<CheckBox Content="启动自动连接" IsChecked="{Binding Devices.Daq.AutoConnect}" Click="SettingChanged" />
|
|||
|
|
</WrapPanel>
|
|||
|
|
<Grid Margin="0,0,0,8">
|
|||
|
|
<Grid.ColumnDefinitions>
|
|||
|
|
<ColumnDefinition Width="150" />
|
|||
|
|
<ColumnDefinition Width="90" />
|
|||
|
|
<ColumnDefinition Width="110" />
|
|||
|
|
<ColumnDefinition Width="100" />
|
|||
|
|
<ColumnDefinition Width="100" />
|
|||
|
|
<ColumnDefinition Width="100" />
|
|||
|
|
<ColumnDefinition Width="*" />
|
|||
|
|
</Grid.ColumnDefinitions>
|
|||
|
|
<TextBlock Text="采集参数" VerticalAlignment="Center" />
|
|||
|
|
<ComboBox Grid.Column="1" ItemsSource="{Binding DaqChannelCounts}"
|
|||
|
|
SelectedItem="{Binding Devices.Daq.ChannelCount}"
|
|||
|
|
SelectionChanged="SettingChanged" ToolTip="启用通道数" />
|
|||
|
|
<ComboBox Grid.Column="2" Margin="8,0,0,0" ItemsSource="{Binding DaqInputRanges}"
|
|||
|
|
SelectedItem="{Binding Devices.Daq.InputRange}"
|
|||
|
|
SelectionChanged="SettingChanged" ToolTip="输入量程" />
|
|||
|
|
<TextBox Grid.Column="3" Margin="8,0,0,0" Text="{Binding Devices.Daq.ClockDivider, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
TextChanged="SettingChanged" ToolTip="100MHz 时钟分频" />
|
|||
|
|
<TextBox Grid.Column="4" Margin="8,0,0,0" Text="{Binding Devices.Daq.PreTriggerMs, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
TextChanged="SettingChanged" ToolTip="前置窗口(ms)" />
|
|||
|
|
<TextBox Grid.Column="5" Margin="8,0,0,0" Text="{Binding Devices.Daq.PostTriggerMs, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
TextChanged="SettingChanged" ToolTip="后置窗口(ms)" />
|
|||
|
|
<TextBlock Grid.Column="6" Margin="10,0,0,0" VerticalAlignment="Center"
|
|||
|
|
Text="{Binding DaqActualSampleRateHz, StringFormat=实际采样率 \{0:N0\} Hz}" />
|
|||
|
|
</Grid>
|
|||
|
|
<TextBlock Margin="0,4,0,8" TextWrapping="Wrap" Foreground="{StaticResource DangerBrush}"
|
|||
|
|
Text="警告:PCIe8586 原生输入仅允许所选 ±5 V/±1 V 量程。28 V 电压和电流信号必须经过外部分压/传感器调理,并完成比例、偏置标定后才能正式测试。" />
|
|||
|
|
<TextBlock Margin="0,0,0,8" TextWrapping="Wrap"
|
|||
|
|
Foreground="{StaticResource TextSecondaryBrush}"
|
|||
|
|
Text="{Binding DaqValidationMessage}" />
|
|||
|
|
<ScrollViewer HorizontalScrollBarVisibility="Auto"
|
|||
|
|
VerticalScrollBarVisibility="Disabled">
|
|||
|
|
<ItemsControl ItemsSource="{Binding DaqChannelEditors}">
|
|||
|
|
<ItemsControl.ItemsPanel>
|
|||
|
|
<ItemsPanelTemplate>
|
|||
|
|
<UniformGrid Columns="8" />
|
|||
|
|
</ItemsPanelTemplate>
|
|||
|
|
</ItemsControl.ItemsPanel>
|
|||
|
|
<ItemsControl.ItemTemplate>
|
|||
|
|
<DataTemplate>
|
|||
|
|
<Border BorderBrush="{StaticResource BorderSubtleBrush}"
|
|||
|
|
BorderThickness="1"
|
|||
|
|
CornerRadius="6"
|
|||
|
|
Padding="8"
|
|||
|
|
Margin="0,0,8,0"
|
|||
|
|
Width="172">
|
|||
|
|
<StackPanel>
|
|||
|
|
<Grid Margin="0,0,0,8">
|
|||
|
|
<Grid.ColumnDefinitions>
|
|||
|
|
<ColumnDefinition Width="*" />
|
|||
|
|
<ColumnDefinition Width="Auto" />
|
|||
|
|
</Grid.ColumnDefinitions>
|
|||
|
|
<TextBlock Text="{Binding ChannelName}"
|
|||
|
|
FontWeight="SemiBold"
|
|||
|
|
VerticalAlignment="Center" />
|
|||
|
|
<CheckBox Grid.Column="1"
|
|||
|
|
Content="启用"
|
|||
|
|
IsChecked="{Binding IsEnabled}"
|
|||
|
|
IsHitTestVisible="False"
|
|||
|
|
Focusable="False"
|
|||
|
|
VerticalAlignment="Center" />
|
|||
|
|
</Grid>
|
|||
|
|
|
|||
|
|
<TextBlock Style="{StaticResource FieldLabel}" Text="角色" />
|
|||
|
|
<ComboBox ItemsSource="{Binding DataContext.DaqRoles, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
|||
|
|
SelectedItem="{Binding Role, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
SelectionChanged="DaqRoleChanged" />
|
|||
|
|
|
|||
|
|
<TextBlock Style="{StaticResource FieldLabel}" Text="名称" Margin="0,8,0,0" />
|
|||
|
|
<TextBox Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
TextChanged="SettingChanged" />
|
|||
|
|
|
|||
|
|
<TextBlock Style="{StaticResource FieldLabel}" Text="Scale" Margin="0,8,0,0" />
|
|||
|
|
<TextBox Text="{Binding Scale, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
FontFamily="{StaticResource FontMono}"
|
|||
|
|
TextChanged="SettingChanged" />
|
|||
|
|
|
|||
|
|
<TextBlock Style="{StaticResource FieldLabel}" Text="Offset" Margin="0,8,0,0" />
|
|||
|
|
<TextBox Text="{Binding Offset, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
FontFamily="{StaticResource FontMono}"
|
|||
|
|
TextChanged="SettingChanged" />
|
|||
|
|
|
|||
|
|
<CheckBox Content="已标定"
|
|||
|
|
Margin="0,10,0,0"
|
|||
|
|
IsChecked="{Binding IsCalibrated, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
Click="DaqCalibrationChanged" />
|
|||
|
|
</StackPanel>
|
|||
|
|
</Border>
|
|||
|
|
</DataTemplate>
|
|||
|
|
</ItemsControl.ItemTemplate>
|
|||
|
|
</ItemsControl>
|
|||
|
|
</ScrollViewer>
|
|||
|
|
</StackPanel>
|
|||
|
|
</Border>
|
|||
|
|
<StackPanel Orientation="Horizontal" Margin="120,0,0,8" Visibility="Hidden">
|
|||
|
|
<CheckBox Content="负载使用 Mock" IsChecked="{Binding Devices.Load.UseMock}" Click="SettingChanged" Margin="0,0,18,0" />
|
|||
|
|
<CheckBox Content="启动自动连接" IsChecked="{Binding Devices.Load.AutoConnect}" Click="SettingChanged" Margin="0,0,18,0" />
|
|||
|
|
<CheckBox Content="使用 FETC 查询" IsChecked="{Binding Devices.Load.UseFetch}" Click="SettingChanged" Margin="0,0,18,0" />
|
|||
|
|
<TextBlock Text="查询方式" VerticalAlignment="Center" Margin="0,0,8,0" />
|
|||
|
|
<ComboBox Width="120" SelectedValue="{Binding Devices.Load.QueryMode}" SelectedValuePath="Tag" SelectionChanged="SettingChanged">
|
|||
|
|
<ComboBoxItem Content="合并查询" Tag="{x:Static cfg:LoadQueryMode.Combined}" />
|
|||
|
|
<ComboBoxItem Content="独立查询" Tag="{x:Static cfg:LoadQueryMode.Separate}" />
|
|||
|
|
</ComboBox>
|
|||
|
|
</StackPanel>
|
|||
|
|
<Grid Margin="120,0,0,12" Visibility="Hidden">
|
|||
|
|
<Grid.ColumnDefinitions>
|
|||
|
|
<ColumnDefinition Width="90" />
|
|||
|
|
<ColumnDefinition Width="90" />
|
|||
|
|
<ColumnDefinition Width="*" />
|
|||
|
|
</Grid.ColumnDefinitions>
|
|||
|
|
<TextBox Text="{Binding Devices.Load.Channel, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
ToolTip="IT8702P channel" FontFamily="{StaticResource FontMono}" TextChanged="SettingChanged" />
|
|||
|
|
<TextBox Grid.Column="1" Margin="8,0,0,0"
|
|||
|
|
Text="{Binding Devices.Load.TimeoutSeconds, UpdateSourceTrigger=PropertyChanged}"
|
|||
|
|
ToolTip="IT8702P TCP timeout(s)" FontFamily="{StaticResource FontMono}" TextChanged="SettingChanged" />
|
|||
|
|
<ComboBox Grid.Column="2" Margin="8,0,0,0"
|
|||
|
|
ItemsSource="{Binding TerminatorOptions}"
|
|||
|
|
DisplayMemberPath="Name"
|
|||
|
|
SelectedValuePath="Value"
|
|||
|
|
SelectedValue="{Binding Devices.Load.Terminator}"
|
|||
|
|
ToolTip="IT8702P 命令终止符,默认 LF (\\n)"
|
|||
|
|
SelectionChanged="SettingChanged" />
|
|||
|
|
</Grid>
|
|||
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,14,0,0">
|
|||
|
|
<Button Content="刷新串口" Command="{Binding RefreshPortsCommand}" Margin="0,0,8,0" />
|
|||
|
|
<Button Style="{StaticResource PrimaryButton}" Content="保存并重新连接" Command="{Binding SaveAndReconnectCommand}" Click="SettingChanged">
|
|||
|
|
<Button.ContentTemplate>
|
|||
|
|
<DataTemplate>
|
|||
|
|
<TextBlock Text="{Binding}" Foreground="{StaticResource TextInverseBrush}" />
|
|||
|
|
</DataTemplate>
|
|||
|
|
</Button.ContentTemplate>
|
|||
|
|
</Button>
|
|||
|
|
</StackPanel>
|
|||
|
|
</StackPanel>
|
|||
|
|
</Border>
|
|||
|
|
|
|||
|
|
<Border Style="{StaticResource Card}" Margin="0,0,0,16">
|
|||
|
|
<StackPanel>
|
|||
|
|
<TextBlock Style="{StaticResource CardTitle}" Text="报告设置" />
|
|||
|
|
<Grid Margin="0,4">
|
|||
|
|
<Grid.ColumnDefinitions>
|
|||
|
|
<ColumnDefinition Width="110" />
|
|||
|
|
<ColumnDefinition Width="*" />
|
|||
|
|
<ColumnDefinition Width="Auto" />
|
|||
|
|
<ColumnDefinition Width="Auto" />
|
|||
|
|
</Grid.ColumnDefinitions>
|
|||
|
|
<TextBlock Style="{StaticResource FieldLabel}" Text="保存路径" />
|
|||
|
|
<TextBox Grid.Column="1" Text="{Binding Report.SavePath, UpdateSourceTrigger=PropertyChanged}" FontFamily="{StaticResource FontMono}" TextChanged="SettingChanged" />
|
|||
|
|
<Button Grid.Column="2" Margin="8,0,0,0" Content="浏览" Command="{Binding BrowseReportsCommand}" />
|
|||
|
|
<Button Grid.Column="3" Margin="8,0,0,0" Content="打开目录" Command="{Binding OpenReportsDirectoryCommand}" />
|
|||
|
|
</Grid>
|
|||
|
|
</StackPanel>
|
|||
|
|
</Border>
|
|||
|
|
|
|||
|
|
<Border Style="{StaticResource Card}">
|
|||
|
|
<StackPanel>
|
|||
|
|
<TextBlock Style="{StaticResource CardTitle}" Text="项目数据路径" />
|
|||
|
|
<Grid>
|
|||
|
|
<Grid.ColumnDefinitions>
|
|||
|
|
<ColumnDefinition Width="110" />
|
|||
|
|
<ColumnDefinition Width="*" />
|
|||
|
|
<ColumnDefinition Width="Auto" />
|
|||
|
|
<ColumnDefinition Width="Auto" />
|
|||
|
|
</Grid.ColumnDefinitions>
|
|||
|
|
<TextBlock Style="{StaticResource FieldLabel}" Text="项目根目录" />
|
|||
|
|
<TextBox Grid.Column="1" Text="{Binding Storage.ProjectsRoot, UpdateSourceTrigger=PropertyChanged}" FontFamily="{StaticResource FontMono}" TextChanged="SettingChanged" />
|
|||
|
|
<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 OpenProjectsDirectoryCommand}" />
|
|||
|
|
</Grid>
|
|||
|
|
</StackPanel>
|
|||
|
|
</Border>
|
|||
|
|
</StackPanel>
|
|||
|
|
</ScrollViewer>
|
|||
|
|
</UserControl>
|