diff --git a/Better-EN5/Better-EN5.csproj b/Better-EN5/Better-EN5.csproj
index bd2adba..03a94a7 100644
--- a/Better-EN5/Better-EN5.csproj
+++ b/Better-EN5/Better-EN5.csproj
@@ -7,8 +7,9 @@
enable
BetterEN5
Better-EN5
- 1.1.1
- 1.1.1
+ 1.1.2
+ 1.1.0.0
+ 1.1.2.0
雾启工作室
雾启工作室
雾启工作室
diff --git a/Better-EN5/Program.cs b/Better-EN5/Program.cs
index 1cc13f0..38f3963 100644
--- a/Better-EN5/Program.cs
+++ b/Better-EN5/Program.cs
@@ -35,7 +35,6 @@ namespace BetterEN5
private async void Run()
{
await Task.Delay(TimeSpan.FromSeconds(3));
- await TouchFixService.ApplyFixAsync();
ExportUIItems();
}
diff --git a/Better-EN5/Services/PatchService.cs b/Better-EN5/Services/PatchService.cs
new file mode 100644
index 0000000..e95228d
--- /dev/null
+++ b/Better-EN5/Services/PatchService.cs
@@ -0,0 +1,202 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace BetterEN5.Services
+{
+ public class PatchService
+ {
+ private readonly string _backupDir;
+ private readonly string _manifestPath;
+
+ public PatchService()
+ {
+ var appData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
+ _backupDir = Path.Combine(appData, "BetterEN5", "backup");
+ _manifestPath = Path.Combine(_backupDir, "manifest.json");
+ }
+
+ public bool IsInstalled()
+ {
+ return File.Exists(_manifestPath);
+ }
+
+ public PatchManifest GetManifest()
+ {
+ if (!IsInstalled()) return new PatchManifest();
+ try
+ {
+ var json = File.ReadAllText(_manifestPath);
+ return System.Text.Json.JsonSerializer.Deserialize(json) ?? new PatchManifest();
+ }
+ catch
+ {
+ return new PatchManifest();
+ }
+ }
+
+ public async Task InstallAsync(IProgress progress = null)
+ {
+ await Task.Run(() =>
+ {
+ progress?.Report("正在备份原始文件...");
+ Directory.CreateDirectory(_backupDir);
+ var manifest = new PatchManifest
+ {
+ InstallTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
+ Version = "1.1.2"
+ };
+
+ BackupFile(manifest,
+ Path.Combine(
+ Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
+ "Seewo", "EasiNote5", "Config", "IWBConfig.json"));
+
+ BackupFile(manifest,
+ Path.Combine(
+ Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
+ "Seewo", "EasiNote5", "Config", "TouchConfig.ini"));
+
+ var appData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
+ var cfgFkv = Path.Combine(appData, "Seewo", "EasiNote5", "Data", "Configs.fkv");
+ if (File.Exists(cfgFkv))
+ BackupFile(manifest, cfgFkv);
+
+ var mainDir = Path.Combine(
+ Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86),
+ "Seewo", "EasiNote5", "EasiNote5_5.2.4.9855", "Main");
+ var configsJson = Path.Combine(mainDir, "Configs", "configs.json");
+ if (File.Exists(configsJson))
+ BackupFile(manifest, configsJson);
+
+ progress?.Report("正在修补注册表...");
+ manifest.RegistryKeys.Add(@"HKCU\SOFTWARE\Seewo\EasiNote5\ForceIWB");
+ manifest.RegistryKeys.Add(@"HKCU\SOFTWARE\Seewo\EasiNote5\SkipTouchCheck");
+ manifest.RegistryKeys.Add(@"HKCU\SOFTWARE\Seewo\EasiNote5\EnableMultiTouch");
+
+ progress?.Report("正在应用补丁...");
+ var localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
+ var configDir = Path.Combine(localAppData, "Seewo", "EasiNote5", "Config");
+ Directory.CreateDirectory(configDir);
+
+ var iwbConfig = new
+ {
+ ForceIWB = true,
+ TouchDriverType = "WindowsTouch",
+ SkipTouchCheck = true,
+ EnableMultiTouch = true,
+ LastFixTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")
+ };
+ File.WriteAllText(Path.Combine(configDir, "IWBConfig.json"),
+ System.Text.Json.JsonSerializer.Serialize(iwbConfig, new System.Text.Json.JsonSerializerOptions { WriteIndented = true }));
+
+ var touchCfgLines = new[]
+ {
+ "[Touch]", "Enable=1", "Driver=Auto", "ForceEnable=1",
+ "SuppressErrors=1", "SkipDetection=1", "FallbackToMouse=1", "",
+ "[Calibration]", "Enabled=0", "",
+ "[MultiTouch]", "MaxPoints=10", "EnableGesture=1",
+ };
+ File.WriteAllLines(Path.Combine(configDir, "TouchConfig.ini"), touchCfgLines);
+
+ Microsoft.Win32.Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\Seewo\EasiNote5", "ForceIWB", 1, Microsoft.Win32.RegistryValueKind.DWord);
+ Microsoft.Win32.Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\Seewo\EasiNote5", "SkipTouchCheck", 1, Microsoft.Win32.RegistryValueKind.DWord);
+ Microsoft.Win32.Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\Seewo\EasiNote5", "EnableMultiTouch", 1, Microsoft.Win32.RegistryValueKind.DWord);
+
+ File.WriteAllText(_manifestPath,
+ System.Text.Json.JsonSerializer.Serialize(manifest, new System.Text.Json.JsonSerializerOptions { WriteIndented = true }));
+
+ progress?.Report("补丁安装完成");
+ });
+ }
+
+ public async Task UninstallAsync(IProgress progress = null)
+ {
+ await Task.Run(() =>
+ {
+ if (!IsInstalled())
+ {
+ progress?.Report("未检测到补丁,无需卸载");
+ return;
+ }
+
+ var manifest = GetManifest();
+ progress?.Report("正在还原注册表...");
+ foreach (var key in manifest.RegistryKeys)
+ {
+ try
+ {
+ var parts = key.Split('\\');
+ if (parts.Length >= 2)
+ {
+ var hive = parts[0];
+ var subKey = string.Join("\\", parts.Skip(1));
+ if (hive == "HKCU")
+ {
+ using var rk = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(
+ Path.GetDirectoryName(subKey)!.Replace("HKEY_CURRENT_USER\\", ""), true);
+ rk?.DeleteValue(Path.GetFileName(subKey), false);
+ }
+ }
+ }
+ catch { }
+ }
+
+ progress?.Report("正在还原备份文件...");
+ foreach (var backup in manifest.Backups)
+ {
+ try
+ {
+ if (File.Exists(backup.BackupPath))
+ {
+ File.Copy(backup.BackupPath, backup.OriginalPath, true);
+ File.Delete(backup.BackupPath);
+ }
+ }
+ catch { }
+ }
+
+ try
+ {
+ if (File.Exists(_manifestPath))
+ File.Delete(_manifestPath);
+ }
+ catch { }
+
+ progress?.Report("卸载完成,建议重启希沃白板");
+ });
+ }
+
+ private void BackupFile(PatchManifest manifest, string filePath)
+ {
+ if (!File.Exists(filePath)) return;
+ var backupPath = filePath + ".bak";
+ try
+ {
+ File.Copy(filePath, backupPath, true);
+ manifest.Backups.Add(new PatchBackupEntry
+ {
+ OriginalPath = filePath,
+ BackupPath = backupPath
+ });
+ }
+ catch { }
+ }
+ }
+
+ public class PatchManifest
+ {
+ public string Version { get; set; } = "";
+ public string InstallTime { get; set; } = "";
+ public List Backups { get; set; } = new();
+ public List RegistryKeys { get; set; } = new();
+ }
+
+ public class PatchBackupEntry
+ {
+ public string OriginalPath { get; set; } = "";
+ public string BackupPath { get; set; } = "";
+ }
+}
diff --git a/Better-EN5/UI/BetterSeewoMainWindow.xaml b/Better-EN5/UI/BetterSeewoMainWindow.xaml
index f1d6576..02544ba 100644
--- a/Better-EN5/UI/BetterSeewoMainWindow.xaml
+++ b/Better-EN5/UI/BetterSeewoMainWindow.xaml
@@ -15,19 +15,12 @@
#D0D0E0
#707090
-
-
-
-
-
-
+
-
@@ -76,7 +69,12 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+ • 安装补丁:备份希沃白板关键配置文件,然后应用增强补丁。
+ • 卸载补丁:从备份文件(.bak)还原原始配置,清除注册表修改。
+ • 安装后请重启希沃白板使补丁生效。
+ • 补丁不修改希沃白板主程序文件,仅修改配置和注册表。
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
diff --git a/Better-EN5/UI/BetterSeewoMainWindow.xaml.cs b/Better-EN5/UI/BetterSeewoMainWindow.xaml.cs
index ae28e9a..e83f5a7 100644
--- a/Better-EN5/UI/BetterSeewoMainWindow.xaml.cs
+++ b/Better-EN5/UI/BetterSeewoMainWindow.xaml.cs
@@ -4,7 +4,6 @@ using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
-using System.Windows.Media.Animation;
using Microsoft.Win32;
using BetterEN5.Services;
@@ -13,8 +12,8 @@ namespace BetterEN5.UI
public partial class BetterSeewoMainWindow : Window
{
private readonly InkService _inkService = new();
- private readonly ConversionService _conversionService = new();
private readonly ActivationService _activationService = new();
+ private readonly PatchService _patchService = new();
public BetterSeewoMainWindow()
{
@@ -22,36 +21,95 @@ namespace BetterEN5.UI
Loaded += OnLoaded;
}
- private void OnLoaded(object sender, RoutedEventArgs e)
+ private async void OnLoaded(object sender, RoutedEventArgs e)
{
- var sb = (Storyboard)TryFindResource("ScaleInStoryboard");
- if (sb != null) BeginStoryboard(sb);
- _ = RefreshStatusAsync();
+ await RefreshInstallStatusAsync();
}
private void NavChanged(object sender, RoutedEventArgs e)
{
- if (sender == NavInk) ShowPanel(PanelInk);
+ if (sender == NavInstall) ShowPanel(PanelInstall);
+ else if (sender == NavInk) ShowPanel(PanelInk);
else if (sender == NavConvert) ShowPanel(PanelConvert);
else if (sender == NavTouch) ShowPanel(PanelTouch);
- else if (sender == NavBoard) ShowPanel(PanelBoard);
else if (sender == NavActivate) ShowPanel(PanelActivate);
}
private void ShowPanel(StackPanel panel)
{
- foreach (var p in new[] { PanelInk, PanelConvert, PanelTouch, PanelBoard, PanelActivate })
+ foreach (var p in new[] { PanelInstall, PanelInk, PanelConvert, PanelTouch, PanelActivate })
p.Visibility = p == panel ? Visibility.Visible : Visibility.Collapsed;
}
- private async Task RefreshStatusAsync()
+ private async Task RefreshInstallStatusAsync()
{
- var touchOk = await Task.Run(() => TouchFixService.IsTouchWorkingCorrectly());
- TouchStatus.Text = touchOk ? "✅ IWB 模式已启用" : "⚠️ 未启用 IWB 模式";
- var info = await Task.Run(() => _activationService.GetCurrentStatus());
- ActivationStatusText.Text = info.IsProfessional
- ? $"✅ 专业版 · {info.LastActivationDate}"
- : "🔓 社区版";
+ var installed = await Task.Run(() => _patchService.IsInstalled());
+ InstallBtn.IsEnabled = !installed;
+ UninstallBtn.IsEnabled = installed;
+ InstallStatusText.Text = installed
+ ? "✅ 补丁已安装"
+ : "⚠️ 补丁未安装";
+ if (installed)
+ {
+ var m = await Task.Run(() => _patchService.GetManifest());
+ PatchDetailText.Text = $"版本: {m.Version} | 安装时间: {m.InstallTime} | 备份文件: {m.Backups.Count} 个 | 注册表项: {m.RegistryKeys.Count} 个";
+ }
+ else
+ {
+ PatchDetailText.Text = "尚未安装补丁。点击「安装补丁」将备份关键配置并应用增强补丁。";
+ }
+ }
+
+ private async void InstallPatch_Click(object s, RoutedEventArgs e)
+ {
+ var progress = new Progress(msg =>
+ {
+ Dispatcher.Invoke(() => PatchDetailText.Text = msg);
+ });
+ InstallBtn.IsEnabled = false;
+ UninstallBtn.IsEnabled = false;
+ InstallStatusText.Text = "⏳ 正在安装...";
+ try
+ {
+ await _patchService.InstallAsync(progress);
+ InstallStatusText.Text = "✅ 补丁已安装";
+ UninstallBtn.IsEnabled = true;
+ }
+ catch (Exception ex)
+ {
+ InstallStatusText.Text = "❌ 安装失败";
+ PatchDetailText.Text = ex.Message;
+ InstallBtn.IsEnabled = true;
+ }
+ }
+
+ private async void UninstallPatch_Click(object s, RoutedEventArgs e)
+ {
+ var result = MessageBox.Show(this,
+ "确定要卸载 Better-Seewo 补丁吗?\n将还原备份文件并清除注册表修改。",
+ "卸载确认", MessageBoxButton.YesNo, MessageBoxImage.Question);
+ if (result != MessageBoxResult.Yes) return;
+
+ var progress = new Progress(msg =>
+ {
+ Dispatcher.Invoke(() => PatchDetailText.Text = msg);
+ });
+ InstallBtn.IsEnabled = false;
+ UninstallBtn.IsEnabled = false;
+ InstallStatusText.Text = "⏳ 正在卸载...";
+ try
+ {
+ await _patchService.UninstallAsync(progress);
+ InstallStatusText.Text = "✅ 补丁已卸载";
+ InstallBtn.IsEnabled = true;
+ PatchDetailText.Text = "卸载完成。建议重启希沃白板。";
+ }
+ catch (Exception ex)
+ {
+ InstallStatusText.Text = "❌ 卸载失败";
+ PatchDetailText.Text = ex.Message;
+ UninstallBtn.IsEnabled = true;
+ }
}
private void Minimize_Click(object s, RoutedEventArgs e) => WindowState = WindowState.Minimized;
@@ -95,7 +153,7 @@ namespace BetterEN5.UI
await ProgressDialog.Show(this, "转换文件", async p =>
{
p.UpdateStatus("正在转换 PPT → ENBX...", "调用转换器");
- var result = await _conversionService.ConvertPptxToEnbxAsync(dialog.FileName);
+ var result = await new ConversionService().ConvertPptxToEnbxAsync(dialog.FileName);
p.UpdateStatus("转换完成", Path.GetFileName(result));
});
}
@@ -109,7 +167,7 @@ namespace BetterEN5.UI
await ProgressDialog.Show(this, "转换文件", async p =>
{
p.UpdateStatus("正在转换 ENBX → PPT...", "调用转换器");
- var result = await _conversionService.ConvertEnbxToPptxAsync(dialog.FileName);
+ var result = await new ConversionService().ConvertEnbxToPptxAsync(dialog.FileName);
p.UpdateStatus("导出完成", Path.GetFileName(result));
});
}
@@ -134,30 +192,6 @@ namespace BetterEN5.UI
TouchStatus.Text = "修复已应用,请重启";
}
- private async void EnableBoardSupport_Click(object s, RoutedEventArgs e)
- {
- await ProgressDialog.Show(this, "大屏支持", async p =>
- {
- p.UpdateStatus("正在配置大屏模式...", "修补 Configs.fkv");
- await _activationService.ApplyBoardSupportPatchAsync();
- p.UpdateStatus("正在写入注册表...", "大屏相关键值");
- await Task.Delay(200);
- p.UpdateStatus("完成", "大屏模式已配置");
- });
- BoardStatus.Text = "大屏模式已配置";
- }
-
- private async void EnableIWB_Click(object s, RoutedEventArgs e)
- {
- await ProgressDialog.Show(this, "IWB 模式", async p =>
- {
- p.UpdateStatus("正在启用 IWB 模式...", "注册表 + 配置文件");
- await _activationService.EnableIWBForNonTouchAsync();
- p.UpdateStatus("完成", "IWB 模式已启用,重启生效");
- });
- BoardStatus.Text = "IWB 已启用";
- }
-
private async void ActivatePro_Click(object s, RoutedEventArgs e)
{
var dlg = new ActivateDialog();
diff --git a/Better-EN5/manifest.coin b/Better-EN5/manifest.coin
index 63642c5..5f14b4a 100644
--- a/Better-EN5/manifest.coin
+++ b/Better-EN5/manifest.coin
@@ -24,5 +24,5 @@ Preinstalled
False
>
Version
-1.1.1
+1.1.2
>
diff --git a/使用说明.txt b/使用说明.txt
index ee43b1e..5182de4 100644
--- a/使用说明.txt
+++ b/使用说明.txt
@@ -1,6 +1,6 @@
Better-Seewo 增强插件 - 使用说明
====================================
-版本:1.1.1 | 作者:雾启工作室
+版本:1.1.2 | 作者:雾启工作室 × Macrohard Studio
项目地址:http://171.80.3.149:4321/miao-moe/Better-Seewo
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
diff --git a/安装插件.bat b/安装插件.bat
index 2cb9e33..17d4e96 100644
--- a/安装插件.bat
+++ b/安装插件.bat
@@ -11,7 +11,7 @@ if %errorLevel% neq 0 (
)
echo ========================================
-echo Better-Seewo 增强插件 v1.1.1 安装
+echo Better-Seewo 增强插件 v1.1.2 安装
echo 雾启工作室
echo ========================================
echo.