diff --git a/src/MeoAsstGui/Helper/AsstProxy.cs b/src/MeoAsstGui/Helper/AsstProxy.cs
index f90a811f46..0992a3f14f 100644
--- a/src/MeoAsstGui/Helper/AsstProxy.cs
+++ b/src/MeoAsstGui/Helper/AsstProxy.cs
@@ -936,7 +936,7 @@ namespace MeoAsstGui
{
string resultContent = string.Empty;
JArray result_array = (JArray)subTaskDetails["result"];
- int level = (int)subTaskDetails["level"];
+ /* int level = (int)subTaskDetails["level"]; */
foreach (var combs in result_array)
{
int tag_level = (int)combs["level"];
@@ -1243,6 +1243,7 @@ namespace MeoAsstGui
/// 宿舍进驻心情阈值。
/// 宿舍是否使用未进驻筛选标签
/// 宿舍是否使用蹭信赖功能
+ /// 制造站搓玉是否补货
/// 是否成功。
public bool AsstAppendInfrast(string[] order, string uses_of_drones, double dorm_threshold, bool dorm_filter_not_stationed_enabled, bool dorm_trust_enabled, bool originium_shard_auto_replenishment)
{
diff --git a/src/MeoAsstGui/Helper/ComboBoxExtensions.cs b/src/MeoAsstGui/Helper/ComboBoxExtensions.cs
index 28c94583b6..8aabd6ae7d 100644
--- a/src/MeoAsstGui/Helper/ComboBoxExtensions.cs
+++ b/src/MeoAsstGui/Helper/ComboBoxExtensions.cs
@@ -1,3 +1,16 @@
+//
+// MeoAsstGui - A part of the MeoAssistantArknights project
+// Copyright (C) 2021 MistEO and Contributors
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License 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
+//
+
using System.Windows.Controls;
using System.Windows.Input;
diff --git a/src/MeoAsstGui/Helper/StageInfo.cs b/src/MeoAsstGui/Helper/StageInfo.cs
index 025b83db4c..5120d543f3 100644
--- a/src/MeoAsstGui/Helper/StageInfo.cs
+++ b/src/MeoAsstGui/Helper/StageInfo.cs
@@ -72,7 +72,6 @@ namespace MeoAsstGui
///
/// Determine whether the stage associated activity is closed
///
- /// Current day of week
/// Whether activity is closed
public bool IsActivityClosed()
{
diff --git a/src/MeoAsstGui/UserControl/FightSettingsUserControl.xaml b/src/MeoAsstGui/UserControl/FightSettingsUserControl.xaml
index 44eb2804dd..304413c44f 100644
--- a/src/MeoAsstGui/UserControl/FightSettingsUserControl.xaml
+++ b/src/MeoAsstGui/UserControl/FightSettingsUserControl.xaml
@@ -93,7 +93,7 @@
Content="{DynamicResource AssignedMaterial}"
IsChecked="{Binding IsSpecifiedDrops}"
ToolTip="{DynamicResource NoAutoNavigation}" />
-
+
+ Visibility="{c:Binding IsSpecifiedDrops}" />
@@ -146,7 +146,7 @@
TextAlignment="Center"
TextWrapping="Wrap" />
-
+
+ Visibility="{c:Binding !CustomStageCode}" />
+ Visibility="{c:Binding CustomStageCode}" />
+ Visibility="{c:Binding AlternateStageDisplay}" />
+ Visibility="{c:Binding AlternateStageDisplay}" />
diff --git a/src/MeoAsstGui/ViewModels/CopilotViewModel.cs b/src/MeoAsstGui/ViewModels/CopilotViewModel.cs
index 810fbd68a3..51b339657a 100644
--- a/src/MeoAsstGui/ViewModels/CopilotViewModel.cs
+++ b/src/MeoAsstGui/ViewModels/CopilotViewModel.cs
@@ -37,9 +37,7 @@ namespace MeoAsstGui
///
public class CopilotViewModel : Screen
{
-#pragma warning disable IDE0052 // 删除未读的私有成员
private readonly IWindowManager _windowManager;
-#pragma warning restore IDE0052 // 删除未读的私有成员
private readonly IContainer _container;
///
diff --git a/src/MeoAsstGui/ViewModels/DepotViewModel.cs b/src/MeoAsstGui/ViewModels/DepotViewModel.cs
index bde2eb52d6..3d55f69a0e 100644
--- a/src/MeoAsstGui/ViewModels/DepotViewModel.cs
+++ b/src/MeoAsstGui/ViewModels/DepotViewModel.cs
@@ -1,4 +1,4 @@
-//
+//
// MeoAsstGui - A part of the MeoAssistantArknights project
// Copyright (C) 2021 MistEO and Contributors
//
@@ -12,6 +12,7 @@
//
using System.Collections.Generic;
+using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using Newtonsoft.Json.Linq;
@@ -62,18 +63,28 @@ namespace MeoAsstGui
set => SetAndNotify(ref _depotResult, value);
}
+ ///
+ /// Gets or sets the ArkPlanner result.
+ ///
public string ArkPlannerResult { get; set; } = string.Empty;
+ ///
+ /// Gets or sets the Lolicon result.
+ ///
public string LoliconResult { get; set; } = string.Empty;
+ ///
+ /// parse of depot recognition result
+ ///
+ /// detailed json-style parameters
+ /// Success or not
public bool Parse(JObject details)
{
string result = string.Empty;
int count = 0;
- foreach (var item in details["arkplanner"]["object"]["items"])
+ foreach (var item in details["arkplanner"]["object"]["items"].Cast())
{
- var itemObj = (JObject)item;
- result += (string)itemObj["name"] + " : " + (int)itemObj["have"] + "\t";
+ result += (string)item["name"] + " : " + (int)item["have"] + "\t";
if (++count == 4)
{
result += "\n";
@@ -98,25 +109,34 @@ namespace MeoAsstGui
private bool _done = false;
+ ///
+ /// Gets or sets a value indicating whether depot info is parsed.
+ ///
public bool Done
{
get => _done;
set => SetAndNotify(ref _done, value);
}
+ ///
+ /// Export depot info to ArkPlanner.
+ ///
public void ExportToArkplanner()
{
Clipboard.SetDataObject(ArkPlannerResult);
DepotInfo = Localization.GetString("CopiedToClipboard");
}
+ ///
+ /// Export depot info to Lolicon.
+ ///
public void ExportToLolicon()
{
Clipboard.SetDataObject(LoliconResult);
DepotInfo = Localization.GetString("CopiedToClipboard");
}
- private void clear()
+ private void Clear()
{
DepotResult = string.Empty;
ArkPlannerResult = string.Empty;
@@ -144,7 +164,7 @@ namespace MeoAsstGui
}
DepotInfo = Localization.GetString("Identifying");
- clear();
+ Clear();
asstProxy.AsstStartDepot();
}
diff --git a/src/MeoAsstGui/ViewModels/SettingsViewModel.cs b/src/MeoAsstGui/ViewModels/SettingsViewModel.cs
index e690e8c2fb..c14c3138e9 100644
--- a/src/MeoAsstGui/ViewModels/SettingsViewModel.cs
+++ b/src/MeoAsstGui/ViewModels/SettingsViewModel.cs
@@ -1702,6 +1702,9 @@ namespace MeoAsstGui
private bool _customStageCode = Convert.ToBoolean(ViewStatusStorage.Get("GUI.CustomStageCode", bool.FalseString));
+ ///
+ /// Gets or sets a value indicating whether to use custom stage code.
+ ///
public bool CustomStageCode
{
get => _customStageCode;
diff --git a/src/MeoAsstGui/ViewModels/TaskQueueViewModel.cs b/src/MeoAsstGui/ViewModels/TaskQueueViewModel.cs
index 375ba3896e..aab1d8a833 100644
--- a/src/MeoAsstGui/ViewModels/TaskQueueViewModel.cs
+++ b/src/MeoAsstGui/ViewModels/TaskQueueViewModel.cs
@@ -1429,26 +1429,20 @@ namespace MeoAsstGui
private bool _customStageCode = Convert.ToBoolean(ViewStatusStorage.Get("GUI.CustomStageCode", bool.FalseString));
+ ///
+ /// Gets or sets a value indicating whether to use custom stage code.
+ ///
public bool CustomStageCode
{
get => _customStageCode;
set
{
SetAndNotify(ref _customStageCode, value);
- NotCustomStageCode = !value;
var settingsModel = _container.Get();
AlternateStageDisplay = !value && settingsModel.UseAlternateStage;
}
}
- private bool _notCustomStageCode = !Convert.ToBoolean(ViewStatusStorage.Get("GUI.CustomStageCode", bool.FalseString));
-
- public bool NotCustomStageCode
- {
- get => _notCustomStageCode;
- set => SetAndNotify(ref _notCustomStageCode, value);
- }
-
private bool _useMedicine = Convert.ToBoolean(ViewStatusStorage.Get("MainFunction.UseMedicine", bool.FalseString));
///