Commit Graph

87 Commits

Author SHA1 Message Date
郝凯阳
7b56d15043 auto tcg: update character card config to v5.6 (#1582) 2025-05-12 18:05:15 +08:00
Shatyuka
b2958ac646 用Image<Rgb24>替换Bitmap (#1563) 2025-05-11 11:03:53 +08:00
Takaranoao
5b3bac478d 升级多个依赖&增加额外的推理加速功能&迁移OCR (#1459)
* 更新多个NuGet包至最新版本

* 重构模型加载以适应yolosharp

* feat: 改变接口。TensorRT缓存的初步支持,修改配置项。

* 更新依赖并调整变量顺序,修复加载问题

* 更新AvalonEdit和Microsoft.ML.OnnxRuntime包至最新版本,以修复问题

* fix: downgrade Microsoft.ML.OnnxRuntime.DirectML to version 1.21.0

* typo

* fix: change log level from warning to error for ONNX provider loading failure

* 增加 paddle ocr 的 onnx 模型

* feat: add PaddleOCR models for Chinese, English, and Latin recognition

* 使用cv的DNN生成Tensor,加速Yap文字识别

* feat: 尝试搓一个onnx的ocr

* clean up code

* chore: update OpenCvSharp4 package versions to 4.10.0.20241108

* 修复因格式化代码而丢的引用

* chore: update Microsoft.ML.OnnxRuntime.DirectML package to version 1.21.1 and improve logging for ONNX provider initialization

* chore: 等yolosharp更新再升级onnx

* chore: add Microsoft.ML.OnnxRuntime.Managed package and clean up logging in Det class

* fix: refactor output tensor handling in Det class for improved clarity

* 补充注释,修复DML的OCR问题

* 默认OCR推理使用CPU,整理配置

* fix error NETSDK1152: 找到了多个具有相同相对路径的发布输出文件

* fix(logging): enhance debug log for ONNX initialization with provider details

* 修复TensorRT模型缓存的加载问题

* fix(onnx): improve cached model retrieval and add file existence check

* fix(ocr): replace SrcGreyMat with SrcMat for region of interest processing

* fix(onnx): add file existence check for cached model and adjust session options for DirectML provider

* 增加硬件加速配置UI界面

* 移除旧的OCR模型

* 错别字

---------

Co-authored-by: 辉鸭蛋 <huiyadanli@gmail.com>
2025-05-11 01:08:37 +08:00
提瓦特钓鱼玳师
cb9d53fe57 添加异步目录读取 (#1472) 2025-04-24 23:15:10 +08:00
郝凯阳
bd67d4df30 auto tcg: update character card config to v5.5 (#1359) 2025-03-28 12:11:14 +08:00
郝凯阳
dccc116ea8 auto tcg: update character card config to v5.4 (#1148)
Co-authored-by: haokaiyang <haokaiyang@cmcm.com>
2025-02-12 15:31:20 +08:00
辉鸭蛋
92516c26d2 支持配置要通知的事件 2025-02-04 17:11:53 +08:00
辉鸭蛋
644c3d0193 更多任务支持 2025-02-03 15:54:19 +08:00
辉鸭蛋
1efd8d9454 重构通知模块 2025-02-03 15:02:25 +08:00
辉鸭蛋
f19ee557b2 Merge branch 'main' into webhook 2025-01-27 13:57:23 +08:00
辉鸭蛋
3c84f3817d auto tcg: fix error 2025-01-24 22:48:25 +08:00
Scarlet
cb84ae36d0 feat: integrate send() method into notification to allow for shorter call 2025-01-22 12:34:42 -06:00
Scarlet
2181e74a30 feat: unify factories; allow creating from actual params to instantiate a builder 2025-01-21 23:42:31 -06:00
Scarlet
50513613de feature: notification-based webhook 2025-01-21 22:22:27 -06:00
辉鸭蛋
ccc5c68c1c auto tcg force check resolution 2025-01-15 01:05:28 +08:00
haokaiyang
663277a990 auto tcg: update character card config to v5.3 2025-01-02 11:55:57 +08:00
辉鸭蛋
e497f6ec79 1. 抽离部分内部类,格式化代码
2. ValueTuple 已过时,元组建议使用 ()
3. 暂停变量不建议放在 TaskContext.Instance().Config.Suspend 中,会被持久化到配置内
4. 修改一些方法和变量的存放位置
2024-12-21 14:35:42 +08:00
zjl
b99144cd3d 调整暂停为sleep方式,能一直维持,除了离开太远,会跳过当前任务,应该没多大问题。低血量尝试队伍回血。调度器右键重命名。 2024-12-20 20:13:51 +08:00
zjl
5162bcc88f 参考失焦,增加了快捷键暂停。调度器任务支持从指定任务开始(右键 下一个任务从此执行,重启软件,或取出待执行任务后,该状态将会清空)。 2024-12-17 23:12:56 +08:00
haokaiyang
36c0fb0f13 auto tcg: update character card config to v5.2 2024-11-21 11:32:42 +08:00
辉鸭蛋
a4bc632ae7 ui test
新增任务类属性和配置页面,优化日志记录

在 `BetterGenshinImpact.csproj` 文件中,添加了两个新文件夹路径 `GameTask\OneDragon\` 和 `User\AutoPathing\`。

在多个任务类文件中(如 `AutoDomainTask.cs`、`AutoFightTask.cs`、`AutoGeniusInvokationTask.cs`、`AutoMusicGameTask.cs`、`AutoWoodTask.cs`),新增了 `Name` 属性。

在 `PickAroundHandler.cs` 文件中,优化了 `RunAsync` 方法的日志记录,并添加了超时检查。

在 `ISoloTask.cs` 文件中,新增了 `Name` 属性和 `Start` 方法的接口定义。

在 `OneDragonTaskItem.cs` 文件中,新增了 `ViewModel` 属性。

在 `OneDragonFlowPage.xaml` 文件中,右侧配置部分从 `StackPanel` 改为 `ContentControl`,并添加了 `DataTemplate` 以支持不同任务类型的配置页面。

在 `IViewModel.cs` 文件中,将 `IViewModel` 接口的访问修饰符从 `internal` 改为 `public`。

在 `OneDragonFlowViewModel.cs` 文件中,初始化了任务项的 `ViewModel` 属性。

在 `ScriptControlViewModel.cs` 文件中,移除了构造函数的 `HomePageViewModel` 参数。

新增了 `LoginConfigViewModel.cs` 和 `MailConfigViewModel.cs` 文件,定义了相应的 ViewModel 类。

新增了 `LoginConfigPage.xaml` 和 `MailConfigPage.xaml` 文件,定义了相应的 XAML 布局及其交互逻辑。
2024-10-19 17:42:58 +08:00
辉鸭蛋
11ec9bc45d refactor: CancellationTokenSource -> CancellationToken 2024-10-19 01:50:21 +08:00
haokaiyang
f20cf89d5f auto tcg: update character card config to v5.1 2024-10-09 11:25:59 +08:00
辉鸭蛋
5a0f7226ed update ISoloTask
更新 Start 方法以接受 CancellationTokenSource 参数

这些更改主要是为了使 `Start` 方法能够接受 `CancellationTokenSource` 参数,从而更好地控制任务的取消操作。通过传递 `CancellationTokenSource`,可以在需要时取消正在运行的任务,提高了代码的灵活性和可控性。

具体更改包括:
- 将 `Start` 方法的签名从无参数更改为接受 `CancellationTokenSource` 参数。
- 在多个任务类(如 `AutoDomainTask.cs`、`AutoFightTask.cs`、`AutoGeniusInvokationTask.cs`、`AutoMusicGameTask.cs`、`AutoWoodTask.cs`)中,更新 `Start` 方法以接受并使用传入的 `CancellationTokenSource`。
- 在 `Duel.cs` 中,更新 `RunAsync` 和 `Run` 方法的参数以接受 `CancellationTokenSource`,并将 `Cts` 赋值为传入的 `cts`。
- 在 `ISoloTask.cs` 接口中,更新 `Start` 方法的签名以接受 `CancellationTokenSource` 参数。
- 在 `TaskRunner.cs` 中,调用 `soloTask.Start` 时传入 `CancellationContext.Instance.Cts` 作为参数。
2024-09-23 00:04:09 +08:00
辉鸭蛋
8bb1d728ff refactor: solo task 2024-09-22 23:56:39 +08:00
haokaiyang
201ac734cb auto tcg: update character card config to v5.0 2024-08-30 11:23:39 +08:00
ema
24d798d6b2 UI/UX: use MessageBox from Violeta 2024-08-20 23:46:29 +08:00
qhy040404
c490d29aa1 code cleanup 2024-08-14 18:01:02 +08:00
辉鸭蛋
3b8429d3c4 auto tcg: add Kaveh 2024-07-28 13:53:49 +08:00
辉鸭蛋
059e21775f unified capture image method 2024-07-21 20:38:06 +08:00
haokaiyang
56c46b1e46 auto tcg: update character card config to v4.8 2024-07-17 11:43:44 +08:00
haokaiyang
b0f3cb9abb auto tcg: update character card config to v4.7 2024-06-05 13:28:59 +08:00
ema
9378a134bd remove: package H.InputSimulator #154 2024-05-12 05:16:27 +08:00
辉鸭蛋
b1e33a6339 refactor: QuickSereniteaPotTask 2024-05-04 11:49:22 +08:00
辉鸭蛋
98b744f33f auto tcg opt 2024-05-03 21:24:17 +08:00
辉鸭蛋
c2d3e132e8 refactor: RectArea -> Region compilation passed 2024-05-02 14:45:07 +08:00
辉鸭蛋
18c1e9f978 automatically restart the dispatcher when the game window size changes 2024-04-28 00:01:04 +08:00
郝凯阳
c27150d4d3 Merge branch 'babalae:main' into main 2024-04-24 10:55:40 +08:00
haokaiyang
e0ea024631 auto tcg: update character card config to v4.6 2024-04-24 10:52:46 +08:00
辉鸭蛋
94a049e066 fix compilation error 2024-04-04 14:48:01 +08:00
辉鸭蛋
bdc99e9e06 all assets to singleton 2024-04-04 14:38:04 +08:00
Mr-Quin
97f2dc4550 Small refactor to NotificationHelper 2024-03-30 15:23:53 -07:00
Mr-Quin
63bec641af Simplify notification creation 2024-03-30 13:57:03 -07:00
Mr-Quin
04ce508efd Slightly simplify call to NotifyAllNotifiersAsync 2024-03-30 13:57:03 -07:00
Mr-Quin
911ee49083 Refactor notification 2024-03-30 13:57:02 -07:00
Mr-Quin
e62516c9ce Add notification to task 2024-03-30 13:57:02 -07:00
Mr-Quin
675d3cdb50 Change all references of Retry to NewRetry 2024-03-29 20:26:22 -07:00
辉鸭蛋
0d6ad22a22 fix Monitor.Exit() throw exception when use "async" worker functions 2024-03-17 00:15:26 +08:00
辉鸭蛋
037d4dadff add lock for independent task 2024-03-16 15:20:01 +08:00
郝凯阳
ede7751ebf auto tcg: update character card config to v4.5 (#310) 2024-03-13 11:30:47 +08:00