Initial commit: Better-Seewo EN5 plugin v1.0.1
This commit is contained in:
36
Better-EN5/UI/BetterEN5SettingsMenuItem.cs
Normal file
36
Better-EN5/UI/BetterEN5SettingsMenuItem.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using Cvte.EasiNote;
|
||||
using Cvte.Windows.Input;
|
||||
|
||||
namespace BetterEN5.UI
|
||||
{
|
||||
public class BetterEN5SettingsMenuItem : BoardEditMenuItem
|
||||
{
|
||||
public BetterEN5SettingsMenuItem()
|
||||
{
|
||||
SortHint = 999;
|
||||
Command = new DelegateCommand(() =>
|
||||
{
|
||||
Application.Current.Dispatcher.Invoke(() =>
|
||||
{
|
||||
var existing = Application.Current.Windows.OfType<SettingsWindow>().FirstOrDefault();
|
||||
if (existing != null)
|
||||
{
|
||||
existing.Activate();
|
||||
return;
|
||||
}
|
||||
|
||||
var enMainWindow = Application.Current.MainWindow;
|
||||
var settingsWindow = new SettingsWindow
|
||||
{
|
||||
Owner = enMainWindow,
|
||||
WindowStartupLocation = WindowStartupLocation.CenterOwner,
|
||||
};
|
||||
settingsWindow.ShowDialog();
|
||||
});
|
||||
});
|
||||
Predicate = _ => true;
|
||||
}
|
||||
}
|
||||
}
|
||||
32
Better-EN5/UI/ExportInkMenuItem.cs
Normal file
32
Better-EN5/UI/ExportInkMenuItem.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using Microsoft.Win32;
|
||||
using Cvte.EasiNote;
|
||||
using Cvte.Windows.Input;
|
||||
using BetterEN5.Services;
|
||||
|
||||
namespace BetterEN5.UI
|
||||
{
|
||||
public class ExportInkMenuItem : BoardEditMenuItem
|
||||
{
|
||||
public ExportInkMenuItem()
|
||||
{
|
||||
SortHint = 998;
|
||||
Command = new DelegateCommand(() =>
|
||||
{
|
||||
var dialog = new SaveFileDialog
|
||||
{
|
||||
Filter = "墨迹文件 (*.ink)|*.ink|JSON 文件 (*.json)|*.json",
|
||||
DefaultExt = ".ink",
|
||||
FileName = "课件墨迹.ink"
|
||||
};
|
||||
if (dialog.ShowDialog() == true)
|
||||
{
|
||||
var inkService = new InkService();
|
||||
_ = inkService.ExportInkAsync(dialog.FileName);
|
||||
}
|
||||
});
|
||||
Predicate = _ => true;
|
||||
}
|
||||
}
|
||||
}
|
||||
168
Better-EN5/UI/SettingsWindow.xaml
Normal file
168
Better-EN5/UI/SettingsWindow.xaml
Normal file
@@ -0,0 +1,168 @@
|
||||
<Window x:Class="BetterEN5.UI.SettingsWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="Better-Seewo 设置"
|
||||
Height="520" Width="680"
|
||||
ResizeMode="CanResize"
|
||||
WindowStyle="SingleBorderWindow"
|
||||
FontSize="14">
|
||||
<Window.Resources>
|
||||
<Style x:Key="TabHeaderStyle" TargetType="TabItem">
|
||||
<Setter Property="FontSize" Value="15"/>
|
||||
<Setter Property="Padding" Value="16,8"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
</Style>
|
||||
<Style x:Key="ActionButton" TargetType="Button">
|
||||
<Setter Property="Padding" Value="16,8"/>
|
||||
<Setter Property="Margin" Value="8"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
</Style>
|
||||
<Style x:Key="GroupBoxStyle" TargetType="GroupBox">
|
||||
<Setter Property="Margin" Value="8"/>
|
||||
<Setter Property="Padding" Value="12"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
</Style>
|
||||
</Window.Resources>
|
||||
|
||||
<Grid Margin="12">
|
||||
<TabControl>
|
||||
<TabItem Header="墨迹管理" Style="{StaticResource TabHeaderStyle}">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel Margin="8">
|
||||
<GroupBox Header="墨迹导出" Style="{StaticResource GroupBoxStyle}">
|
||||
<StackPanel>
|
||||
<TextBlock TextWrapping="Wrap" Margin="0,0,0,12">
|
||||
将当前课件中的所有墨迹(笔迹、标注)导出为 JSON 文件,方便备份和迁移。
|
||||
</TextBlock>
|
||||
<UniformGrid Columns="2" HorizontalAlignment="Left">
|
||||
<Button Content="导出墨迹..." Style="{StaticResource ActionButton}"
|
||||
Click="ExportInk_Click"/>
|
||||
<Button Content="导入墨迹..." Style="{StaticResource ActionButton}"
|
||||
Click="ImportInk_Click"/>
|
||||
</UniformGrid>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Header="墨迹设置" Style="{StaticResource GroupBoxStyle}">
|
||||
<StackPanel>
|
||||
<CheckBox x:Name="AutoSaveInkCheckBox" Margin="4" Content="关闭课件时自动备份墨迹"/>
|
||||
<CheckBox x:Name="IncludeShapeInkCheckBox" Margin="4" Content="导出包含形状上的笔迹"/>
|
||||
<Button Content="保存设置" Style="{StaticResource ActionButton}"
|
||||
HorizontalAlignment="Left" Click="SaveInkSettings_Click"/>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Header="状态" Style="{StaticResource GroupBoxStyle}">
|
||||
<TextBlock x:Name="InkStatusText" Text="就绪" Foreground="Gray"/>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
|
||||
<TabItem Header="文件转换" Style="{StaticResource TabHeaderStyle}">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel Margin="8">
|
||||
<GroupBox Header="PPT 转 ENBX" Style="{StaticResource GroupBoxStyle}">
|
||||
<StackPanel>
|
||||
<TextBlock TextWrapping="Wrap" Margin="0,0,0,12">
|
||||
将 PowerPoint 文件(.pptx)转换为希沃白板课件格式(.enbx),
|
||||
保留更多原始格式和排版。
|
||||
</TextBlock>
|
||||
<Button Content="选择并转换 PPT..." Style="{StaticResource ActionButton}"
|
||||
HorizontalAlignment="Left" Click="ConvertPptx_Click"/>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Header="ENBX 转 PPT" Style="{StaticResource GroupBoxStyle}">
|
||||
<StackPanel>
|
||||
<TextBlock TextWrapping="Wrap" Margin="0,0,0,12">
|
||||
将希沃白板课件(.enbx)导出为 PowerPoint 格式(.pptx)。
|
||||
</TextBlock>
|
||||
<Button Content="选择并转换 ENBX..." Style="{StaticResource ActionButton}"
|
||||
HorizontalAlignment="Left" Click="ConvertEnbx_Click"/>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Header="转换修复" Style="{StaticResource GroupBoxStyle}">
|
||||
<StackPanel>
|
||||
<TextBlock TextWrapping="Wrap" Margin="0,0,0,12">
|
||||
清除转换缓存和临时文件,修复可能的转换失败问题。
|
||||
</TextBlock>
|
||||
<UniformGrid Columns="2" HorizontalAlignment="Left">
|
||||
<Button Content="清理转换缓存" Style="{StaticResource ActionButton}"
|
||||
Click="ClearConversionCache_Click"/>
|
||||
<Button Content="强制重新注册转换器" Style="{StaticResource ActionButton}"
|
||||
Click="ReRegisterConverter_Click"/>
|
||||
</UniformGrid>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Header="状态" Style="{StaticResource GroupBoxStyle}">
|
||||
<TextBlock x:Name="ConversionStatusText" Text="就绪" Foreground="Gray"/>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
|
||||
<TabItem Header="触摸修复" Style="{StaticResource TabHeaderStyle}">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel Margin="8">
|
||||
<GroupBox Header="触摸检测状态" Style="{StaticResource GroupBoxStyle}">
|
||||
<StackPanel>
|
||||
<TextBlock x:Name="TouchStatusText" TextWrapping="Wrap" Margin="0,0,0,12">
|
||||
正在检测触摸状态...
|
||||
</TextBlock>
|
||||
<UniformGrid Columns="2" HorizontalAlignment="Left">
|
||||
<Button Content="检测触摸状态" Style="{StaticResource ActionButton}"
|
||||
Click="CheckTouch_Click"/>
|
||||
<Button Content="应用修复" Style="{StaticResource ActionButton}"
|
||||
Click="ApplyTouchFix_Click"/>
|
||||
</UniformGrid>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Header="修复选项" Style="{StaticResource GroupBoxStyle}">
|
||||
<StackPanel>
|
||||
<CheckBox x:Name="ForceIWBModeCheckBox" Margin="4" Content="强制启用 IWB 模式(白板模式)" IsChecked="True"/>
|
||||
<CheckBox x:Name="SkipTouchCheckCheckBox" Margin="4" Content="跳过启动时的触摸检测" IsChecked="True"/>
|
||||
<CheckBox x:Name="SuppressTouchErrorsCheckBox" Margin="4" Content="抑制触摸相关错误提示" IsChecked="True"/>
|
||||
<CheckBox x:Name="EnableFallbackModeCheckBox" Margin="4" Content="启用鼠标回退模式(触摸失效时自动切换)" IsChecked="True"/>
|
||||
<Button Content="保存触摸设置" Style="{StaticResource ActionButton}"
|
||||
HorizontalAlignment="Left" Click="SaveTouchSettings_Click"/>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Header="说明" Style="{StaticResource GroupBoxStyle}">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
• 部分学校电脑的触摸硬件本身没有故障,但希沃白板的触摸检测逻辑存在兼容性问题。
|
||||
• 本功能通过配置注册表和配置文件,强制启用触摸支持,跳过有问题的检测步骤。
|
||||
• 如果修复后触摸仍不工作,请尝试重启希沃白板。
|
||||
• 如遇到更严重的触摸问题,可使用"还原"功能恢复默认设置。
|
||||
</TextBlock>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
|
||||
<TabItem Header="关于" Style="{StaticResource TabHeaderStyle}">
|
||||
<StackPanel Margin="24" VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<TextBlock Text="Better-Seewo" FontSize="24" FontWeight="Bold"
|
||||
HorizontalAlignment="Center" Margin="0,0,0,8"/>
|
||||
<TextBlock Text="希沃白板功能增强插件" FontSize="16"
|
||||
HorizontalAlignment="Center" Margin="0,0,0,4"/>
|
||||
<TextBlock x:Name="VersionText" Text="版本 1.0.0"
|
||||
HorizontalAlignment="Center" Foreground="Gray" Margin="0,0,0,24"/>
|
||||
<Separator Margin="0,0,0,16"/>
|
||||
<TextBlock TextWrapping="Wrap" HorizontalAlignment="Center">
|
||||
Better-EN5 模块提供以下增强功能:
|
||||
• 墨迹(笔迹/标注)的独立导出和导入
|
||||
• 增强的 PPT 与 ENBX 文件转换
|
||||
• 触摸检测逻辑修复与错误抑制
|
||||
项目地址:https://github.com/anomalyco/opencode
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
</Window>
|
||||
283
Better-EN5/UI/SettingsWindow.xaml.cs
Normal file
283
Better-EN5/UI/SettingsWindow.xaml.cs
Normal file
@@ -0,0 +1,283 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using Microsoft.Win32;
|
||||
using Cvte.EasiNote;
|
||||
using BetterEN5.Services;
|
||||
|
||||
namespace BetterEN5.UI
|
||||
{
|
||||
public partial class SettingsWindow : Window
|
||||
{
|
||||
private readonly InkService _inkService = new();
|
||||
private readonly ConversionService _conversionService = new();
|
||||
|
||||
public SettingsWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
Loaded += OnLoaded;
|
||||
}
|
||||
|
||||
private async void OnLoaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
LoadSettings();
|
||||
await RefreshTouchStatusAsync();
|
||||
}
|
||||
|
||||
private void LoadSettings()
|
||||
{
|
||||
var localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
||||
var settingsFile = Path.Combine(localAppData, "Seewo", "EasiNote5", "BetterEN5", "settings.json");
|
||||
if (File.Exists(settingsFile))
|
||||
{
|
||||
try
|
||||
{
|
||||
var json = File.ReadAllText(settingsFile);
|
||||
var settings = System.Text.Json.JsonSerializer.Deserialize<SettingsData>(json);
|
||||
if (settings != null)
|
||||
{
|
||||
AutoSaveInkCheckBox.IsChecked = settings.AutoSaveInk;
|
||||
IncludeShapeInkCheckBox.IsChecked = settings.IncludeShapeInk;
|
||||
ForceIWBModeCheckBox.IsChecked = settings.ForceIWB;
|
||||
SkipTouchCheckCheckBox.IsChecked = settings.SkipTouchCheck;
|
||||
SuppressTouchErrorsCheckBox.IsChecked = settings.SuppressTouchErrors;
|
||||
EnableFallbackModeCheckBox.IsChecked = settings.EnableFallbackMode;
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveSettings()
|
||||
{
|
||||
var localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
||||
var dir = Path.Combine(localAppData, "Seewo", "EasiNote5", "BetterEN5");
|
||||
var settingsFile = Path.Combine(dir, "settings.json");
|
||||
|
||||
if (!Directory.Exists(dir)) Directory.CreateDirectory(dir);
|
||||
|
||||
var settings = new SettingsData
|
||||
{
|
||||
AutoSaveInk = AutoSaveInkCheckBox.IsChecked ?? false,
|
||||
IncludeShapeInk = IncludeShapeInkCheckBox.IsChecked ?? false,
|
||||
ForceIWB = ForceIWBModeCheckBox.IsChecked ?? true,
|
||||
SkipTouchCheck = SkipTouchCheckCheckBox.IsChecked ?? true,
|
||||
SuppressTouchErrors = SuppressTouchErrorsCheckBox.IsChecked ?? true,
|
||||
EnableFallbackMode = EnableFallbackModeCheckBox.IsChecked ?? true,
|
||||
};
|
||||
|
||||
var json = System.Text.Json.JsonSerializer.Serialize(settings, new System.Text.Json.JsonSerializerOptions
|
||||
{
|
||||
WriteIndented = true
|
||||
});
|
||||
File.WriteAllText(settingsFile, json);
|
||||
}
|
||||
|
||||
private async void ExportInk_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var dialog = new SaveFileDialog
|
||||
{
|
||||
Title = "导出墨迹",
|
||||
Filter = "墨迹文件|*.ink.json|JSON 文件|*.json|所有文件|*.*",
|
||||
DefaultExt = ".ink.json"
|
||||
};
|
||||
|
||||
if (dialog.ShowDialog() == true)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _inkService.ExportInkAsync(dialog.FileName);
|
||||
InkStatusText.Text = $"墨迹已导出至: {dialog.FileName}";
|
||||
InkStatusText.Foreground = System.Windows.Media.Brushes.Green;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
InkStatusText.Text = $"导出失败: {ex.Message}";
|
||||
InkStatusText.Foreground = System.Windows.Media.Brushes.Red;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async void ImportInk_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var dialog = new OpenFileDialog
|
||||
{
|
||||
Title = "导入墨迹",
|
||||
Filter = "墨迹文件|*.ink.json|JSON 文件|*.json|所有文件|*.*",
|
||||
DefaultExt = ".ink.json"
|
||||
};
|
||||
|
||||
if (dialog.ShowDialog() == true)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _inkService.ImportInkAsync(dialog.FileName);
|
||||
InkStatusText.Text = "墨迹已导入";
|
||||
InkStatusText.Foreground = System.Windows.Media.Brushes.Green;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
InkStatusText.Text = $"导入失败: {ex.Message}";
|
||||
InkStatusText.Foreground = System.Windows.Media.Brushes.Red;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveInkSettings_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
SaveSettings();
|
||||
InkStatusText.Text = "墨迹设置已保存";
|
||||
InkStatusText.Foreground = System.Windows.Media.Brushes.Green;
|
||||
}
|
||||
|
||||
private async void ConvertPptx_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var dialog = new OpenFileDialog
|
||||
{
|
||||
Title = "选择 PowerPoint 文件",
|
||||
Filter = "PowerPoint 文件|*.pptx|所有文件|*.*"
|
||||
};
|
||||
|
||||
if (dialog.ShowDialog() == true)
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = await _conversionService.ConvertPptxToEnbxAsync(dialog.FileName);
|
||||
ConversionStatusText.Text = $"转换完成: {result}";
|
||||
ConversionStatusText.Foreground = System.Windows.Media.Brushes.Green;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ConversionStatusText.Text = $"转换失败: {ex.Message}";
|
||||
ConversionStatusText.Foreground = System.Windows.Media.Brushes.Red;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async void ConvertEnbx_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var dialog = new OpenFileDialog
|
||||
{
|
||||
Title = "选择希沃白板课件",
|
||||
Filter = "希沃课件|*.enbx|所有文件|*.*"
|
||||
};
|
||||
|
||||
if (dialog.ShowDialog() == true)
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = await _conversionService.ConvertEnbxToPptxAsync(dialog.FileName);
|
||||
ConversionStatusText.Text = $"导出完成: {result}";
|
||||
ConversionStatusText.Foreground = System.Windows.Media.Brushes.Green;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ConversionStatusText.Text = $"导出失败: {ex.Message}";
|
||||
ConversionStatusText.Foreground = System.Windows.Media.Brushes.Red;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async void ClearConversionCache_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _conversionService.FixConversionErrorsAsync();
|
||||
ConversionStatusText.Text = "转换缓存已清理";
|
||||
ConversionStatusText.Foreground = System.Windows.Media.Brushes.Green;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ConversionStatusText.Text = $"清理失败: {ex.Message}";
|
||||
ConversionStatusText.Foreground = System.Windows.Media.Brushes.Red;
|
||||
}
|
||||
}
|
||||
|
||||
private async void ReRegisterConverter_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
var converterPath = Path.Combine(
|
||||
Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86),
|
||||
"Seewo", "EasiNote5", "EasiNote5_5.2.4.9855", "Main",
|
||||
"EasiNote.OfficeDocumentConverter.exe");
|
||||
|
||||
if (File.Exists(converterPath))
|
||||
{
|
||||
Process.Start(converterPath, "/register");
|
||||
await Task.Delay(1000);
|
||||
ConversionStatusText.Text = "转换器已重新注册";
|
||||
}
|
||||
else
|
||||
{
|
||||
ConversionStatusText.Text = "未找到转换器";
|
||||
}
|
||||
ConversionStatusText.Foreground = System.Windows.Media.Brushes.Green;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ConversionStatusText.Text = $"注册失败: {ex.Message}";
|
||||
ConversionStatusText.Foreground = System.Windows.Media.Brushes.Red;
|
||||
}
|
||||
}
|
||||
|
||||
private async void CheckTouch_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
await RefreshTouchStatusAsync();
|
||||
}
|
||||
|
||||
private async void ApplyTouchFix_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
await TouchFixService.ApplyFixAsync();
|
||||
TouchStatusText.Text = "触摸修复已应用,请重启希沃白板生效";
|
||||
TouchStatusText.Foreground = System.Windows.Media.Brushes.Green;
|
||||
SaveSettings();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
TouchStatusText.Text = $"修复失败: {ex.Message}";
|
||||
TouchStatusText.Foreground = System.Windows.Media.Brushes.Red;
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveTouchSettings_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
SaveSettings();
|
||||
TouchStatusText.Text = "触摸设置已保存";
|
||||
TouchStatusText.Foreground = System.Windows.Media.Brushes.Green;
|
||||
}
|
||||
|
||||
private async Task RefreshTouchStatusAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
var isIwb = await Task.Run(() => TouchFixService.IsTouchWorkingCorrectly());
|
||||
TouchStatusText.Text = isIwb
|
||||
? "触摸状态: 正常 (IWB 模式已启用)"
|
||||
: "触摸状态: 非 IWB 模式 (可能存在问题)";
|
||||
TouchStatusText.Foreground = isIwb
|
||||
? System.Windows.Media.Brushes.Green
|
||||
: System.Windows.Media.Brushes.Orange;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
TouchStatusText.Text = $"无法检测触摸状态: {ex.Message}";
|
||||
TouchStatusText.Foreground = System.Windows.Media.Brushes.Red;
|
||||
}
|
||||
}
|
||||
|
||||
private class SettingsData
|
||||
{
|
||||
public bool AutoSaveInk { get; set; }
|
||||
public bool IncludeShapeInk { get; set; }
|
||||
public bool ForceIWB { get; set; } = true;
|
||||
public bool SkipTouchCheck { get; set; } = true;
|
||||
public bool SuppressTouchErrors { get; set; } = true;
|
||||
public bool EnableFallbackMode { get; set; } = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user