Repository navigation
Expand file tree
/
Copy pathAppSettings.cs
More file actions
102 lines (97 loc) · 6.05 KB
/
Copy pathAppSettings.cs
File metadata and controls
102 lines (97 loc) · 6.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
using System;
using System.Collections.Generic;
// Semantic Anchor [AppSettings.cs]: Serialized settings contract: property names, defaults, schema version and BackupPathPair identity must stay compatible with SettingsStorage and existing JSON files.
namespace EasyVersionBackup
{
public class AppSettings
{
public int SettingsSchemaVersion { get; set; } = 3;
public bool ZipDestinationFiles { get; set; } = true;
public string DefaultVersioning { get; set; } = "0.0.1";
public bool AutoIncrementVersion { get; set; } = true;
public bool MinimizeToSystray { get; set; } = false;
public bool CloseToSystray { get; set; } = false;
public bool AutoUpdateCheck { get; set; } = true;
public bool StartWithWindows { get; set; } = false;
public bool IgnoreCopyErrors { get; set; } = false;
public bool AutoPurgeEnabled { get; set; } = false;
public bool SourceCleanupEnabled { get; set; } = false;
public bool InitialDisclaimerAccepted { get; set; } = false;
public DateTime? LastDataLossWarningUtc { get; set; }
public int DataLossWarningIntervalDays { get; set; } = 30;
public bool ShowRetentionWarningDialogue { get; set; } = true;
public string BackupDestinationConflictHandling { get; set; } = "Ask";
public bool AutoBackupEnabled { get; set; } = false;
public int AutoBackupIntervalSeconds { get; set; } = 900;
// Semantic Anchor: Persist only the display filter; never serialize filtered pair subsets or temporary checkbox overrides.
public string ConfiguredPathsFilter { get; set; } = string.Empty;
// Semantic Anchor [Profiles / SSOT]: Profile IDs are stable across renames;
// pair membership lives on each original BackupPathPair, never on filtered grid rows.
public bool ShowProfilesButton { get; set; } = false;
public string SelectedProfileId { get; set; } = string.Empty;
public List<BackupProfile> Profiles { get; set; } = new List<BackupProfile>();
public List<BackupPathPair> BackupPathPairs { get; set; } = new List<BackupPathPair>();
public Dictionary<string, List<string>> ExclusionTemplates { get; set; } = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase);
public Dictionary<string, BackupPathPair> PairSettingsTemplates { get; set; } = new Dictionary<string, BackupPathPair>(StringComparer.OrdinalIgnoreCase);
public Dictionary<string, string> LastUsedVersionsByPair { get; set; } = new Dictionary<string, string>();
public Dictionary<string, BackupPathStatus> BackupStatusesByPair { get; set; } = new Dictionary<string, BackupPathStatus>();
public int MainWindowWidth { get; set; } = 800;
public int MainWindowHeight { get; set; } = 207;
public int MainWindowLeft { get; set; } = -1;
public int MainWindowTop { get; set; } = -1;
public List<string> Tags { get; set; } = new List<string>();
public int BackupVersionDialogWidth { get; set; } = 560;
public int BackupVersionDialogHeight { get; set; } = 330;
public int BackupInfoDialogWidth { get; set; } = 760;
public int BackupInfoDialogHeight { get; set; } = 430;
// Semantic Anchor [Theme selection]: Only the stable theme ID is persisted;
// visual previews, generated effect layers and runtime colors are never serialized.
public string VisualThemeId { get; set; } = "Default";
// Semantic Anchor [Visual motion settings]: Additive, visual-only user preferences;
// never affect backup selection, retention or source cleanup. Old settings use defaults.
public bool VisualThemeReducedMotion { get; set; } = false;
public double VisualThemeSpeed { get; set; } = 1.0;
public double VisualThemeIntensity { get; set; } = 1.0;
public string LogLevel { get; set; } = "Normal";
}
public class BackupProfile
{
public string Id { get; set; } = Guid.NewGuid().ToString("N");
public string Name { get; set; } = string.Empty;
}
public class BackupPathStatus
{
public const string StatusOk = "OK";
public const string StatusWarning = "Warning";
public const string StatusError = "Error";
public string LastBackupDateTime { get; set; } = string.Empty;
public string LastBackupStatus { get; set; } = string.Empty;
public string LastBackupFileName { get; set; } = string.Empty;
public string LastBackupErrorMessage { get; set; } = string.Empty;
}
public class BackupPathPair
{
// A pair may be assigned to multiple profiles; this never affects IsEnabled.
public List<string> ProfileIds { get; set; } = new List<string>();
public bool IsEnabled { get; set; } = true;
public string SourceDirectory { get; set; } = string.Empty;
public string TargetDirectory { get; set; } = string.Empty;
public string Versioning { get; set; } = string.Empty;
public bool IgnoreCopyErrors { get; set; } = false;
public bool SkipDialogs { get; set; } = false;
public int AutoBackupIntervalSeconds { get; set; } = 0;
public bool RetentionKeepLastEnabled { get; set; } = false;
public int RetentionKeepLastCount { get; set; } = 10;
public bool RetentionKeepDaysEnabled { get; set; } = false;
public int RetentionKeepDaysCount { get; set; } = 14;
public string RetentionMode { get; set; } = "Any";
public List<string> RetentionExcludedTags { get; set; } = new List<string>();
public List<string> ExcludedPaths { get; set; } = new List<string>();
public bool SourceCleanupEnabled { get; set; } = false;
public string SourceCleanupRelativeDirectory { get; set; } = string.Empty;
public List<string> SourceCleanupFileExtensions { get; set; } = new List<string>();
public string SourceCleanupMode { get; set; } = "KeepLast";
public int SourceCleanupKeepLastCount { get; set; } = 10;
public string SourceCleanupKeepAfterDate { get; set; } = string.Empty;
}
}