fix: 公招多选 Tags 保存至配置文件

This commit is contained in:
youqii
2023-10-24 19:07:05 +08:00
parent e49b646056
commit d5637550da
2 changed files with 7 additions and 2 deletions

View File

@@ -118,6 +118,7 @@ namespace MaaWpfGui.Constants
public const string RecruitMaxTimes = "AutoRecruit.MaxTimes";
public const string RefreshLevel3 = "AutoRecruit.RefreshLevel3";
public const string ForceRefresh = "AutoRecruit.ForceRefresh";
public const string SelectExtraTags = "AutoRecruit.SelectExtraTags";
public const string IsLevel3UseShortTime = "AutoRecruit.IsLevel3UseShortTime";
public const string IsLevel3UseShortTime2 = "AutoRecruit.IsLevel3UseShortTime2";
public const string NotChooseLevel1 = "AutoRecruit.NotChooseLevel1";

View File

@@ -2334,7 +2334,7 @@ namespace MaaWpfGui.ViewModels.UI
set => SetAndNotify(ref _useExpedited, value);
}
private bool _selectExtraTags;
private bool _selectExtraTags = Convert.ToBoolean(ConfigurationHelper.GetValue(ConfigurationKeys.SelectExtraTags, bool.FalseString));
/// <summary>
/// Gets or sets a value indicating whether three tags are alway selected when selecting tags.
@@ -2342,7 +2342,11 @@ namespace MaaWpfGui.ViewModels.UI
public bool SelectExtraTags
{
get => _selectExtraTags;
set => SetAndNotify(ref _selectExtraTags, value);
set
{
SetAndNotify(ref _selectExtraTags, value);
ConfigurationHelper.SetValue(ConfigurationKeys.SelectExtraTags, value.ToString());
}
}
private bool _isLevel3UseShortTime = Convert.ToBoolean(ConfigurationHelper.GetValue(ConfigurationKeys.IsLevel3UseShortTime, bool.FalseString));