mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 17:57:01 +08:00
rft: WpfGui重构 一键长草任务callback拆分 (#11548)
* rft: 通知拆分 * rft: 移动InvokeProcSubTaskMsg至TaskQueueViewModel * perf: 优化调用
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// <copyright file="ConnectSettingsUserControlModel.cs" company="MaaAssistantArknights">
|
||||
// <copyright file="StartUpSettingsUserControlModel.cs" company="MaaAssistantArknights">
|
||||
// MaaWpfGui - A part of the MaaCoreArknights project
|
||||
// Copyright (C) 2021 MistEO and Contributors
|
||||
//
|
||||
@@ -13,11 +13,12 @@
|
||||
#nullable enable
|
||||
using MaaWpfGui.Constants;
|
||||
using MaaWpfGui.Helper;
|
||||
using Stylet;
|
||||
using MaaWpfGui.Main;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace MaaWpfGui.ViewModels.UserControl.TaskQueue;
|
||||
|
||||
public class StartUpSettingsUserControlModel : PropertyChangedBase
|
||||
public class StartUpSettingsUserControlModel : TaskViewModel
|
||||
{
|
||||
static StartUpSettingsUserControlModel()
|
||||
{
|
||||
@@ -44,4 +45,12 @@ public class StartUpSettingsUserControlModel : PropertyChangedBase
|
||||
{
|
||||
Instances.TaskQueueViewModel.QuickSwitchAccount();
|
||||
}
|
||||
|
||||
public override void ProcSubTaskMsg(AsstMsg msg, JObject details)
|
||||
{
|
||||
if (msg == AsstMsg.SubTaskExtraInfo && details["what"]?.ToString() == "AccountSwitch")
|
||||
{
|
||||
Instances.TaskQueueViewModel.AddLog(LocalizationHelper.GetString("AccountSwitch") + $" -->> {details["details"]!["account_name"]}", UiLogColor.Info); // subTaskDetails!["current_account"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user