mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 10:10:45 +08:00
feat: InvertNullFunction method
This commit is contained in:
@@ -25,6 +25,8 @@ namespace MaaWpfGui.Configuration
|
||||
|
||||
public bool UseNotify { get; set; } = true;
|
||||
|
||||
public bool InvertNullFunction { get; set; } = false;
|
||||
|
||||
public string Localization { get; set; } = LocalizationHelper.DefaultLanguage;
|
||||
|
||||
public bool MinimizeToTray { get; set; } = false;
|
||||
|
||||
@@ -1103,7 +1103,7 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
{
|
||||
if (item.IsCheckedWithNull == null)
|
||||
{
|
||||
item.IsChecked = false;
|
||||
item.IsChecked = GuiSettingsUserControlModel.Instance.InvertNullFunction;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1292,7 +1292,7 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
int count = 0;
|
||||
foreach (var item in TaskItemViewModels)
|
||||
{
|
||||
if (item.IsChecked == false)
|
||||
if (item.IsChecked == false || (GuiSettingsUserControlModel.Instance.InvertNullFunction && item.IsCheckedWithNull == null))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -1354,6 +1354,10 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
_runningState.SetIdle(true);
|
||||
Instances.AsstProxy.AsstStop();
|
||||
SetStopped();
|
||||
if (GuiSettingsUserControlModel.Instance.InvertNullFunction)
|
||||
{
|
||||
ResetTaskSelection();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1845,8 +1849,7 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
{
|
||||
var toolToCraft = ReclamationTask.ReclamationToolToCraft.Split(';', ';').Select(s => s.Trim());
|
||||
|
||||
|
||||
_ = int.TryParse(ReclamationTask.ReclamationMode, out var mode);
|
||||
_ = int.TryParse(SettingsViewModel.ReclamationTask.ReclamationMode, out var mode);
|
||||
|
||||
return Instances.AsstProxy.AsstAppendReclamation(
|
||||
toolToCraft.ToArray(),
|
||||
|
||||
@@ -157,6 +157,15 @@ public class GuiSettingsUserControlModel : PropertyChangedBase
|
||||
}
|
||||
}
|
||||
|
||||
public bool InvertNullFunction
|
||||
{
|
||||
get => ConfigFactory.Root.GUI.InvertNullFunction;
|
||||
set
|
||||
{
|
||||
ConfigFactory.Root.GUI.InvertNullFunction = value;
|
||||
}
|
||||
}
|
||||
|
||||
public List<string> LogItemDateFormatStringList { get; } =
|
||||
[
|
||||
"HH:mm:ss",
|
||||
|
||||
@@ -60,6 +60,10 @@
|
||||
Margin="10"
|
||||
Content="{DynamicResource WindowTitleScrollable}"
|
||||
IsChecked="{Binding WindowTitleScrollable}" />
|
||||
<CheckBox
|
||||
Margin="10"
|
||||
Content="{DynamicResource NullFunctionality}"
|
||||
IsChecked="{Binding InvertNullFunction}" />
|
||||
<hc:CheckComboBox
|
||||
x:Name="CheckComboBox"
|
||||
Width="180"
|
||||
|
||||
Reference in New Issue
Block a user