Commit Graph

58 Commits

Author SHA1 Message Date
ema
a960f76920 feat: restore from another instance 2024-11-04 03:45:08 +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
辉鸭蛋
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
辉鸭蛋
2d4a6192f2 fix #606 2024-09-11 22:30:34 +08:00
辉鸭蛋
c9f7b3a14b auto wood: automatically disable logging function upon initial failure 2024-09-01 00:22:08 +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
ema
fe418e7bc4 update server b login pos #495 2024-08-04 15:21:51 +08:00
ema
a1c5c25623 change server b identity 2024-08-04 15:15:34 +08:00
辉鸭蛋
a0e241baee close auto wood ocr default #444 2024-06-16 08:43:21 +08:00
辉鸭蛋
ffe5452f91 auto wood: fix repeated add 2024-06-07 23:41:36 +08:00
辉鸭蛋
6ffe7a670c prevent computer screen shutdown during auto wood #387 2024-05-19 21:28:49 +08:00
辉鸭蛋
54b669de90 press two esc to close tips #235 2024-05-19 21:18:04 +08:00
辉鸭蛋
65acb852f3 add enable switch for #398 2024-05-19 20:59:54 +08:00
atiasn
9e3d16c819 check wood 2024-05-17 21:57:53 +08:00
atiasn
8513c9ed4f return ocr 2024-05-16 19:40:27 +08:00
Atiasn
bb3941d9f5 get best ocr 2024-05-16 18:12:59 +08:00
atiasn
27e6de0fbf delete indexOf 2024-05-16 00:59:17 +08:00
atiasn
3792a5f0bf sleep 2024-05-15 00:19:07 +08:00
atiasn
fec0e8ec39 wood counts 2024-05-15 00:06:09 +08:00
Atiasn
bd4223ddaa wood class 2024-05-14 18:15:20 +08:00
Atiasn
3a35d537b6 woods 2024-05-14 17:06:21 +08:00
atiasn
87a39c95eb 只对首次进行OCR识别 2024-05-14 01:46:27 +08:00
Atiasn
fb1eeed107 wood count 2024-05-13 16:40:04 +08:00
atiasn
cfe9fc6389 伐木计数 2024-05-13 00:49:29 +08:00
ema
9378a134bd remove: package H.InputSimulator #154 2024-05-12 05:16:27 +08:00
辉鸭蛋
dabdfa51f4 fix boundary overflow after switching game resolution 2024-05-05 22:51:11 +08:00
辉鸭蛋
667043594c refactor: remove ClickOffset 2024-05-04 12:33:27 +08:00
辉鸭蛋
6b98424603 refactor: auto wood & fix game loading trigger 2024-05-03 13:33:56 +08:00
辉鸭蛋
c2d3e132e8 refactor: RectArea -> Region compilation passed 2024-05-02 14:45:07 +08:00
辉鸭蛋
bdc99e9e06 all assets to singleton 2024-04-04 14:38:04 +08:00
辉鸭蛋
0d6ad22a22 fix Monitor.Exit() throw exception when use "async" worker functions 2024-03-17 00:15:26 +08:00
辉鸭蛋
29e679d1fd GC for #311 2024-03-16 21:13:59 +08:00
辉鸭蛋
037d4dadff add lock for independent task 2024-03-16 15:20:01 +08:00
辉鸭蛋
6ba56fe6e2 add using keyword #311 2024-03-14 00:32:43 +08:00
ema
c5f81dd447 restruct: Retry methods 2024-02-29 10:29:29 +08:00
huiyadanli
2f29ab7fae using debug log level to print StackTrace 2024-01-09 23:42:00 +08:00
huiyadanli
427ed0045f team identification 2023-12-30 13:53:07 +08:00
huiyadanli
0c52e3b85b init team avatars 2023-12-30 00:11:59 +08:00
huiyadanli
da40679559 last felling don't exit game 2023-12-24 19:57:50 +08:00
ema
dff7d58873 NumEnter key support was added to the Fischless.WindowsInput 2023-12-19 00:03:20 +08:00
ema
c9b890536f fix override controller settings for auto wood #98 2023-12-11 05:07:16 +08:00
huiyadanli
4bf302b013 auto wood custom buttons #98 2023-12-10 13:51:52 +08:00
huiyadanli
8d25e6dcad auto wood support #125 2023-12-06 00:28:39 +08:00
ema
dc68f63d86 one more try login for auto wood bilibili 2023-12-04 02:32:35 +08:00
huiyadanli
a989db29e7 quick teleport ui & performance optimization 2023-12-03 12:55:11 +08:00
huiyadanli
e2fddc436d auto wood z delay config 2023-12-02 18:35:00 +08:00
huiyadanli
2a48054472 fix auto wood not work in other resolutions #113 2023-11-30 23:20:45 +08:00