first commit
This commit is contained in:
98
DCIT.Core/Models/AppConfig.cs
Normal file
98
DCIT.Core/Models/AppConfig.cs
Normal file
@@ -0,0 +1,98 @@
|
||||
using System;
|
||||
|
||||
namespace DCIT.Core.Models
|
||||
{
|
||||
public class AppConfig
|
||||
{
|
||||
public string Format { get; set; } = "dcit.config";
|
||||
|
||||
public string Version { get; set; } = "1.0";
|
||||
|
||||
public DateTime SavedAt { get; set; } = DateTime.Now;
|
||||
|
||||
public AppSettings Settings { get; set; } = new AppSettings();
|
||||
|
||||
public ReplacePageState ReplacePage { get; set; } = new ReplacePageState();
|
||||
|
||||
public RestorePageState RestorePage { get; set; } = new RestorePageState();
|
||||
}
|
||||
|
||||
public class AppSettings
|
||||
{
|
||||
public bool JsonDiffEncryption { get; set; } = true;
|
||||
|
||||
public bool EnableImageReplacement { get; set; } = true;
|
||||
|
||||
public bool UseFixedImageSeed { get; set; }
|
||||
|
||||
public int FixedImageSeed { get; set; } = 20260424;
|
||||
|
||||
public AutoExtractSettings AutoExtract { get; set; } = new AutoExtractSettings();
|
||||
}
|
||||
|
||||
public class AutoExtractSettings
|
||||
{
|
||||
public bool ExtractKeywords { get; set; } = true;
|
||||
|
||||
public bool ExtractHighFrequencyWords { get; set; } = true;
|
||||
|
||||
public bool ExtractHighFrequencySentences { get; set; } = true;
|
||||
|
||||
public bool UseKeywordFrequency { get; set; } = true;
|
||||
|
||||
public bool UseKeywordTfIdf { get; set; } = true;
|
||||
|
||||
public bool UseKeywordTextRank { get; set; } = true;
|
||||
|
||||
public int MaxKeywordCount { get; set; } = 10;
|
||||
|
||||
public int MaxWordCount { get; set; } = 10;
|
||||
|
||||
public int MaxSentenceCount { get; set; } = 10;
|
||||
|
||||
public bool CountChineseWords { get; set; } = true;
|
||||
|
||||
public bool CountEnglishWords { get; set; } = true;
|
||||
|
||||
public bool CountChineseSentences { get; set; } = true;
|
||||
|
||||
public bool CountEnglishSentences { get; set; } = true;
|
||||
|
||||
public int MinChineseWordLength { get; set; } = 1;
|
||||
|
||||
public int MinEnglishWordLength { get; set; } = 1;
|
||||
|
||||
public string SentenceDelimiters { get; set; } = "。!?;.!?;\r\n";
|
||||
|
||||
public bool ExcludeEmailAddresses { get; set; }
|
||||
}
|
||||
|
||||
public class ReplacePageState
|
||||
{
|
||||
public string SourceDirectory { get; set; } = string.Empty;
|
||||
|
||||
public string OutputDirectory { get; set; } = string.Empty;
|
||||
|
||||
public string RuleFilePath { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class RestorePageState
|
||||
{
|
||||
public string ReplaceDirectory { get; set; } = string.Empty;
|
||||
|
||||
public string RestoreDirectory { get; set; } = string.Empty;
|
||||
|
||||
public string DiffInputFormat { get; set; } = ".diff";
|
||||
}
|
||||
|
||||
public class ConfigurationLoadResult
|
||||
{
|
||||
public AppConfig Config { get; set; } = new AppConfig();
|
||||
|
||||
public bool IsMissing { get; set; }
|
||||
|
||||
public bool IsCorrupted { get; set; }
|
||||
|
||||
public string ErrorMessage { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user