Commit Graph

71 Commits

Author SHA1 Message Date
辉鸭蛋
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
haokaiyang
7b721ee13c auto tcg: update character card config to v4.5 2024-03-13 10:37:40 +08:00
ema
c5f81dd447 restruct: Retry methods 2024-02-29 10:29:29 +08:00
haokaiyang
9162e5970c auto tcg: update character card config to v4.4 2024-01-31 16:23:37 +08:00
huiyadanli
149f964350 auto tcg: edit log skill name #217 2024-01-21 21:56:56 +08:00
huiyadanli
85f87b02aa auto tcg: default character card config #217 2024-01-21 21:39:11 +08:00
huiyadanli
7883cc2d29 auto genius invokation: optimize dice count OCR & dice recognition is sorted by character element priority #165 2024-01-13 22:49:14 +08:00
huiyadanli
2f29ab7fae using debug log level to print StackTrace 2024-01-09 23:42:00 +08:00
huiyadanli
0c52e3b85b init team avatars 2023-12-30 00:11:59 +08:00
huiyadanli
c6d28874df auto genius invokation: dice OCR determination 2->4 2023-12-24 19:51:33 +08:00
huiyadanli
703e27662c auto genius invokation optimize #136 2023-12-10 13:25:42 +08:00
huiyadanli
b45bbf9030 auto genius invokation: retry multi when capture failed 2023-12-06 23:06:51 +08:00
huiyadanli
6d485dca94 auto genius invokation for keqing #130 2023-12-05 01:59:23 +08:00
huiyadanli
56473d79a4 detailed error logs switch 2023-12-03 13:44:31 +08:00
huiyadanli
f8f8414909 AutoGeniusInvokation: fix last card burning 2 2023-11-26 00:07:50 +08:00
huiyadanli
408e372481 auto wood 2023-11-25 22:30:18 +08:00
huiyadanli
9fe2a75db2 auto genius invokation: fix PredictionDiceType, switching characters does not require specific dice 2023-11-25 16:51:33 +08:00