From 4c2865c7cf2ea6856e415f9645fcfeca536cda8c Mon Sep 17 00:00:00 2001
From: uye <2396806385@qq.com>
Date: Sat, 22 Apr 2023 02:03:00 +0800
Subject: [PATCH] =?UTF-8?q?style:=20=E5=BF=BD=E7=95=A5=E8=AD=A6=E5=91=8A?=
=?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E7=BC=BA=E5=B0=91=E7=9A=84=E6=B3=A8?=
=?UTF-8?q?=E9=87=8A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/MaaWpfGui/Main/AsstProxy.cs | 13 ++++++++++---
.../ViewModels/UI/CopilotViewModel.cs | 18 +++---------------
.../ViewModels/UI/TaskQueueViewModel.cs | 2 ++
3 files changed, 15 insertions(+), 18 deletions(-)
diff --git a/src/MaaWpfGui/Main/AsstProxy.cs b/src/MaaWpfGui/Main/AsstProxy.cs
index e4df970922..6d0605676f 100644
--- a/src/MaaWpfGui/Main/AsstProxy.cs
+++ b/src/MaaWpfGui/Main/AsstProxy.cs
@@ -799,7 +799,9 @@ namespace MaaWpfGui.Main
}
}
+#pragma warning disable IDE0060 // 删除未使用的参数
private void ProcSubTaskCompleted(JObject details)
+#pragma warning restore IDE0060 // 删除未使用的参数
{
}
@@ -1143,9 +1145,11 @@ namespace MaaWpfGui.Main
// string p = @"C:\tmp\this path contains spaces, and,commas\target.txt";
string args = string.Format("/e, /select, \"{0}\"", filename);
- ProcessStartInfo info = new ProcessStartInfo();
- info.FileName = "explorer";
- info.Arguments = args;
+ ProcessStartInfo info = new ProcessStartInfo
+ {
+ FileName = "explorer",
+ Arguments = args,
+ };
Process.Start(info);
break;
}
@@ -1827,6 +1831,9 @@ namespace MaaWpfGui.Main
///
AdbLiteEnabled = 4,
+ ///
+ /// Indicates whether the ADB server process should be killed when the instance is exited.
+ ///
KillAdbOnExit = 5,
}
}
diff --git a/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs b/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs
index 36650e0178..70e2e5b5d7 100644
--- a/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs
+++ b/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs
@@ -39,7 +39,9 @@ namespace MaaWpfGui.ViewModels.UI
///
public class CopilotViewModel : Screen
{
+#pragma warning disable IDE0052 // 删除未读的私有成员
private readonly IWindowManager _windowManager;
+#pragma warning restore IDE0052 // 删除未读的私有成员
private readonly IHttpService _httpService;
private readonly IContainer _container;
@@ -87,20 +89,6 @@ namespace MaaWpfGui.ViewModels.UI
// LogItemViewModels.Insert(0, new LogItemViewModel(time + content, color, weight));
}
- ///
- /// Adds log with URL.
- ///
- /// The content.
- /// The URL.
- /// The font color.
- /// The font weight.
- public void AddLogWithUrl(string content, string url, string color = UiLogColor.Trace, string weight = "Regular")
- {
- LogItemViewModels.Add(new LogItemViewModel(content, color, weight));
-
- // LogItemViewModels.Insert(0, new LogItemViewModel(time + content, color, weight));
- }
-
private bool _idle = true;
///
@@ -607,7 +595,7 @@ namespace MaaWpfGui.ViewModels.UI
string jsonParam = JsonConvert.SerializeObject(new
{
id = CopilotId,
- rating = rating,
+ rating,
});
var response = await _httpService.PostAsJsonAsync(new Uri(_copilotRatingUrl), jsonParam);
diff --git a/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs b/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs
index 17ee123d97..92b40a3b97 100644
--- a/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs
+++ b/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs
@@ -46,7 +46,9 @@ namespace MaaWpfGui.ViewModels.UI
///
public class TaskQueueViewModel : Screen
{
+#pragma warning disable IDE0052
private readonly IWindowManager _windowManager;
+#pragma warning restore IDE0052
private readonly IContainer _container;
private static readonly ILogger _logger = Log.ForContext();