.config
.vscode
BlurHash
BlurHash.Core
BlurHash.System.Drawing.Common
Compare
Copy-Distinct
Date-Group
.vscode
Models
Binder
Stateless
AppSettings.cs
Configuration.cs
Date-Group.csproj
DateGroup.cs
Program.cs
appsettings.Development.json
appsettings.json
Delete-By-Distinct
Delete-By-Relative
Distance
Drag-Drop-Explorer
Drag-Drop-Move
Drag-Drop-Search
Drag-Drop-Set-Property-Item
Duplicate-Search
Face
FaceParts
FaceRecognitionDotNet
Instance
Map
Metadata
Metadata-Query
Mirror-Length
Move-By-Id
Offset-Date-Time-Original
PhotoPrism
PrepareForOld
Property
Property-Compare
Rename
Resize
Set-Created-Date
Shared
Tests
TestsWithFaceRecognitionDotNet
ThumbHash
.editorconfig
.gitattributes
.gitignore
.prettierignore
.txt
View-by-Distance-MKLink-Console.sln
package-lock.json
package.json
43 lines
1.3 KiB
C#
43 lines
1.3 KiB
C#
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace View_by_Distance.Date.Group.Models;
|
|
|
|
public class Configuration
|
|
{
|
|
|
|
protected Property.Models.Configuration _PropertyConfiguration;
|
|
public Property.Models.Configuration PropertyConfiguration => _PropertyConfiguration;
|
|
|
|
public bool ByCreateDateShortcut { init; get; }
|
|
public bool ByDay { init; get; }
|
|
public bool ByHash { init; get; }
|
|
public bool BySeason { init; get; }
|
|
public bool ByWeek { init; get; }
|
|
public bool KeepFullPath { init; get; }
|
|
|
|
[JsonConstructor]
|
|
public Configuration(Property.Models.Configuration propertyConfiguration, bool byCreateDateShortcut, bool byDay, bool byHash, bool bySeason, bool byWeek, bool keepFullPath)
|
|
{
|
|
ByDay = byDay;
|
|
ByHash = byHash;
|
|
ByWeek = byWeek;
|
|
BySeason = bySeason;
|
|
KeepFullPath = keepFullPath;
|
|
ByCreateDateShortcut = byCreateDateShortcut;
|
|
_PropertyConfiguration = propertyConfiguration;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true });
|
|
return result;
|
|
}
|
|
|
|
public void SetAndUpdate(Property.Models.Configuration configuration)
|
|
{
|
|
_PropertyConfiguration = configuration;
|
|
_PropertyConfiguration.Update();
|
|
}
|
|
|
|
} |