mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 02:10:21 +08:00
refactor: wpf拆分Enum
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
// </copyright>
|
||||
|
||||
#nullable enable
|
||||
using System;
|
||||
using MaaWpfGui.Constants.Enums;
|
||||
using static MaaWpfGui.Main.AsstProxy;
|
||||
|
||||
namespace MaaWpfGui.Configuration.Single.MaaTask;
|
||||
@@ -225,52 +225,3 @@ public enum RoguelikeMode
|
||||
/// </summary>
|
||||
Exploration = 7,
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum RoguelikeCollectibleAward
|
||||
{
|
||||
/// <summary>
|
||||
/// 热水壶, Roguelike@LastReward
|
||||
/// </summary>
|
||||
HotWater = 1 << 0,
|
||||
|
||||
/// <summary>
|
||||
/// 护盾, Roguelike@LastReward2
|
||||
/// </summary>
|
||||
Shield = 1 << 1,
|
||||
|
||||
/// <summary>
|
||||
/// 源石锭, Roguelike@LastReward3
|
||||
/// </summary>
|
||||
Ingot = 1 << 2,
|
||||
|
||||
/// <summary>
|
||||
/// 2希望, Roguelike@LastReward4
|
||||
/// </summary>
|
||||
Hope = 1 << 3,
|
||||
|
||||
/// <summary>
|
||||
/// 随机, Roguelike@LastRewardRand
|
||||
/// </summary>
|
||||
Random = 1 << 4,
|
||||
|
||||
/// <summary>
|
||||
/// 钥匙, Mizuki@Roguelike@LastReward5
|
||||
/// </summary>
|
||||
Key = 1 << 5,
|
||||
|
||||
/// <summary>
|
||||
/// 骰子, Mizuki@Roguelike@LastReward6
|
||||
/// </summary>
|
||||
Dice = 1 << 6,
|
||||
|
||||
/// <summary>
|
||||
/// 构想, Sarkaz@Roguelike@LastReward5
|
||||
/// </summary>
|
||||
Idea = 1 << 7,
|
||||
|
||||
/// <summary>
|
||||
/// 票券, JieGarden@Roguelike@LastReward5
|
||||
/// </summary>
|
||||
Ticket = 1 << 8,
|
||||
}
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
// <copyright file="Enums.cs" company="MaaAssistantArknights">
|
||||
// Part of the MaaWpfGui project, maintained by the MaaAssistantArknights team (Maa Team)
|
||||
// Copyright (C) 2021-2025 MaaAssistantArknights Contributors
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License v3.0 only as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY
|
||||
// </copyright>
|
||||
|
||||
namespace MaaWpfGui.Constants
|
||||
{
|
||||
public static class Enums
|
||||
{
|
||||
public enum MirrorChyanErrorCode
|
||||
{
|
||||
/// <summary>
|
||||
/// 请求成功
|
||||
/// </summary>
|
||||
Success = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 参数不正确,请参考集成文档
|
||||
/// </summary>
|
||||
InvalidParams = 1001,
|
||||
|
||||
/// <summary>
|
||||
/// CDK 已过期
|
||||
/// </summary>
|
||||
KeyExpired = 7001,
|
||||
|
||||
/// <summary>
|
||||
/// CDK 错误
|
||||
/// </summary>
|
||||
KeyInvalid = 7002,
|
||||
|
||||
/// <summary>
|
||||
/// CDK 今日下载次数已达上限
|
||||
/// </summary>
|
||||
ResourceQuotaExhausted = 7003,
|
||||
|
||||
/// <summary>
|
||||
/// CDK 类型和待下载的资源不匹配
|
||||
/// </summary>
|
||||
KeyMismatched = 7004,
|
||||
|
||||
/// <summary>
|
||||
/// 对应架构和系统下的资源不存在
|
||||
/// </summary>
|
||||
ResourceNotFound = 8001,
|
||||
|
||||
/// <summary>
|
||||
/// 错误的系统参数
|
||||
/// </summary>
|
||||
InvalidOs = 8002,
|
||||
|
||||
/// <summary>
|
||||
/// 错误的架构参数
|
||||
/// </summary>
|
||||
InvalidArch = 8003,
|
||||
|
||||
/// <summary>
|
||||
/// 错误的更新通道参数
|
||||
/// </summary>
|
||||
InvalidChannel = 8004,
|
||||
|
||||
/// <summary>
|
||||
/// 未区分的业务错误,以响应体 JSON 的 msg 为准
|
||||
/// </summary>
|
||||
Undivided = 1,
|
||||
}
|
||||
|
||||
public enum AchievementCategory
|
||||
{
|
||||
/// <summary>
|
||||
/// 基础使用类
|
||||
/// </summary>
|
||||
BasicUsage,
|
||||
|
||||
/// <summary>
|
||||
/// 功能探索类
|
||||
/// </summary>
|
||||
FeatureExploration,
|
||||
|
||||
/// <summary>
|
||||
/// 自动战斗
|
||||
/// </summary>
|
||||
AutoBattle,
|
||||
|
||||
/// <summary>
|
||||
/// 搞笑/梗类成就
|
||||
/// </summary>
|
||||
Humor,
|
||||
|
||||
/// <summary>
|
||||
/// BUG 相关
|
||||
/// </summary>
|
||||
BugRelated,
|
||||
|
||||
/// <summary>
|
||||
/// 用户行为 习惯 时长类
|
||||
/// </summary>
|
||||
Behavior,
|
||||
|
||||
/// <summary>
|
||||
/// 彩蛋类
|
||||
/// </summary>
|
||||
EasterEgg,
|
||||
|
||||
/// <summary>
|
||||
/// 超级稀有!
|
||||
/// </summary>
|
||||
Rare,
|
||||
}
|
||||
}
|
||||
}
|
||||
57
src/MaaWpfGui/Constants/Enums/AchievementCategory.cs
Normal file
57
src/MaaWpfGui/Constants/Enums/AchievementCategory.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
// <copyright file="AchievementCategory.cs" company="MaaAssistantArknights">
|
||||
// Part of the MaaWpfGui project, maintained by the MaaAssistantArknights team (Maa Team)
|
||||
// Copyright (C) 2021-2025 MaaAssistantArknights Contributors
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License v3.0 only as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY
|
||||
// </copyright>
|
||||
|
||||
namespace MaaWpfGui.Constants.Enums;
|
||||
|
||||
public enum AchievementCategory
|
||||
{
|
||||
/// <summary>
|
||||
/// 基础使用类
|
||||
/// </summary>
|
||||
BasicUsage,
|
||||
|
||||
/// <summary>
|
||||
/// 功能探索类
|
||||
/// </summary>
|
||||
FeatureExploration,
|
||||
|
||||
/// <summary>
|
||||
/// 自动战斗
|
||||
/// </summary>
|
||||
AutoBattle,
|
||||
|
||||
/// <summary>
|
||||
/// 搞笑/梗类成就
|
||||
/// </summary>
|
||||
Humor,
|
||||
|
||||
/// <summary>
|
||||
/// BUG 相关
|
||||
/// </summary>
|
||||
BugRelated,
|
||||
|
||||
/// <summary>
|
||||
/// 用户行为 习惯 时长类
|
||||
/// </summary>
|
||||
Behavior,
|
||||
|
||||
/// <summary>
|
||||
/// 彩蛋类
|
||||
/// </summary>
|
||||
EasterEgg,
|
||||
|
||||
/// <summary>
|
||||
/// 超级稀有!
|
||||
/// </summary>
|
||||
Rare,
|
||||
}
|
||||
72
src/MaaWpfGui/Constants/Enums/MirrorChyanErrorCode.cs
Normal file
72
src/MaaWpfGui/Constants/Enums/MirrorChyanErrorCode.cs
Normal file
@@ -0,0 +1,72 @@
|
||||
// <copyright file="MirrorChyanErrorCode.cs" company="MaaAssistantArknights">
|
||||
// Part of the MaaWpfGui project, maintained by the MaaAssistantArknights team (Maa Team)
|
||||
// Copyright (C) 2021-2025 MaaAssistantArknights Contributors
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License v3.0 only as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY
|
||||
// </copyright>
|
||||
|
||||
namespace MaaWpfGui.Constants.Enums;
|
||||
|
||||
public enum MirrorChyanErrorCode
|
||||
{
|
||||
/// <summary>
|
||||
/// 请求成功
|
||||
/// </summary>
|
||||
Success = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 参数不正确,请参考集成文档
|
||||
/// </summary>
|
||||
InvalidParams = 1001,
|
||||
|
||||
/// <summary>
|
||||
/// CDK 已过期
|
||||
/// </summary>
|
||||
KeyExpired = 7001,
|
||||
|
||||
/// <summary>
|
||||
/// CDK 错误
|
||||
/// </summary>
|
||||
KeyInvalid = 7002,
|
||||
|
||||
/// <summary>
|
||||
/// CDK 今日下载次数已达上限
|
||||
/// </summary>
|
||||
ResourceQuotaExhausted = 7003,
|
||||
|
||||
/// <summary>
|
||||
/// CDK 类型和待下载的资源不匹配
|
||||
/// </summary>
|
||||
KeyMismatched = 7004,
|
||||
|
||||
/// <summary>
|
||||
/// 对应架构和系统下的资源不存在
|
||||
/// </summary>
|
||||
ResourceNotFound = 8001,
|
||||
|
||||
/// <summary>
|
||||
/// 错误的系统参数
|
||||
/// </summary>
|
||||
InvalidOs = 8002,
|
||||
|
||||
/// <summary>
|
||||
/// 错误的架构参数
|
||||
/// </summary>
|
||||
InvalidArch = 8003,
|
||||
|
||||
/// <summary>
|
||||
/// 错误的更新通道参数
|
||||
/// </summary>
|
||||
InvalidChannel = 8004,
|
||||
|
||||
/// <summary>
|
||||
/// 未区分的业务错误,以响应体 JSON 的 msg 为准
|
||||
/// </summary>
|
||||
Undivided = 1,
|
||||
}
|
||||
65
src/MaaWpfGui/Constants/Enums/RoguelikeCollectibleAward.cs
Normal file
65
src/MaaWpfGui/Constants/Enums/RoguelikeCollectibleAward.cs
Normal file
@@ -0,0 +1,65 @@
|
||||
// <copyright file="RoguelikeCollectibleAward.cs" company="MaaAssistantArknights">
|
||||
// Part of the MaaWpfGui project, maintained by the MaaAssistantArknights team (Maa Team)
|
||||
// Copyright (C) 2021-2025 MaaAssistantArknights Contributors
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License v3.0 only as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY
|
||||
// </copyright>
|
||||
|
||||
using System;
|
||||
|
||||
namespace MaaWpfGui.Constants.Enums;
|
||||
|
||||
[Flags]
|
||||
public enum RoguelikeCollectibleAward
|
||||
{
|
||||
/// <summary>
|
||||
/// 热水壶, Roguelike@LastReward
|
||||
/// </summary>
|
||||
HotWater = 1 << 0,
|
||||
|
||||
/// <summary>
|
||||
/// 护盾, Roguelike@LastReward2
|
||||
/// </summary>
|
||||
Shield = 1 << 1,
|
||||
|
||||
/// <summary>
|
||||
/// 源石锭, Roguelike@LastReward3
|
||||
/// </summary>
|
||||
Ingot = 1 << 2,
|
||||
|
||||
/// <summary>
|
||||
/// 2希望, Roguelike@LastReward4
|
||||
/// </summary>
|
||||
Hope = 1 << 3,
|
||||
|
||||
/// <summary>
|
||||
/// 随机, Roguelike@LastRewardRand
|
||||
/// </summary>
|
||||
Random = 1 << 4,
|
||||
|
||||
/// <summary>
|
||||
/// 钥匙, Mizuki@Roguelike@LastReward5
|
||||
/// </summary>
|
||||
Key = 1 << 5,
|
||||
|
||||
/// <summary>
|
||||
/// 骰子, Mizuki@Roguelike@LastReward6
|
||||
/// </summary>
|
||||
Dice = 1 << 6,
|
||||
|
||||
/// <summary>
|
||||
/// 构想, Sarkaz@Roguelike@LastReward5
|
||||
/// </summary>
|
||||
Idea = 1 << 7,
|
||||
|
||||
/// <summary>
|
||||
/// 票券, JieGarden@Roguelike@LastReward5
|
||||
/// </summary>
|
||||
Ticket = 1 << 8,
|
||||
}
|
||||
@@ -17,10 +17,10 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using MaaWpfGui.Constants.Enums;
|
||||
using MaaWpfGui.Helper;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using static MaaWpfGui.Constants.Enums;
|
||||
|
||||
namespace MaaWpfGui.Models
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user