Merge pull request #1614 from MaaAssistantArknights/styling

格式化,消除警告
This commit is contained in:
MistEO
2022-08-20 13:54:39 +08:00
committed by GitHub
5 changed files with 23 additions and 20 deletions

View File

@@ -73,7 +73,7 @@ labels:
# 不符合上面任何一个的分类并且如果是PR不符合 commitizen
regexes:
- "(?:[Aa]dd (?:`|)(?:label |)ambiguous(?:`|)|^(?![\\s\\S]*(?:\
feat|chore|perf|style|refactor|fix|doc|\
feat|chore|perf|style|refactor|fix|doc|[Mm]erge|\
[Rr]emove (?:(?:[Aa]ll |)[Ll]abels|(?:`|)ambiguous(?:`|))))[\\s\\S]*$)"
mode:
pull_request_target: [add, remove]

View File

@@ -2,6 +2,8 @@
Issue bot 使用的 action 为 [issue-checker](https://github.com/zzyyyl/issue-checker),配置文件为 [issue-checker.yml](.github/issue-checker.yml)。
_Note: PR 被打上 `ambiguous` 标签可能是因为没有按照 commitizen 规范提交。推荐在 PR 标题加上 docs/feat/fix/merge/release 等。_
## 功能
### 自动触发

View File

@@ -141,7 +141,7 @@ namespace MeoAsstGui
}
bool loaded = true;
if (settingsModel.ClientType == String.Empty
if (settingsModel.ClientType == string.Empty
|| settingsModel.ClientType == "Official" || settingsModel.ClientType == "Bilibili")
{
// The resources of Official and Bilibili are the same
@@ -168,7 +168,7 @@ namespace MeoAsstGui
if (loaded)
{
if (settingsModel.ClientType == String.Empty)
if (settingsModel.ClientType == string.Empty)
{
_curResource = "Official";
}
@@ -240,7 +240,7 @@ namespace MeoAsstGui
}
int len = lstrlenA(ptr);
Byte[] bytes = new Byte[len + 1];
byte[] bytes = new byte[len + 1];
Marshal.Copy(ptr, bytes, 0, len + 1);
return enc.GetString(bytes);
}
@@ -714,7 +714,7 @@ namespace MeoAsstGui
int level = (int)subTaskDetails["level"];
if (level >= 5)
{
using (var toast = new ToastNotification(String.Format(Localization.GetString("RecruitmentOfStar"), level)))
using (var toast = new ToastNotification(string.Format(Localization.GetString("RecruitmentOfStar"), level)))
{
toast.AppendContentText(new string('★', level)).ShowRecruit(row: 2);
}
@@ -726,16 +726,16 @@ namespace MeoAsstGui
mainModel.AddLog(level + " ★ Tags", LogColor.Info);
}
//bool robot = (bool)subTaskDetails["robot"];
//if (robot)
//{
// bool robot = (bool)subTaskDetails["robot"];
// if (robot)
// {
// using (var toast = new ToastNotification(Localization.GetString("RecruitmentOfBot")))
// {
// toast.AppendContentText(new string('★', 1)).ShowRecruitRobot(row: 2);
// }
// mainModel.AddLog(1 + " ★ Tag", LogColor.RobotOperator, "Bold");
//}
// mainModel.AddLog(1 + " ★ Tag", LogColor.RobotOperator, "Bold");
// }
}
break;
@@ -788,7 +788,7 @@ namespace MeoAsstGui
case "PenguinId":
{
var settings = _container.Get<SettingsViewModel>();
if (settings.PenguinId == String.Empty)
if (settings.PenguinId == string.Empty)
{
string id = subTaskDetails["id"].ToString();
settings.PenguinId = id;
@@ -916,8 +916,8 @@ namespace MeoAsstGui
return true;
}
if (settings.AdbPath == String.Empty ||
settings.ConnectAddress == String.Empty)
if (settings.AdbPath == string.Empty ||
settings.ConnectAddress == string.Empty)
{
if (!settings.RefreshAdbConfig(ref error))
{

View File

@@ -59,7 +59,6 @@ namespace MeoAsstGui
Localization.GetString("CopilotTip2") + "\n\n" +
Localization.GetString("CopilotTip3") + "\n\n" +
Localization.GetString("CopilotTip4"),
//Localization.GetString("CopilotTip5"),
LogColor.Message);
}
@@ -296,7 +295,6 @@ namespace MeoAsstGui
Localization.GetString("CopilotTip2") + "\n\n" +
Localization.GetString("CopilotTip3") + "\n\n" +
Localization.GetString("CopilotTip4"));
//Localization.GetString("CopilotTip5"));
}
catch (Exception)
{
@@ -368,11 +366,11 @@ namespace MeoAsstGui
public async void Start()
{
ClearLog();
//if (_form)
//{
// AddLog(Localization.GetString("AutoSquadTip"), LogColor.Message);
//}
// if (_form)
// {
// AddLog(Localization.GetString("AutoSquadTip"), LogColor.Message);
// }
AddLog(Localization.GetString("ConnectingToEmulator"));
var asstProxy = _container.Get<AsstProxy>();

View File

@@ -431,7 +431,7 @@ namespace MeoAsstGui
private readonly Dictionary<string, string> ServerMapping = new Dictionary<string, string>
{
{ String.Empty, "CN" },
{ string.Empty, "CN" },
{ "Official", "CN" },
{ "Bilibili", "CN" },
{ "YoStarEN", "EN" },
@@ -440,6 +440,9 @@ namespace MeoAsstGui
{ "txwy", "CN_TW" },
};
/// <summary>
/// Gets server type.
/// </summary>
public string ServerType
{
get