mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 17:57:01 +08:00
格式化,消除警告
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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>();
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user