feat(FeedBack): 添加软件配置信息收集
Signed-off-by: doudou0720 <98651603+doudou0720@users.noreply.github.com>
This commit is contained in:
@@ -26,24 +26,10 @@
|
||||
</ui:SettingsExpander.HeaderIcon>
|
||||
<ui:SettingsExpander.Items>
|
||||
<ui:SettingsCard ContentAlignment="Left">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="软件版本" VerticalAlignment="Center" FontSize="14"/>
|
||||
<CheckBox Grid.Column="1" x:Name="CheckAppVersion" IsChecked="True" VerticalAlignment="Center" Margin="8,0,0,0"/>
|
||||
</Grid>
|
||||
<CheckBox x:Name="CheckAppVersion" IsChecked="True" Content="软件版本"/>
|
||||
</ui:SettingsCard>
|
||||
<ui:SettingsCard ContentAlignment="Left">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="更新通道" VerticalAlignment="Center" FontSize="14"/>
|
||||
<CheckBox Grid.Column="1" x:Name="CheckUpdateChannel" IsChecked="True" VerticalAlignment="Center" Margin="8,0,0,0"/>
|
||||
</Grid>
|
||||
<CheckBox x:Name="CheckUpdateChannel" IsChecked="True" Content="更新通道"/>
|
||||
</ui:SettingsCard>
|
||||
</ui:SettingsExpander.Items>
|
||||
</ui:SettingsExpander>
|
||||
@@ -55,34 +41,13 @@
|
||||
</ui:SettingsExpander.HeaderIcon>
|
||||
<ui:SettingsExpander.Items>
|
||||
<ui:SettingsCard ContentAlignment="Left">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="操作系统版本" VerticalAlignment="Center" FontSize="14"/>
|
||||
<CheckBox Grid.Column="1" x:Name="CheckOSVersion" IsChecked="True" VerticalAlignment="Center" Margin="8,0,0,0"/>
|
||||
</Grid>
|
||||
<CheckBox x:Name="CheckOSVersion" IsChecked="True" Content="操作系统版本"/>
|
||||
</ui:SettingsCard>
|
||||
<ui:SettingsCard ContentAlignment="Left">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Text=".NET 版本" VerticalAlignment="Center" FontSize="14"/>
|
||||
<CheckBox Grid.Column="1" x:Name="CheckNetVersion" IsChecked="True" VerticalAlignment="Center" Margin="8,0,0,0"/>
|
||||
</Grid>
|
||||
<CheckBox x:Name="CheckNetVersion" IsChecked="True" Content=".NET Framework 版本"/>
|
||||
</ui:SettingsCard>
|
||||
<ui:SettingsCard ContentAlignment="Left">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="触控支持" VerticalAlignment="Center" FontSize="14"/>
|
||||
<CheckBox Grid.Column="1" x:Name="CheckTouchSupport" IsChecked="True" VerticalAlignment="Center" Margin="8,0,0,0"/>
|
||||
</Grid>
|
||||
<CheckBox x:Name="CheckTouchSupport" IsChecked="True" Content="触控支持"/>
|
||||
</ui:SettingsCard>
|
||||
</ui:SettingsExpander.Items>
|
||||
</ui:SettingsExpander>
|
||||
@@ -94,24 +59,31 @@
|
||||
</ui:SettingsExpander.HeaderIcon>
|
||||
<ui:SettingsExpander.Items>
|
||||
<ui:SettingsCard ContentAlignment="Left">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="设备 ID" VerticalAlignment="Center" FontSize="14"/>
|
||||
<CheckBox Grid.Column="1" x:Name="CheckDeviceId" IsChecked="False" VerticalAlignment="Center" Margin="8,0,0,0"/>
|
||||
</Grid>
|
||||
<CheckBox x:Name="CheckDeviceId" IsChecked="False" Content="设备 ID"/>
|
||||
</ui:SettingsCard>
|
||||
<ui:SettingsCard x:Name="CardFanceId" ContentAlignment="Left">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="遥测 ID" VerticalAlignment="Center" FontSize="14"/>
|
||||
<CheckBox Grid.Column="1" x:Name="CheckFanceId" IsChecked="False" VerticalAlignment="Center" Margin="8,0,0,0"/>
|
||||
</Grid>
|
||||
<CheckBox x:Name="CheckFanceId" IsChecked="False" Content="遥测 ID" ToolTipService.ShowOnDisabled="True">
|
||||
<CheckBox.ToolTip>
|
||||
<ToolTip>
|
||||
<TextBlock>暂无遥测 ID</TextBlock>
|
||||
</ToolTip>
|
||||
</CheckBox.ToolTip>
|
||||
</CheckBox>
|
||||
</ui:SettingsCard>
|
||||
</ui:SettingsExpander.Items>
|
||||
</ui:SettingsExpander>
|
||||
|
||||
<ui:SettingsExpander x:Name="ExpanderConfiguration" Header="软件配置"
|
||||
Description="选择要包含在反馈中的软件配置信息">
|
||||
<ui:SettingsExpander.HeaderIcon>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Settings}"/>
|
||||
</ui:SettingsExpander.HeaderIcon>
|
||||
<ui:SettingsExpander.Items>
|
||||
<ui:SettingsCard ContentAlignment="Left">
|
||||
<CheckBox x:Name="CheckPPTLinkage" IsChecked="True" Content="PPT 联动设置"/>
|
||||
</ui:SettingsCard>
|
||||
<ui:SettingsCard ContentAlignment="Left">
|
||||
<CheckBox x:Name="CheckInkRecognition" IsChecked="True" Content="墨迹识别设置"/>
|
||||
</ui:SettingsCard>
|
||||
</ui:SettingsExpander.Items>
|
||||
</ui:SettingsExpander>
|
||||
@@ -119,40 +91,52 @@
|
||||
</ScrollViewer>
|
||||
|
||||
<Grid Grid.Row="0" x:Name="Page2" Visibility="Collapsed">
|
||||
<ikw:SimpleStackPanel Spacing="12">
|
||||
<TextBlock FontSize="20" FontWeight="SemiBold" Margin="0,0,0,10" Text="确认要发送的信息"/>
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||
<ikw:SimpleStackPanel Spacing="12" Margin="0,0,0,20">
|
||||
<TextBlock FontSize="20" FontWeight="SemiBold" Margin="0,0,0,10" Text="确认要发送的信息"/>
|
||||
|
||||
<ui:SettingsCard Header="软件信息"
|
||||
Description="将要包含在反馈中的软件版本信息">
|
||||
<ui:SettingsCard.HeaderIcon>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.AppIconDefault}"/>
|
||||
</ui:SettingsCard.HeaderIcon>
|
||||
<ikw:SimpleStackPanel Spacing="8">
|
||||
<TextBlock x:Name="TextAppVersionInfo" Text="v1.7.18.4 (Release)" FontSize="14" TextWrapping="Wrap"/>
|
||||
</ikw:SimpleStackPanel>
|
||||
</ui:SettingsCard>
|
||||
<ui:SettingsCard Header="软件信息"
|
||||
Description="将要包含在反馈中的软件版本信息">
|
||||
<ui:SettingsCard.HeaderIcon>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.AppIconDefault}"/>
|
||||
</ui:SettingsCard.HeaderIcon>
|
||||
<ikw:SimpleStackPanel Spacing="8">
|
||||
<TextBlock x:Name="TextAppVersionInfo" Text="" FontSize="14" TextWrapping="Wrap"/>
|
||||
</ikw:SimpleStackPanel>
|
||||
</ui:SettingsCard>
|
||||
|
||||
<ui:SettingsCard Header="系统信息"
|
||||
Description="将要包含在反馈中的系统环境信息">
|
||||
<ui:SettingsCard.HeaderIcon>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.PC1}"/>
|
||||
</ui:SettingsCard.HeaderIcon>
|
||||
<ikw:SimpleStackPanel Spacing="8">
|
||||
<TextBlock x:Name="TextSystemInfo" Text="Windows 10 专业版 19045.3758 | .NET 8.0.0 | 触控:支持(2个设备)" FontSize="14" TextWrapping="Wrap"/>
|
||||
</ikw:SimpleStackPanel>
|
||||
</ui:SettingsCard>
|
||||
<ui:SettingsCard Header="系统信息"
|
||||
Description="将要包含在反馈中的系统环境信息">
|
||||
<ui:SettingsCard.HeaderIcon>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.PC1}"/>
|
||||
</ui:SettingsCard.HeaderIcon>
|
||||
<ikw:SimpleStackPanel Spacing="8">
|
||||
<TextBlock x:Name="TextSystemInfo" Text="" FontSize="14" TextWrapping="Wrap"/>
|
||||
</ikw:SimpleStackPanel>
|
||||
</ui:SettingsCard>
|
||||
|
||||
<ui:SettingsCard Header="设备信息"
|
||||
Description="将要包含在反馈中的设备标识信息">
|
||||
<ui:SettingsCard.HeaderIcon>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Devices2}"/>
|
||||
</ui:SettingsCard.HeaderIcon>
|
||||
<ikw:SimpleStackPanel Spacing="8">
|
||||
<TextBlock x:Name="TextDeviceInfo" Text="设备ID: xxxxxxxxxxxxxx" FontSize="14" TextWrapping="Wrap"/>
|
||||
<TextBlock x:Name="TextTelemetryInfo" Text="遥测ID: xxxxxxxxxxxxxx" FontSize="14" TextWrapping="Wrap" Visibility="Collapsed"/>
|
||||
</ikw:SimpleStackPanel>
|
||||
</ui:SettingsCard>
|
||||
</ikw:SimpleStackPanel>
|
||||
<ui:SettingsCard Header="设备信息"
|
||||
Description="将要包含在反馈中的设备标识信息">
|
||||
<ui:SettingsCard.HeaderIcon>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Devices2}"/>
|
||||
</ui:SettingsCard.HeaderIcon>
|
||||
<ikw:SimpleStackPanel Spacing="8">
|
||||
<TextBlock x:Name="TextDeviceInfo" Text="" FontSize="14" TextWrapping="Wrap"/>
|
||||
<TextBlock x:Name="TextTelemetryInfo" Text="" FontSize="14" TextWrapping="Wrap" Visibility="Collapsed"/>
|
||||
</ikw:SimpleStackPanel>
|
||||
</ui:SettingsCard>
|
||||
|
||||
<ui:SettingsCard x:Name="CardConfiguration" Header="软件配置"
|
||||
Description="将要包含在反馈中的软件配置信息">
|
||||
<ui:SettingsCard.HeaderIcon>
|
||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Settings}"/>
|
||||
</ui:SettingsCard.HeaderIcon>
|
||||
<ikw:SimpleStackPanel Spacing="8">
|
||||
<TextBlock x:Name="TextConfigurationInfo" Text="" FontSize="14" TextWrapping="Wrap"/>
|
||||
</ikw:SimpleStackPanel>
|
||||
</ui:SettingsCard>
|
||||
</ikw:SimpleStackPanel>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="1" VerticalAlignment="Bottom" Margin="0,20,0,0">
|
||||
|
||||
@@ -17,14 +17,25 @@ namespace Ink_Canvas
|
||||
private string _touchSupport = "";
|
||||
private string _deviceId = "";
|
||||
private string _telemetryId = "";
|
||||
private string _pptLinkageSettings = "";
|
||||
private string _inkRecognitionSettings = "";
|
||||
|
||||
public FeedbackWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
LoadInformation();
|
||||
UpdateTextBlocks();
|
||||
CheckTelemetryIdAvailability();
|
||||
}
|
||||
|
||||
private void UpdateTextBlocks()
|
||||
{
|
||||
TextAppVersionInfo.Text = _appVersion;
|
||||
TextSystemInfo.Text = $"{_osVersion} | {_netVersion} | 触控:{_touchSupport}";
|
||||
TextDeviceInfo.Text = $"设备ID: {_deviceId}";
|
||||
TextTelemetryInfo.Text = $"遥测ID: {_telemetryId}";
|
||||
}
|
||||
|
||||
private void LoadInformation()
|
||||
{
|
||||
try
|
||||
@@ -116,6 +127,48 @@ namespace Ink_Canvas
|
||||
_telemetryId = "获取失败";
|
||||
System.Diagnostics.Debug.WriteLine($"获取遥测ID失败: {ex.Message}");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (MainWindow.Settings?.PowerPointSettings != null)
|
||||
{
|
||||
_pptLinkageSettings = $"启用PPT联动: {MainWindow.Settings.PowerPointSettings.PowerPointSupport}\n";
|
||||
_pptLinkageSettings += $"WPS支持: {MainWindow.Settings.PowerPointSettings.IsSupportWPS}\n";
|
||||
_pptLinkageSettings += $"MSO支持: {MainWindow.Settings.PowerPointSettings.PowerPointSupport}\n";
|
||||
_pptLinkageSettings += $"Rot联动: {MainWindow.Settings.PowerPointSettings.UseRotPptLink}\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
_pptLinkageSettings = "未配置PPT联动设置";
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_pptLinkageSettings = "获取PPT联动设置失败";
|
||||
System.Diagnostics.Debug.WriteLine($"获取PPT联动设置失败: {ex.Message}");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (MainWindow.Settings?.InkToShape != null)
|
||||
{
|
||||
_inkRecognitionSettings = $"启用墨迹识别: {MainWindow.Settings.InkToShape.IsInkToShapeEnabled}\n";
|
||||
_inkRecognitionSettings += $"形状识别: {MainWindow.Settings.InkToShape.IsInkToShapeRectangle}\n";
|
||||
_inkRecognitionSettings += $"三角形识别: {MainWindow.Settings.InkToShape.IsInkToShapeTriangle}\n";
|
||||
_inkRecognitionSettings += $"圆角矩形识别: {MainWindow.Settings.InkToShape.IsInkToShapeRounded}\n";
|
||||
_inkRecognitionSettings += $"线条矫正灵敏度: {MainWindow.Settings.InkToShape.LineStraightenSensitivity}\n";
|
||||
_inkRecognitionSettings += $"线条标准化阈值: {MainWindow.Settings.InkToShape.LineNormalizationThreshold}\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
_inkRecognitionSettings = "未配置墨迹识别设置";
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_inkRecognitionSettings = "获取墨迹识别设置失败";
|
||||
System.Diagnostics.Debug.WriteLine($"获取墨迹识别设置失败: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
private string GetTelemetryId()
|
||||
@@ -142,7 +195,7 @@ namespace Ink_Canvas
|
||||
bool hasTelemetryId = CheckTelemetryIdExists();
|
||||
if (!hasTelemetryId)
|
||||
{
|
||||
CardFanceId.Visibility = Visibility.Collapsed;
|
||||
CardFanceId.Visibility = Visibility.Visible;
|
||||
CheckFanceId.IsChecked = false;
|
||||
CheckFanceId.IsEnabled = false;
|
||||
}
|
||||
@@ -150,7 +203,7 @@ namespace Ink_Canvas
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine($"检查遥测ID可用性失败: {ex.Message}");
|
||||
CardFanceId.Visibility = Visibility.Collapsed;
|
||||
CardFanceId.Visibility = Visibility.Visible;
|
||||
CheckFanceId.IsChecked = false;
|
||||
CheckFanceId.IsEnabled = false;
|
||||
}
|
||||
@@ -254,6 +307,25 @@ namespace Ink_Canvas
|
||||
TextTelemetryInfo.Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
// Display software configuration settings in the dedicated card
|
||||
if (CheckPPTLinkage.IsChecked == true || CheckInkRecognition.IsChecked == true)
|
||||
{
|
||||
CardConfiguration.Visibility = Visibility.Visible;
|
||||
TextConfigurationInfo.Text = "";
|
||||
if (CheckPPTLinkage.IsChecked == true)
|
||||
{
|
||||
TextConfigurationInfo.Text += $"PPT联动设置:\n{_pptLinkageSettings}\n";
|
||||
}
|
||||
if (CheckInkRecognition.IsChecked == true)
|
||||
{
|
||||
TextConfigurationInfo.Text += $"墨迹识别设置:\n{_inkRecognitionSettings}\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CardConfiguration.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
Page1.Visibility = Visibility.Collapsed;
|
||||
Page2.Visibility = Visibility.Visible;
|
||||
ButtonCancel.Visibility = Visibility.Collapsed;
|
||||
@@ -326,14 +398,32 @@ namespace Ink_Canvas
|
||||
url += $"&os={Uri.EscapeDataString(systemInfo)}";
|
||||
}
|
||||
|
||||
string extraInfo = "";
|
||||
if (CheckDeviceId.IsChecked == true)
|
||||
{
|
||||
url += $"&device={Uri.EscapeDataString(_deviceId)}";
|
||||
extraInfo += $"设备ID: {_deviceId}\n";
|
||||
}
|
||||
|
||||
if (CheckFanceId.IsChecked == true)
|
||||
{
|
||||
url += $"&telemetry={Uri.EscapeDataString(_telemetryId)}";
|
||||
extraInfo += $"遥测ID: {_telemetryId}\n";
|
||||
}
|
||||
|
||||
if (CheckPPTLinkage.IsChecked == true)
|
||||
{
|
||||
extraInfo += "\nPPT联动设置:\n";
|
||||
extraInfo += _pptLinkageSettings;
|
||||
}
|
||||
|
||||
if (CheckInkRecognition.IsChecked == true)
|
||||
{
|
||||
extraInfo += "\n墨迹识别设置:\n";
|
||||
extraInfo += _inkRecognitionSettings;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(extraInfo))
|
||||
{
|
||||
url += $"&extra={Uri.EscapeDataString(extraInfo)}";
|
||||
}
|
||||
|
||||
Process.Start(new ProcessStartInfo
|
||||
|
||||
Reference in New Issue
Block a user