51 行
1.9 KiB
C#
51 行
1.9 KiB
C#
using YukkuriMovieMaker.Plugin;
|
|
|
|
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;
|
|
|
|
public override bool HasSettingView => true;
|
|
|
|
public override object? SettingView => new UndoTreeSettingsView { DataContext = new UndoTreeSettingsViewModel() };
|
|
|
|
public int MaxNodes { get; set => Set(ref field, Math.Clamp(value, NodesMinimum, NodesMaximum)); } = NodesDefault;
|
|
|
|
public bool FollowCurrent { get; set => Set(ref field, value); } = true;
|
|
|
|
public bool ShowTime { get; set => Set(ref field, value); } = true;
|
|
|
|
public bool PreferReplay { get; set => Set(ref field, value); }
|
|
|
|
public bool SelectionOnly { get; set => Set(ref field, value); }
|
|
|
|
public bool FoldRuns { get; set => Set(ref field, value); } = true;
|
|
|
|
public bool LinkTimeline { get; set => Set(ref field, value); }
|
|
|
|
public bool SaveHistory { get; set => Set(ref field, value); } = true;
|
|
|
|
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, TotalSizeMegabytesMinimum, TotalSizeMegabytesMaximum)); } = TotalSizeMegabytesDefault;
|
|
|
|
public ConflictPolicy ConflictPolicy { get; set => Set(ref field, value); } = ConflictPolicy.Skip;
|
|
|
|
public override void Initialize()
|
|
{
|
|
}
|
|
}
|