設定の範囲と容量の単位を定数から導く
このコミットが含まれているのは:
5ファイル変更
+37
-11
検索条件に一致するファイルはありません
@@ -4,6 +4,16 @@ namespace UndoTree;
|
||||
|
||||
internal class UndoTreeSettings : SettingsBase<UndoTreeSettings>
|
||||
{
|
||||
public const int NodesMinimum = 20;
|
||||
public const int NodesMaximum = 5000;
|
||||
public const int NodesDefault = 2000;
|
||||
public const int RetentionDaysMinimum = 1;
|
||||
public const int RetentionDaysMaximum = 365;
|
||||
public const int RetentionDaysDefault = 30;
|
||||
public const int TotalSizeMegabytesMinimum = 1;
|
||||
public const int TotalSizeMegabytesMaximum = 1024;
|
||||
public const int TotalSizeMegabytesDefault = 64;
|
||||
|
||||
public override SettingsCategory Category => SettingsCategory.Tool;
|
||||
|
||||
public override string Name => Texts.UndoTree;
|
||||
@@ -12,7 +22,7 @@ internal class UndoTreeSettings : SettingsBase<UndoTreeSettings>
|
||||
|
||||
public override object? SettingView => new UndoTreeSettingsView { DataContext = new UndoTreeSettingsViewModel() };
|
||||
|
||||
public int MaxNodes { get; set => Set(ref field, Math.Clamp(value, 20, 5000)); } = 2000;
|
||||
public int MaxNodes { get; set => Set(ref field, Math.Clamp(value, NodesMinimum, NodesMaximum)); } = NodesDefault;
|
||||
|
||||
public bool FollowCurrent { get; set => Set(ref field, value); } = true;
|
||||
|
||||
@@ -28,9 +38,9 @@ internal class UndoTreeSettings : SettingsBase<UndoTreeSettings>
|
||||
|
||||
public bool SaveHistory { get; set => Set(ref field, value); }
|
||||
|
||||
public int RetentionDays { get; set => Set(ref field, Math.Clamp(value, 1, 365)); } = 30;
|
||||
public int RetentionDays { get; set => Set(ref field, Math.Clamp(value, RetentionDaysMinimum, RetentionDaysMaximum)); } = RetentionDaysDefault;
|
||||
|
||||
public int MaxTotalSizeMegabytes { get; set => Set(ref field, Math.Clamp(value, 1, 1024)); } = 64;
|
||||
public int MaxTotalSizeMegabytes { get; set => Set(ref field, Math.Clamp(value, TotalSizeMegabytesMinimum, TotalSizeMegabytesMaximum)); } = TotalSizeMegabytesDefault;
|
||||
|
||||
public ConflictPolicy ConflictPolicy { get; set => Set(ref field, value); } = ConflictPolicy.Skip;
|
||||
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする