mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
fix: 生息演算Mode序列化类型
This commit is contained in:
@@ -59,24 +59,24 @@ public class ReclamationSettingsUserControlModel : TaskViewModel
|
||||
/// <summary>
|
||||
/// Gets the list of reclamation modes.
|
||||
/// </summary>
|
||||
public List<CombinedData> ReclamationModeList { get; } =
|
||||
public List<GenericCombinedData<int>> ReclamationModeList { get; } =
|
||||
[
|
||||
new() { Display = LocalizationHelper.GetString("ReclamationModeProsperityNoSave"), Value = "0" },
|
||||
new() { Display = LocalizationHelper.GetString("ReclamationModeProsperityInSave"), Value = "1" },
|
||||
new() { Display = LocalizationHelper.GetString("ReclamationModeProsperityNoSave"), Value = 0 },
|
||||
new() { Display = LocalizationHelper.GetString("ReclamationModeProsperityInSave"), Value = 0 },
|
||||
];
|
||||
|
||||
private string _reclamationMode = ConfigurationHelper.GetValue(ConfigurationKeys.ReclamationMode, "1");
|
||||
private int _reclamationMode = int.TryParse(ConfigurationHelper.GetValue(ConfigurationKeys.ReclamationMode, "1"), out var outMode) ? outMode : 1;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets 策略,无存档刷生息点数 / 有存档刷生息点数
|
||||
/// </summary>
|
||||
public string ReclamationMode
|
||||
public int ReclamationMode
|
||||
{
|
||||
get => _reclamationMode;
|
||||
set
|
||||
{
|
||||
SetAndNotify(ref _reclamationMode, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.ReclamationMode, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.ReclamationMode, value.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user