mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 18:47:55 +08:00
@@ -41,8 +41,7 @@ public class AwardSettingsUserControlModel : TaskViewModel
|
||||
public bool ReceiveAward
|
||||
{
|
||||
get => _receiveAward;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _receiveAward, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.ReceiveAward, value.ToString());
|
||||
}
|
||||
@@ -56,8 +55,7 @@ public class AwardSettingsUserControlModel : TaskViewModel
|
||||
public bool ReceiveMail
|
||||
{
|
||||
get => _receiveMail;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _receiveMail, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.ReceiveMail, value.ToString());
|
||||
}
|
||||
@@ -71,8 +69,7 @@ public class AwardSettingsUserControlModel : TaskViewModel
|
||||
public bool ReceiveFreeGacha
|
||||
{
|
||||
get => _receiveFreeGacha;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (value)
|
||||
{
|
||||
var result = MessageBoxHelper.Show(
|
||||
@@ -102,8 +99,7 @@ public class AwardSettingsUserControlModel : TaskViewModel
|
||||
public bool ReceiveOrundum
|
||||
{
|
||||
get => _receiveOrundum;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _receiveOrundum, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.ReceiveOrundum, value.ToString());
|
||||
}
|
||||
@@ -117,8 +113,7 @@ public class AwardSettingsUserControlModel : TaskViewModel
|
||||
public bool ReceiveMining
|
||||
{
|
||||
get => _receiveMining;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _receiveMining, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.ReceiveMining, value.ToString());
|
||||
}
|
||||
@@ -132,8 +127,7 @@ public class AwardSettingsUserControlModel : TaskViewModel
|
||||
public bool ReceiveSpecialAccess
|
||||
{
|
||||
get => _receiveReceiveSpecialAccess;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _receiveReceiveSpecialAccess, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.ReceiveSpecialAccess, value.ToString());
|
||||
}
|
||||
@@ -141,8 +135,7 @@ public class AwardSettingsUserControlModel : TaskViewModel
|
||||
|
||||
public override (AsstTaskType Type, JObject Params) Serialize()
|
||||
{
|
||||
var task = new AsstAwardTask()
|
||||
{
|
||||
var task = new AsstAwardTask() {
|
||||
Award = ReceiveAward,
|
||||
Mail = ReceiveMail,
|
||||
FreeGacha = ReceiveFreeGacha,
|
||||
@@ -160,8 +153,7 @@ public class AwardSettingsUserControlModel : TaskViewModel
|
||||
return null;
|
||||
}
|
||||
|
||||
var task = new AsstAwardTask()
|
||||
{
|
||||
var task = new AsstAwardTask() {
|
||||
Award = award.Award,
|
||||
Mail = award.Mail,
|
||||
FreeGacha = award.FreeGacha,
|
||||
|
||||
@@ -37,8 +37,7 @@ public class CustomSettingsUserControlModel : TaskViewModel
|
||||
public string TaskName
|
||||
{
|
||||
get => _taskName;
|
||||
set
|
||||
{
|
||||
set {
|
||||
value = value.Replace(",", ",").Replace(";", ";");
|
||||
SetAndNotify(ref _taskName, value);
|
||||
OnPropertyChanged(nameof(FormattedTaskNames));
|
||||
@@ -52,8 +51,7 @@ public class CustomSettingsUserControlModel : TaskViewModel
|
||||
|
||||
public string FormattedTaskNames
|
||||
{
|
||||
get
|
||||
{
|
||||
get {
|
||||
if (string.IsNullOrWhiteSpace(TaskName))
|
||||
{
|
||||
return string.Empty;
|
||||
@@ -71,8 +69,7 @@ public class CustomSettingsUserControlModel : TaskViewModel
|
||||
|
||||
public override (AsstTaskType Type, JObject Params) Serialize()
|
||||
{
|
||||
var task = new AsstCustomTask()
|
||||
{
|
||||
var task = new AsstCustomTask() {
|
||||
CustomTasks = TaskName.Split(',', StringSplitOptions.RemoveEmptyEntries)
|
||||
.Select(task => task.Trim())
|
||||
.ToList(),
|
||||
@@ -84,22 +81,21 @@ public class CustomSettingsUserControlModel : TaskViewModel
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(TaskName))
|
||||
{
|
||||
return new List<(AsstTaskType, JObject)>();
|
||||
return [];
|
||||
}
|
||||
|
||||
if (!TaskName.Contains(';'))
|
||||
{
|
||||
return new List<(AsstTaskType, JObject)> { Serialize() };
|
||||
return [Serialize()];
|
||||
}
|
||||
|
||||
var taskGroups = TaskName.Split(';', StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
return taskGroups.Select(group => new AsstCustomTask()
|
||||
{
|
||||
CustomTasks = group.Split(',', StringSplitOptions.RemoveEmptyEntries)
|
||||
return taskGroups.Select(group => new AsstCustomTask() {
|
||||
CustomTasks = group.Split(',', StringSplitOptions.RemoveEmptyEntries)
|
||||
.Select(task => task.Trim())
|
||||
.ToList(),
|
||||
})
|
||||
})
|
||||
.Select(task => task.Serialize())
|
||||
.ToList();
|
||||
}
|
||||
|
||||
@@ -71,8 +71,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
/// </summary>
|
||||
public string Stage
|
||||
{
|
||||
get
|
||||
{
|
||||
get {
|
||||
Stage1 ??= _stage1Fallback;
|
||||
|
||||
if (!UseAlternateStage)
|
||||
@@ -130,8 +129,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public string? Stage1
|
||||
{
|
||||
get => _stage1;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (_stage1 == value)
|
||||
{
|
||||
return;
|
||||
@@ -161,8 +159,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public string? Stage2
|
||||
{
|
||||
get => _stage2;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (_stage2 == value)
|
||||
{
|
||||
return;
|
||||
@@ -191,8 +188,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public string? Stage3
|
||||
{
|
||||
get => _stage3;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (_stage3 == value)
|
||||
{
|
||||
return;
|
||||
@@ -221,8 +217,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public string? Stage4
|
||||
{
|
||||
get => _stage4;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (_stage4 == value)
|
||||
{
|
||||
return;
|
||||
@@ -248,8 +243,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public bool UseRemainingSanityStage
|
||||
{
|
||||
get => _useRemainingSanityStage;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _useRemainingSanityStage, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.UseRemainingSanityStage, value.ToString());
|
||||
}
|
||||
@@ -263,8 +257,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public bool CustomStageCode
|
||||
{
|
||||
get => _customStageCode;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (!value)
|
||||
{
|
||||
RemoveNonExistStage();
|
||||
@@ -292,8 +285,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public string? RemainingSanityStage
|
||||
{
|
||||
get => _remainingSanityStage;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (_remainingSanityStage == value)
|
||||
{
|
||||
return;
|
||||
@@ -332,8 +324,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public bool? UseMedicine
|
||||
{
|
||||
get => _useMedicine;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _useMedicine, value);
|
||||
if (value == false)
|
||||
{
|
||||
@@ -354,8 +345,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public int MedicineNumber
|
||||
{
|
||||
get => _medicineNumber;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (!SetAndNotify(ref _medicineNumber, value))
|
||||
{
|
||||
return;
|
||||
@@ -377,8 +367,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public bool? UseStone
|
||||
{
|
||||
get => _useStone;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (!AllowUseStoneSave && value == true)
|
||||
{
|
||||
value = null;
|
||||
@@ -421,8 +410,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public int StoneNumber
|
||||
{
|
||||
get => _stoneNumber;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (!SetAndNotify(ref _stoneNumber, value))
|
||||
{
|
||||
return;
|
||||
@@ -441,8 +429,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public bool? HasTimesLimited
|
||||
{
|
||||
get => _hasTimesLimited;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _hasTimesLimited, value);
|
||||
Instances.TaskQueueViewModel.SetFightParams();
|
||||
value ??= false;
|
||||
@@ -458,8 +445,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public int MaxTimes
|
||||
{
|
||||
get => _maxTimes;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (!SetAndNotify(ref _maxTimes, value))
|
||||
{
|
||||
return;
|
||||
@@ -502,8 +488,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public int Series
|
||||
{
|
||||
get => _series;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (!SetAndNotify(ref _series, value))
|
||||
{
|
||||
return;
|
||||
@@ -524,8 +509,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public bool? IsSpecifiedDrops
|
||||
{
|
||||
get => _isSpecifiedDrops;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (!SetAndNotify(ref _isSpecifiedDrops, value))
|
||||
{
|
||||
return;
|
||||
@@ -612,8 +596,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public string DropsItemId
|
||||
{
|
||||
get => _dropsItemId;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _dropsItemId, value);
|
||||
Instances.TaskQueueViewModel.SetFightParams();
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.DropsItemId, DropsItemId);
|
||||
@@ -649,8 +632,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public int DropsQuantity
|
||||
{
|
||||
get => _dropsQuantity;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _dropsQuantity, value);
|
||||
Instances.TaskQueueViewModel.SetFightParams();
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.DropsQuantity, value.ToString());
|
||||
@@ -672,8 +654,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public bool UseCustomAnnihilation
|
||||
{
|
||||
get => _useCustomAnnihilation;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _useCustomAnnihilation, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.UseCustomAnnihilation, value.ToString());
|
||||
}
|
||||
@@ -684,8 +665,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public string AnnihilationStage
|
||||
{
|
||||
get => _annihilationStage;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _annihilationStage, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.AnnihilationStage, value);
|
||||
}
|
||||
@@ -699,8 +679,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public bool IsDrGrandet
|
||||
{
|
||||
get => _isDrGrandet;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _isDrGrandet, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.IsDrGrandet, value.ToString());
|
||||
}
|
||||
@@ -714,8 +693,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public bool UseAlternateStage
|
||||
{
|
||||
get => _useAlternateStage;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _useAlternateStage, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.UseAlternateStage, value.ToString());
|
||||
if (value)
|
||||
@@ -730,8 +708,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public bool AllowUseStoneSave
|
||||
{
|
||||
get => _allowUseStoneSave;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (value)
|
||||
{
|
||||
var result = MessageBoxHelper.Show(
|
||||
@@ -758,8 +735,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public bool UseExpiringMedicine
|
||||
{
|
||||
get => _useExpiringMedicine;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _useExpiringMedicine, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.UseExpiringMedicine, value.ToString());
|
||||
Instances.TaskQueueViewModel.SetFightParams();
|
||||
@@ -774,8 +750,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public bool HideUnavailableStage
|
||||
{
|
||||
get => _hideUnavailableStage;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _hideUnavailableStage, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.HideUnavailableStage, value.ToString());
|
||||
|
||||
@@ -796,8 +771,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public bool HideSeries
|
||||
{
|
||||
get => _hideSeries;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _hideSeries, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.HideSeries, value.ToString());
|
||||
}
|
||||
@@ -808,8 +782,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public bool AutoRestartOnDrop
|
||||
{
|
||||
get => _autoRestartOnDrop;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _autoRestartOnDrop, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.AutoRestartOnDrop, value.ToString());
|
||||
}
|
||||
@@ -846,8 +819,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
|
||||
public override (AsstTaskType Type, JObject Params) Serialize()
|
||||
{
|
||||
var task = new AsstFightTask()
|
||||
{
|
||||
var task = new AsstFightTask() {
|
||||
Stage = Stage,
|
||||
Medicine = UseMedicine != false ? MedicineNumber : 0,
|
||||
Stone = UseStoneDisplay ? StoneNumber : 0,
|
||||
@@ -883,8 +855,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
public bool CustomInfrastPlanShowInFightSettings
|
||||
{
|
||||
get => _customInfrastPlanShowInFightSettings;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _customInfrastPlanShowInFightSettings, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.CustomInfrastPlanShowInFightSettings, value.ToString());
|
||||
}
|
||||
@@ -906,8 +877,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
// 这个函数被列为public可见,意味着他注入对象前被调用
|
||||
public void UpdateStageList()
|
||||
{
|
||||
Execute.PostToUIThreadAsync(() =>
|
||||
{
|
||||
Execute.PostToUIThreadAsync(() => {
|
||||
var hideUnavailableStage = HideUnavailableStage;
|
||||
|
||||
Instances.TaskQueueViewModel.EnableSetFightParams = false;
|
||||
|
||||
@@ -130,8 +130,7 @@ public class InfrastSettingsUserControlModel : TaskViewModel
|
||||
public int DormThreshold
|
||||
{
|
||||
get => _dormThreshold;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _dormThreshold, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.DormThreshold, value.ToString());
|
||||
}
|
||||
@@ -200,8 +199,7 @@ public class InfrastSettingsUserControlModel : TaskViewModel
|
||||
public Mode InfrastMode
|
||||
{
|
||||
get => _infrastMode;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (!SetAndNotify(ref _infrastMode, value))
|
||||
{
|
||||
return;
|
||||
@@ -221,8 +219,7 @@ public class InfrastSettingsUserControlModel : TaskViewModel
|
||||
public string UsesOfDrones
|
||||
{
|
||||
get => _usesOfDrones;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _usesOfDrones, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.UsesOfDrones, value);
|
||||
}
|
||||
@@ -233,8 +230,7 @@ public class InfrastSettingsUserControlModel : TaskViewModel
|
||||
public bool ReceptionMessageBoardReceive
|
||||
{
|
||||
get => _receptionMessageBoardReceive;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _receptionMessageBoardReceive, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.InfrastReceptionMessageBoardReceive, value.ToString());
|
||||
}
|
||||
@@ -245,8 +241,7 @@ public class InfrastSettingsUserControlModel : TaskViewModel
|
||||
public bool ReceptionClueExchange
|
||||
{
|
||||
get => _receptionClueExchange;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _receptionClueExchange, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.InfrastReceptionClueExchange, value.ToString());
|
||||
}
|
||||
@@ -260,8 +255,7 @@ public class InfrastSettingsUserControlModel : TaskViewModel
|
||||
public bool ContinueTraining
|
||||
{
|
||||
get => _continueTraining;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _continueTraining, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.ContinueTraining, value.ToString());
|
||||
}
|
||||
@@ -277,8 +271,7 @@ public class InfrastSettingsUserControlModel : TaskViewModel
|
||||
public string DefaultInfrast
|
||||
{
|
||||
get => _defaultInfrast;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _defaultInfrast, value);
|
||||
if (_defaultInfrast != UserDefined)
|
||||
{
|
||||
@@ -300,8 +293,7 @@ public class InfrastSettingsUserControlModel : TaskViewModel
|
||||
public bool DormFilterNotStationedEnabled
|
||||
{
|
||||
get => _dormFilterNotStationedEnabled;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _dormFilterNotStationedEnabled, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.DormFilterNotStationedEnabled, value.ToString());
|
||||
}
|
||||
@@ -315,8 +307,7 @@ public class InfrastSettingsUserControlModel : TaskViewModel
|
||||
public bool DormTrustEnabled
|
||||
{
|
||||
get => _dormTrustEnabled;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _dormTrustEnabled, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.DormTrustEnabled, value.ToString());
|
||||
}
|
||||
@@ -330,8 +321,7 @@ public class InfrastSettingsUserControlModel : TaskViewModel
|
||||
public bool OriginiumShardAutoReplenishment
|
||||
{
|
||||
get => _originiumShardAutoReplenishment;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _originiumShardAutoReplenishment, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.OriginiumShardAutoReplenishment, value.ToString());
|
||||
}
|
||||
@@ -344,8 +334,7 @@ public class InfrastSettingsUserControlModel : TaskViewModel
|
||||
[UsedImplicitly]
|
||||
public void SelectCustomInfrastFile()
|
||||
{
|
||||
var dialog = new OpenFileDialog
|
||||
{
|
||||
var dialog = new OpenFileDialog {
|
||||
Filter = LocalizationHelper.GetString("CustomInfrastFile") + "|*.json",
|
||||
};
|
||||
|
||||
@@ -362,8 +351,7 @@ public class InfrastSettingsUserControlModel : TaskViewModel
|
||||
public string CustomInfrastFile
|
||||
{
|
||||
get => _customInfrastFile;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _customInfrastFile, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.CustomInfrastFile, value);
|
||||
RefreshCustomInfrastPlan();
|
||||
@@ -381,8 +369,7 @@ public class InfrastSettingsUserControlModel : TaskViewModel
|
||||
|
||||
public int CustomInfrastPlanIndex
|
||||
{
|
||||
get
|
||||
{
|
||||
get {
|
||||
if (CustomInfrastPlanInfoList.Count == 0)
|
||||
{
|
||||
return 0;
|
||||
@@ -396,8 +383,7 @@ public class InfrastSettingsUserControlModel : TaskViewModel
|
||||
return _customInfrastPlanIndex;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (CustomInfrastPlanInfoList.Count == 0)
|
||||
{
|
||||
return;
|
||||
@@ -554,8 +540,7 @@ public class InfrastSettingsUserControlModel : TaskViewModel
|
||||
Instances.TaskQueueViewModel.AddLog(descPost);
|
||||
}
|
||||
|
||||
CustomInfrastPlanInfoList.Add(new CustomInfrastPlanInfo
|
||||
{
|
||||
CustomInfrastPlanInfoList.Add(new CustomInfrastPlanInfo {
|
||||
Index = i,
|
||||
Name = display,
|
||||
Description = desc,
|
||||
@@ -640,8 +625,7 @@ public class InfrastSettingsUserControlModel : TaskViewModel
|
||||
|
||||
public override (AsstTaskType Type, JObject Params) Serialize()
|
||||
{
|
||||
return new AsstInfrastTask
|
||||
{
|
||||
return new AsstInfrastTask {
|
||||
Mode = InfrastMode,
|
||||
Facilitys = GetInfrastOrderList(),
|
||||
UsesOfDrones = UsesOfDrones,
|
||||
|
||||
@@ -59,8 +59,7 @@ public class MallSettingsUserControlModel : TaskViewModel
|
||||
public string LastCreditFightTaskTime
|
||||
{
|
||||
get => _lastCreditFightTaskTime;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _lastCreditFightTaskTime, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.LastCreditFightTaskTime, value);
|
||||
}
|
||||
@@ -73,8 +72,7 @@ public class MallSettingsUserControlModel : TaskViewModel
|
||||
/// </summary>
|
||||
public bool CreditFightTaskEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
get {
|
||||
try
|
||||
{
|
||||
if (DateTime.UtcNow.ToYjDate() > DateTime.ParseExact(_lastCreditFightTaskTime.Replace('-', '/'), "yyyy/MM/dd HH:mm:ss", CultureInfo.InvariantCulture))
|
||||
@@ -90,8 +88,7 @@ public class MallSettingsUserControlModel : TaskViewModel
|
||||
return false;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _creditFightTaskEnabled, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.CreditFightTaskEnabled, value.ToString());
|
||||
}
|
||||
@@ -99,13 +96,11 @@ public class MallSettingsUserControlModel : TaskViewModel
|
||||
|
||||
public bool CreditFightTaskEnabledDisplay
|
||||
{
|
||||
get
|
||||
{
|
||||
get {
|
||||
return _creditFightTaskEnabled;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _creditFightTaskEnabled, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.CreditFightTaskEnabled, value.ToString());
|
||||
}
|
||||
@@ -129,8 +124,7 @@ public class MallSettingsUserControlModel : TaskViewModel
|
||||
public string LastCreditVisitFriendsTime
|
||||
{
|
||||
get => _lastCreditVisitFriendsTime;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _lastCreditVisitFriendsTime, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.LastCreditVisitFriendsTime, value);
|
||||
}
|
||||
@@ -144,8 +138,7 @@ public class MallSettingsUserControlModel : TaskViewModel
|
||||
public bool CreditVisitOnceADay
|
||||
{
|
||||
get => _creditVisitOnceADay;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _creditVisitOnceADay, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.CreditVisitOnceADay, value.ToString());
|
||||
}
|
||||
@@ -158,8 +151,7 @@ public class MallSettingsUserControlModel : TaskViewModel
|
||||
/// </summary>
|
||||
public bool CreditVisitFriendsEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
get {
|
||||
if (!_creditVisitOnceADay)
|
||||
{
|
||||
return _creditVisitFriendsEnabled;
|
||||
@@ -176,8 +168,7 @@ public class MallSettingsUserControlModel : TaskViewModel
|
||||
}
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _creditVisitFriendsEnabled, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.CreditVisitFriendsEnabled, value.ToString());
|
||||
}
|
||||
@@ -185,13 +176,11 @@ public class MallSettingsUserControlModel : TaskViewModel
|
||||
|
||||
public bool CreditVisitFriendsEnabledDisplay
|
||||
{
|
||||
get
|
||||
{
|
||||
get {
|
||||
return _creditVisitFriendsEnabled;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _creditVisitFriendsEnabled, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.CreditVisitFriendsEnabled, value.ToString());
|
||||
}
|
||||
@@ -205,8 +194,7 @@ public class MallSettingsUserControlModel : TaskViewModel
|
||||
public int CreditFightSelectFormation
|
||||
{
|
||||
get => _creditFightSelectFormation;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _creditFightSelectFormation, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.CreditFightSelectFormation, value.ToString());
|
||||
}
|
||||
@@ -220,8 +208,7 @@ public class MallSettingsUserControlModel : TaskViewModel
|
||||
public bool CreditShopping
|
||||
{
|
||||
get => _creditShopping;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _creditShopping, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.CreditShopping, value.ToString());
|
||||
}
|
||||
@@ -235,8 +222,7 @@ public class MallSettingsUserControlModel : TaskViewModel
|
||||
public string CreditFirstList
|
||||
{
|
||||
get => _creditFirstList;
|
||||
set
|
||||
{
|
||||
set {
|
||||
value = value.Replace(";", ";").Trim();
|
||||
SetAndNotify(ref _creditFirstList, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.CreditFirstListNew, value);
|
||||
@@ -251,8 +237,7 @@ public class MallSettingsUserControlModel : TaskViewModel
|
||||
public string CreditBlackList
|
||||
{
|
||||
get => _creditBlackList;
|
||||
set
|
||||
{
|
||||
set {
|
||||
value = value.Replace(";", ";").Trim();
|
||||
SetAndNotify(ref _creditBlackList, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.CreditBlackListNew, value);
|
||||
@@ -267,8 +252,7 @@ public class MallSettingsUserControlModel : TaskViewModel
|
||||
public bool CreditForceShoppingIfCreditFull
|
||||
{
|
||||
get => _creditForceShoppingIfCreditFull;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _creditForceShoppingIfCreditFull, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.CreditForceShoppingIfCreditFull, value.ToString());
|
||||
}
|
||||
@@ -282,8 +266,7 @@ public class MallSettingsUserControlModel : TaskViewModel
|
||||
public bool CreditOnlyBuyDiscount
|
||||
{
|
||||
get => _creditOnlyBuyDiscount;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _creditOnlyBuyDiscount, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.CreditOnlyBuyDiscount, value.ToString());
|
||||
}
|
||||
@@ -297,8 +280,7 @@ public class MallSettingsUserControlModel : TaskViewModel
|
||||
public bool CreditReserveMaxCredit
|
||||
{
|
||||
get => _creditReserveMaxCredit;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _creditReserveMaxCredit, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.CreditReserveMaxCredit, value.ToString());
|
||||
}
|
||||
@@ -307,8 +289,7 @@ public class MallSettingsUserControlModel : TaskViewModel
|
||||
public override (AsstTaskType Type, JObject Params) Serialize()
|
||||
{
|
||||
var fightEnable = Instances.TaskQueueViewModel.TaskItemViewModels.FirstOrDefault(x => x.OriginalName == "Combat")?.IsCheckedWithNull is not false;
|
||||
var task = new AsstMallTask()
|
||||
{
|
||||
var task = new AsstMallTask() {
|
||||
CreditFight = fightEnable ? (!string.IsNullOrEmpty(FightSettingsUserControlModel.Instance.Stage) && CreditFightTaskEnabled) : CreditFightTaskEnabled,
|
||||
FormationIndex = CreditFightSelectFormation,
|
||||
VisitFriends = CreditVisitFriendsEnabled,
|
||||
@@ -359,8 +340,7 @@ public class MallSettingsUserControlModel : TaskViewModel
|
||||
{
|
||||
}
|
||||
|
||||
var task = new AsstMallTask()
|
||||
{
|
||||
var task = new AsstMallTask() {
|
||||
CreditFight = creditFight && !fightStage,
|
||||
FormationIndex = mall.CreditFightFormation,
|
||||
VisitFriends = visitFriends,
|
||||
|
||||
@@ -55,8 +55,7 @@ public class ReclamationSettingsUserControlModel : TaskViewModel
|
||||
public Theme ReclamationTheme
|
||||
{
|
||||
get => _reclamationTheme;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _reclamationTheme, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.ReclamationTheme, value.ToString());
|
||||
}
|
||||
@@ -79,8 +78,7 @@ public class ReclamationSettingsUserControlModel : TaskViewModel
|
||||
public Mode ReclamationMode
|
||||
{
|
||||
get => _reclamationMode;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _reclamationMode, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.ReclamationMode, value.ToString());
|
||||
}
|
||||
@@ -90,8 +88,7 @@ public class ReclamationSettingsUserControlModel : TaskViewModel
|
||||
|
||||
public string ReclamationToolToCraft
|
||||
{
|
||||
get
|
||||
{
|
||||
get {
|
||||
if (string.IsNullOrEmpty(_reclamationToolToCraft))
|
||||
{
|
||||
return LocalizationHelper.GetString("ReclamationToolToCraftPlaceholder", DataHelper.ClientLanguageMapper[SettingsViewModel.GameSettings.ClientType]);
|
||||
@@ -100,8 +97,7 @@ public class ReclamationSettingsUserControlModel : TaskViewModel
|
||||
return _reclamationToolToCraft;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
set {
|
||||
value = value.Replace(';', ';');
|
||||
SetAndNotify(ref _reclamationToolToCraft, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.ReclamationToolToCraft, value);
|
||||
@@ -113,8 +109,7 @@ public class ReclamationSettingsUserControlModel : TaskViewModel
|
||||
public int ReclamationIncrementMode
|
||||
{
|
||||
get => _reclamationIncrementMode;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _reclamationIncrementMode, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.ReclamationIncrementMode, value.ToString());
|
||||
}
|
||||
@@ -134,8 +129,7 @@ public class ReclamationSettingsUserControlModel : TaskViewModel
|
||||
public int ReclamationMaxCraftCountPerRound
|
||||
{
|
||||
get => int.Parse(_reclamationMaxCraftCountPerRound);
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _reclamationMaxCraftCountPerRound, value.ToString());
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.ReclamationMaxCraftCountPerRound, value.ToString());
|
||||
}
|
||||
@@ -146,8 +140,7 @@ public class ReclamationSettingsUserControlModel : TaskViewModel
|
||||
public bool ReclamationClearStore
|
||||
{
|
||||
get => _reclamationClearStore;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _reclamationClearStore, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.ReclamationClearStore, value.ToString());
|
||||
}
|
||||
@@ -177,8 +170,7 @@ public class ReclamationSettingsUserControlModel : TaskViewModel
|
||||
/// <returns>返回(Asst任务类型, 参数)</returns>
|
||||
public override (AsstTaskType Type, JObject Params) Serialize()
|
||||
{
|
||||
return new AsstReclamationTask
|
||||
{
|
||||
return new AsstReclamationTask {
|
||||
Theme = ReclamationTheme,
|
||||
Mode = ReclamationMode,
|
||||
IncrementMode = ReclamationIncrementMode,
|
||||
@@ -196,8 +188,7 @@ public class ReclamationSettingsUserControlModel : TaskViewModel
|
||||
}
|
||||
|
||||
var toolToCraft = !string.IsNullOrEmpty(task.ToolToCraft) ? task.ToolToCraft : LocalizationHelper.GetString("ReclamationToolToCraftPlaceholder", DataHelper.ClientLanguageMapper[SettingsViewModel.GameSettings.ClientType]);
|
||||
var asstTask = new AsstReclamationTask()
|
||||
{
|
||||
var asstTask = new AsstReclamationTask() {
|
||||
Theme = task.Theme,
|
||||
Mode = task.Mode,
|
||||
IncrementMode = task.IncrementMode,
|
||||
|
||||
@@ -72,8 +72,7 @@ public class RecruitSettingsUserControlModel : TaskViewModel
|
||||
public object[] AutoRecruitFirstList
|
||||
{
|
||||
get => _autoRecruitFirstList;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _autoRecruitFirstList, value);
|
||||
var config = string.Join(';', value.Cast<CombinedData>().Select(i => i.Value));
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.AutoRecruitFirstList, config);
|
||||
@@ -88,8 +87,7 @@ public class RecruitSettingsUserControlModel : TaskViewModel
|
||||
public int RecruitMaxTimes
|
||||
{
|
||||
get => _recruitMaxTimes;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _recruitMaxTimes, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RecruitMaxTimes, value.ToString());
|
||||
}
|
||||
@@ -103,8 +101,7 @@ public class RecruitSettingsUserControlModel : TaskViewModel
|
||||
public bool RefreshLevel3
|
||||
{
|
||||
get => _refreshLevel3;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _refreshLevel3, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RefreshLevel3, value.ToString());
|
||||
}
|
||||
@@ -118,8 +115,7 @@ public class RecruitSettingsUserControlModel : TaskViewModel
|
||||
public bool ForceRefresh
|
||||
{
|
||||
get => _forceRefresh;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _forceRefresh, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.ForceRefresh, value.ToString());
|
||||
}
|
||||
@@ -130,8 +126,7 @@ public class RecruitSettingsUserControlModel : TaskViewModel
|
||||
public bool? UseExpeditedWithNull
|
||||
{
|
||||
get => _useExpeditedWithNull;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (value == true)
|
||||
{
|
||||
value = null;
|
||||
@@ -166,8 +161,7 @@ public class RecruitSettingsUserControlModel : TaskViewModel
|
||||
public int SelectExtraTags
|
||||
{
|
||||
get => _selectExtraTags;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _selectExtraTags, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.SelectExtraTags, value.ToString());
|
||||
}
|
||||
@@ -181,8 +175,7 @@ public class RecruitSettingsUserControlModel : TaskViewModel
|
||||
public bool NotChooseLevel1
|
||||
{
|
||||
get => _notChooseLevel1;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _notChooseLevel1, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.NotChooseLevel1, value.ToString());
|
||||
}
|
||||
@@ -196,8 +189,7 @@ public class RecruitSettingsUserControlModel : TaskViewModel
|
||||
public bool ChooseLevel3
|
||||
{
|
||||
get => _chooseLevel3;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _chooseLevel3, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RecruitChooseLevel3, value.ToString());
|
||||
}
|
||||
@@ -211,8 +203,7 @@ public class RecruitSettingsUserControlModel : TaskViewModel
|
||||
public bool ChooseLevel4
|
||||
{
|
||||
get => _chooseLevel4;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _chooseLevel4, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RecruitChooseLevel4, value.ToString());
|
||||
}
|
||||
@@ -226,8 +217,7 @@ public class RecruitSettingsUserControlModel : TaskViewModel
|
||||
public bool ChooseLevel5
|
||||
{
|
||||
get => _chooseLevel5;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _chooseLevel5, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RecruitChooseLevel5, value.ToString());
|
||||
}
|
||||
@@ -238,8 +228,7 @@ public class RecruitSettingsUserControlModel : TaskViewModel
|
||||
public int ChooseLevel3Hour
|
||||
{
|
||||
get => _chooseLevel3Hour;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (!SetAndNotify(ref _chooseLevel3Hour, value))
|
||||
{
|
||||
return;
|
||||
@@ -254,8 +243,7 @@ public class RecruitSettingsUserControlModel : TaskViewModel
|
||||
public int ChooseLevel3Min
|
||||
{
|
||||
get => _chooseLevel3Min;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (!SetAndNotify(ref _chooseLevel3Min, value))
|
||||
{
|
||||
return;
|
||||
@@ -270,10 +258,8 @@ public class RecruitSettingsUserControlModel : TaskViewModel
|
||||
public int ChooseLevel3Time
|
||||
{
|
||||
get => _chooseLevel3Time;
|
||||
set
|
||||
{
|
||||
value = value switch
|
||||
{
|
||||
set {
|
||||
value = value switch {
|
||||
< 60 => 540,
|
||||
> 540 => 60,
|
||||
_ => value / 10 * 10,
|
||||
@@ -291,8 +277,7 @@ public class RecruitSettingsUserControlModel : TaskViewModel
|
||||
public int ChooseLevel4Hour
|
||||
{
|
||||
get => _chooseLevel4Hour;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (!SetAndNotify(ref _chooseLevel4Hour, value))
|
||||
{
|
||||
return;
|
||||
@@ -307,8 +292,7 @@ public class RecruitSettingsUserControlModel : TaskViewModel
|
||||
public int ChooseLevel4Min
|
||||
{
|
||||
get => _chooseLevel4Min;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (!SetAndNotify(ref _chooseLevel4Min, value))
|
||||
{
|
||||
return;
|
||||
@@ -323,10 +307,8 @@ public class RecruitSettingsUserControlModel : TaskViewModel
|
||||
public int ChooseLevel4Time
|
||||
{
|
||||
get => _chooseLevel4Time;
|
||||
set
|
||||
{
|
||||
value = value switch
|
||||
{
|
||||
set {
|
||||
value = value switch {
|
||||
< 60 => 540,
|
||||
> 540 => 60,
|
||||
_ => value / 10 * 10,
|
||||
@@ -344,8 +326,7 @@ public class RecruitSettingsUserControlModel : TaskViewModel
|
||||
public int ChooseLevel5Hour
|
||||
{
|
||||
get => _chooseLevel5Hour;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (!SetAndNotify(ref _chooseLevel5Hour, value))
|
||||
{
|
||||
return;
|
||||
@@ -360,8 +341,7 @@ public class RecruitSettingsUserControlModel : TaskViewModel
|
||||
public int ChooseLevel5Min
|
||||
{
|
||||
get => _chooseLevel5Min;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (!SetAndNotify(ref _chooseLevel5Min, value))
|
||||
{
|
||||
return;
|
||||
@@ -376,10 +356,8 @@ public class RecruitSettingsUserControlModel : TaskViewModel
|
||||
public int ChooseLevel5Time
|
||||
{
|
||||
get => _chooseLevel5Time;
|
||||
set
|
||||
{
|
||||
value = value switch
|
||||
{
|
||||
set {
|
||||
value = value switch {
|
||||
< 60 => 540,
|
||||
> 540 => 60,
|
||||
_ => value / 10 * 10,
|
||||
@@ -394,8 +372,7 @@ public class RecruitSettingsUserControlModel : TaskViewModel
|
||||
|
||||
public override (AsstTaskType Type, JObject Params) Serialize()
|
||||
{
|
||||
var task = new AsstRecruitTask()
|
||||
{
|
||||
var task = new AsstRecruitTask() {
|
||||
Refresh = RefreshLevel3,
|
||||
ForceRefresh = ForceRefresh,
|
||||
SetRecruitTime = true,
|
||||
|
||||
@@ -78,8 +78,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
foreach (var i in list)
|
||||
{
|
||||
int value = i;
|
||||
var display = value switch
|
||||
{
|
||||
var display = value switch {
|
||||
-1 => LocalizationHelper.GetString("NotSwitch") + " (-1)",
|
||||
int.MaxValue => $"MAX ({maxThemeDifficulty})",
|
||||
0 => "MIN (0)",
|
||||
@@ -92,8 +91,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
RoguelikeDifficulty = RoguelikeDifficultyList.Any(item => item.Value == RoguelikeDifficulty) ? difficulty : -1;
|
||||
}
|
||||
|
||||
private static int GetMaxDifficultyForTheme(Theme theme) => theme switch
|
||||
{
|
||||
private static int GetMaxDifficultyForTheme(Theme theme) => theme switch {
|
||||
Theme.Phantom => 15,
|
||||
Theme.Mizuki => 18,
|
||||
Theme.Sami => 15,
|
||||
@@ -161,8 +159,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
RoguelikeRoles = RoguelikeRolesList.Any(x => x.Value == roguelikeRoles) ? roguelikeRoles : "稳扎稳打";
|
||||
}
|
||||
|
||||
private readonly Dictionary<string, List<(string Key, string Value)>> _squadDictionary = new()
|
||||
{
|
||||
private readonly Dictionary<string, List<(string Key, string Value)>> _squadDictionary = new() {
|
||||
["Phantom_Default"] =
|
||||
[
|
||||
("GatheringSquad", "集群分队"),
|
||||
@@ -375,8 +372,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public Theme RoguelikeTheme
|
||||
{
|
||||
get => _roguelikeTheme;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeTheme, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeTheme, value.ToString());
|
||||
|
||||
@@ -421,8 +417,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public int RoguelikeDifficulty
|
||||
{
|
||||
get => _roguelikeDifficulty;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeDifficulty, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeDifficulty, value.ToString());
|
||||
}
|
||||
@@ -436,8 +431,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public Mode RoguelikeMode
|
||||
{
|
||||
get => _roguelikeMode;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (value == Mode.Investment)
|
||||
{
|
||||
RoguelikeInvestmentEnabled = true;
|
||||
@@ -458,8 +452,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public string RoguelikeCollectibleModeSquad
|
||||
{
|
||||
get => _roguelikeCollectibleModeSquad;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeCollectibleModeSquad, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeCollectibleModeSquad, value);
|
||||
}
|
||||
@@ -473,8 +466,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public string RoguelikeSquad
|
||||
{
|
||||
get => _roguelikeSquad;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeSquad, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeSquad, value);
|
||||
}
|
||||
@@ -494,8 +486,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public string RoguelikeRoles
|
||||
{
|
||||
get => _roguelikeRoles;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeRoles, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeRoles, value);
|
||||
}
|
||||
@@ -509,8 +500,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public string RoguelikeCoreChar
|
||||
{
|
||||
get => _roguelikeCoreChar;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (_roguelikeCoreChar == (value ??= string.Empty))
|
||||
{
|
||||
return;
|
||||
@@ -530,8 +520,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public ObservableCollection<string> RoguelikeCoreCharList
|
||||
{
|
||||
get => _roguelikeCoreCharList;
|
||||
private set
|
||||
{
|
||||
private set {
|
||||
if (!string.IsNullOrEmpty(RoguelikeCoreChar) && !value.Contains(RoguelikeCoreChar))
|
||||
{
|
||||
value.Add(RoguelikeCoreChar);
|
||||
@@ -549,8 +538,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public bool RoguelikeStartWithEliteTwo
|
||||
{
|
||||
get => _roguelikeStartWithEliteTwo;
|
||||
set
|
||||
{
|
||||
set {
|
||||
switch (value)
|
||||
{
|
||||
case true when RoguelikeUseSupportUnit:
|
||||
@@ -575,8 +563,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public bool RoguelikeOnlyStartWithEliteTwoRaw
|
||||
{
|
||||
get => _roguelikeOnlyStartWithEliteTwo;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeOnlyStartWithEliteTwo, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeOnlyStartWithEliteTwo, value.ToString());
|
||||
}
|
||||
@@ -632,8 +619,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public object[] RoguelikeStartWithSelectList
|
||||
{
|
||||
get => _roguelikeStartWithSelectList;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeStartWithSelectList, value);
|
||||
var config = string.Join(' ', _roguelikeStartWithSelectList.Cast<GenericCombinedData<string>>().Select(i => i.Value).ToList());
|
||||
ConfigurationHelper.SetGlobalValue(ConfigurationKeys.RoguelikeStartWithSelectList, config);
|
||||
@@ -648,8 +634,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public bool Roguelike3FirstFloorFoldartal
|
||||
{
|
||||
get => _roguelike3FirstFloorFoldartal;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelike3FirstFloorFoldartal, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.Roguelike3FirstFloorFoldartal, value.ToString());
|
||||
}
|
||||
@@ -660,8 +645,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public string Roguelike3FirstFloorFoldartals
|
||||
{
|
||||
get => _roguelike3FirstFloorFoldartals;
|
||||
set
|
||||
{
|
||||
set {
|
||||
value = value.Trim();
|
||||
SetAndNotify(ref _roguelike3FirstFloorFoldartals, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.Roguelike3FirstFloorFoldartals, value);
|
||||
@@ -676,8 +660,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public bool Roguelike3NewSquad2StartingFoldartal
|
||||
{
|
||||
get => _roguelike3NewSquad2StartingFoldartal;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelike3NewSquad2StartingFoldartal, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.Roguelike3NewSquad2StartingFoldartal, value.ToString());
|
||||
}
|
||||
@@ -688,8 +671,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public string Roguelike3NewSquad2StartingFoldartals
|
||||
{
|
||||
get => _roguelike3NewSquad2StartingFoldartals;
|
||||
set
|
||||
{
|
||||
set {
|
||||
value = value.Replace(';', ';').Trim();
|
||||
SetAndNotify(ref _roguelike3NewSquad2StartingFoldartals, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.Roguelike3NewSquad2StartingFoldartals, value);
|
||||
@@ -705,8 +687,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public string RoguelikeExpectedCollapsalParadigms
|
||||
{
|
||||
get => _roguelikeExpectedCollapsalParadigms;
|
||||
set
|
||||
{
|
||||
set {
|
||||
value = value.Replace(';', ';').Trim();
|
||||
SetAndNotify(ref _roguelikeExpectedCollapsalParadigms, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeExpectedCollapsalParadigms, value);
|
||||
@@ -721,8 +702,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public bool RoguelikeUseSupportUnit
|
||||
{
|
||||
get => _roguelikeUseSupportUnit;
|
||||
set
|
||||
{
|
||||
set {
|
||||
if (value && _roguelikeStartWithEliteTwo && RoguelikeSquadIsProfessional)
|
||||
{
|
||||
RoguelikeStartWithEliteTwo = false;
|
||||
@@ -741,8 +721,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public bool RoguelikeEnableNonfriendSupport
|
||||
{
|
||||
get => _roguelikeEnableNonfriendSupport;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeEnableNonfriendSupport, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeEnableNonfriendSupport, value.ToString());
|
||||
}
|
||||
@@ -756,8 +735,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public int RoguelikeStartsCount
|
||||
{
|
||||
get => _roguelikeStartsCount;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeStartsCount, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeStartsCount, value.ToString());
|
||||
}
|
||||
@@ -771,8 +749,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public bool RoguelikeInvestmentEnabled
|
||||
{
|
||||
get => _roguelikeInvestmentEnabled;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeInvestmentEnabled, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeInvestmentEnabled, value.ToString());
|
||||
}
|
||||
@@ -786,8 +763,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public bool RoguelikeInvestmentWithMoreScoreRaw
|
||||
{
|
||||
get => _roguelikeInvestmentWithMoreScore;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeInvestmentWithMoreScore, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeInvestmentEnterSecondFloor, value.ToString());
|
||||
}
|
||||
@@ -806,8 +782,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public bool RoguelikeCollectibleModeShopping
|
||||
{
|
||||
get => _roguelikeCollectibleModeShopping;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeCollectibleModeShopping, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeCollectibleModeShopping, value.ToString());
|
||||
}
|
||||
@@ -818,8 +793,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public bool RoguelikeRefreshTraderWithDiceRaw
|
||||
{
|
||||
get => _roguelikeRefreshTraderWithDice;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeRefreshTraderWithDice, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeRefreshTraderWithDice, value.ToString());
|
||||
}
|
||||
@@ -828,8 +802,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public bool RoguelikeRefreshTraderWithDice
|
||||
{
|
||||
get => _roguelikeRefreshTraderWithDice && RoguelikeTheme == Theme.Mizuki;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeRefreshTraderWithDice, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeRefreshTraderWithDice, value.ToString());
|
||||
}
|
||||
@@ -843,8 +816,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public int RoguelikeInvestsCount
|
||||
{
|
||||
get => _roguelikeInvestsCount;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeInvestsCount, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeInvestsCount, value.ToString());
|
||||
}
|
||||
@@ -858,8 +830,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public bool RoguelikeStopWhenInvestmentFull
|
||||
{
|
||||
get => _roguelikeStopWhenInvestmentFull;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeStopWhenInvestmentFull, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeStopWhenInvestmentFull, value.ToString());
|
||||
}
|
||||
@@ -873,8 +844,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public bool RoguelikeStopAtFinalBoss
|
||||
{
|
||||
get => _roguelikeStopAtFinalBoss;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeStopAtFinalBoss, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeStopAtFinalBoss, value.ToString());
|
||||
}
|
||||
@@ -888,8 +858,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public bool RoguelikeMonthlySquadAutoIterate
|
||||
{
|
||||
get => _roguelikeMonthlySquadAutoIterate;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeMonthlySquadAutoIterate, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeMonthlySquadAutoIterate, value.ToString());
|
||||
}
|
||||
@@ -903,8 +872,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public bool RoguelikeMonthlySquadCheckComms
|
||||
{
|
||||
get => _roguelikeMonthlySquadCheckComms;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeMonthlySquadCheckComms, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeMonthlySquadCheckComms, value.ToString());
|
||||
}
|
||||
@@ -918,8 +886,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public bool RoguelikeDeepExplorationAutoIterate
|
||||
{
|
||||
get => _roguelikeDeepExplorationAutoIterate;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeDeepExplorationAutoIterate, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeDeepExplorationAutoIterate, value.ToString());
|
||||
}
|
||||
@@ -933,8 +900,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public RoguelikeBoskySubNodeType RoguelikeFindPlaytimeTarget
|
||||
{
|
||||
get => _roguelikeFindPlaytimeTarget;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeFindPlaytimeTarget, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeFindPlaytimeTarget, value.ToString());
|
||||
}
|
||||
@@ -943,12 +909,12 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
/// <summary>
|
||||
/// Gets the list of available playtime target options for FindPlaytime mode.
|
||||
/// </summary>
|
||||
public ObservableCollection<GenericCombinedData<RoguelikeBoskySubNodeType>> RoguelikeFindPlaytimeTargetList { get; } = new()
|
||||
{
|
||||
public ObservableCollection<GenericCombinedData<RoguelikeBoskySubNodeType>> RoguelikeFindPlaytimeTargetList { get; } =
|
||||
[
|
||||
new() { Display = LocalizationHelper.GetString("RoguelikePlaytimeLing"), Value = RoguelikeBoskySubNodeType.Ling },
|
||||
new() { Display = LocalizationHelper.GetString("RoguelikePlaytimeShu"), Value = RoguelikeBoskySubNodeType.Shu },
|
||||
new() { Display = LocalizationHelper.GetString("RoguelikePlaytimeNian"), Value = RoguelikeBoskySubNodeType.Nian },
|
||||
};
|
||||
];
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the FindPlaytime target selection should be visible.
|
||||
@@ -963,8 +929,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public bool RoguelikeStopAtMaxLevel
|
||||
{
|
||||
get => _roguelikeStopAtMaxLevel;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeStopAtMaxLevel, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeStopAtMaxLevel, value.ToString());
|
||||
}
|
||||
@@ -978,8 +943,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public bool RoguelikeDelayAbortUntilCombatComplete
|
||||
{
|
||||
get => _roguelikeDelayAbortUntilCombatComplete;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeDelayAbortUntilCombatComplete, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeDelayAbortUntilCombatComplete, value.ToString());
|
||||
}
|
||||
@@ -993,8 +957,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
public bool RoguelikeStartWithSeed
|
||||
{
|
||||
get => _roguelikeStartWithSeed;
|
||||
set
|
||||
{
|
||||
set {
|
||||
SetAndNotify(ref _roguelikeStartWithSeed, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeStartWithSeed, value.ToString());
|
||||
}
|
||||
@@ -1095,7 +1058,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
break;
|
||||
|
||||
case "RoguelikeEncounterOptions":
|
||||
var options = (subTaskDetails!["options"]! as JArray) ?? new JArray();
|
||||
var options = (subTaskDetails!["options"]! as JArray) ?? [];
|
||||
Instances.TaskQueueViewModel.AddLog(string.Format(LocalizationHelper.GetString("RoguelikeEncounterOptions"), options.Count, UiLogColor.EventIS));
|
||||
foreach (var option in options)
|
||||
{
|
||||
@@ -1109,8 +1072,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
case "BoskyPassageNode":
|
||||
{
|
||||
var nodeType = subTaskDetails!["node_type"]?.ToString();
|
||||
var (localizedNodeType, logColor) = nodeType switch
|
||||
{
|
||||
var (localizedNodeType, logColor) = nodeType switch {
|
||||
"Omissions" => (LocalizationHelper.GetString("BoskyOmissions"), UiLogColor.BoskyOmissionsIS),
|
||||
"Legend" => (LocalizationHelper.GetString("BoskyLegend"), UiLogColor.BoskyLegendIS),
|
||||
"OldShop" => (LocalizationHelper.GetString("BoskyOldShop"), UiLogColor.BoskyOldShopIS),
|
||||
@@ -1150,8 +1112,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
case "RoguelikeJieGardenTargetFound":
|
||||
{
|
||||
var targetSubtype = subTaskDetails!["target_subtype"]?.ToString();
|
||||
var localizedTarget = targetSubtype switch
|
||||
{
|
||||
var localizedTarget = targetSubtype switch {
|
||||
"Ling" => LocalizationHelper.GetString("RoguelikePlaytimeLing"),
|
||||
"Shu" => LocalizationHelper.GetString("RoguelikePlaytimeShu"),
|
||||
"Nian" => LocalizationHelper.GetString("RoguelikePlaytimeNian"),
|
||||
@@ -1205,8 +1166,7 @@ public class RoguelikeSettingsUserControlModel : TaskViewModel
|
||||
|
||||
public override (AsstTaskType Type, JObject Params) Serialize()
|
||||
{
|
||||
var task = new AsstRoguelikeTask()
|
||||
{
|
||||
var task = new AsstRoguelikeTask() {
|
||||
Theme = RoguelikeTheme,
|
||||
Mode = RoguelikeMode,
|
||||
Starts = RoguelikeStartsCount,
|
||||
|
||||
@@ -39,8 +39,7 @@ public class StartUpSettingsUserControlModel : TaskViewModel
|
||||
public string AccountName
|
||||
{
|
||||
get => _accountName;
|
||||
set
|
||||
{
|
||||
set {
|
||||
value = value.Trim();
|
||||
SetAndNotify(ref _accountName, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.AccountName, value);
|
||||
@@ -66,14 +65,12 @@ public class StartUpSettingsUserControlModel : TaskViewModel
|
||||
{
|
||||
var clientType = SettingsViewModel.GameSettings.ClientType;
|
||||
var startGame = SettingsViewModel.GameSettings.StartGame;
|
||||
var accountName = clientType switch
|
||||
{
|
||||
var accountName = clientType switch {
|
||||
"Official" or "Bilibili" => AccountName,
|
||||
_ => string.Empty,
|
||||
};
|
||||
|
||||
var task = new AsstStartUpTask()
|
||||
{
|
||||
var task = new AsstStartUpTask() {
|
||||
ClientType = clientType,
|
||||
StartGame = startGame,
|
||||
AccountName = accountName,
|
||||
@@ -90,14 +87,12 @@ public class StartUpSettingsUserControlModel : TaskViewModel
|
||||
}
|
||||
|
||||
var clientType = SettingsViewModel.GameSettings.ClientType;
|
||||
var accountName = clientType switch
|
||||
{
|
||||
var accountName = clientType switch {
|
||||
"Official" or "Bilibili" => startUp.AccountName,
|
||||
_ => string.Empty,
|
||||
};
|
||||
|
||||
var task = new AsstStartUpTask()
|
||||
{
|
||||
var task = new AsstStartUpTask() {
|
||||
ClientType = clientType,
|
||||
StartGame = !string.IsNullOrEmpty(clientType),
|
||||
AccountName = accountName,
|
||||
|
||||
Reference in New Issue
Block a user