-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
116 changed files
with
18,534 additions
and
1,800 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -337,4 +337,5 @@ ASALocalRun/ | |
.localhistory/ | ||
|
||
# BeatPulse healthcheck temp database | ||
healthchecksdb | ||
healthchecksdb | ||
*.snk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
using System.Collections.Generic; | ||
using System.Windows.Forms; | ||
|
||
namespace MMEdit.Configuration | ||
{ | ||
/// <summary> | ||
/// 定义自定义设置的基类。 | ||
/// </summary> | ||
public abstract class CustomSettingsBase : ICustomSettings | ||
{ | ||
#region Constructor | ||
/// <summary> | ||
/// 初始化 <see cref="CustomSettingsBase"/> 类的新实例。 | ||
/// </summary> | ||
public CustomSettingsBase() | ||
{ | ||
Settings = new List<ICustomSettings>(); | ||
} | ||
#endregion | ||
|
||
#region Properties | ||
/// <summary> | ||
/// 获取或设置标签文本。 | ||
/// </summary> | ||
public string Text { get; protected set; } | ||
|
||
/// <summary> | ||
/// 获取子设置集合。 | ||
/// </summary> | ||
public List<ICustomSettings> Settings { get; } | ||
|
||
IList<ICustomSettings> ICustomSettings.Settings | ||
{ | ||
get | ||
{ | ||
return Settings; | ||
} | ||
} | ||
#endregion | ||
|
||
#region Methods | ||
/// <summary> | ||
/// 存储设置属性的当前值。 | ||
/// </summary> | ||
public abstract void Save(); | ||
|
||
/// <summary> | ||
/// <see cref="Settings"/> <inheritdoc cref="CustomSettingsBase.Save()"/> | ||
/// </summary> | ||
protected virtual void SaveSettings() | ||
{ | ||
Settings.ForEach(s => s.Save()); | ||
} | ||
|
||
/// <summary> | ||
/// 创建控件。 | ||
/// </summary> | ||
/// <returns></returns> | ||
public abstract Control CreateControl(); | ||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using System; | ||
|
||
namespace MMEdit.Configuration | ||
{ | ||
/// <summary> | ||
/// 定义扩展名导入规则。 | ||
/// </summary> | ||
[Serializable] | ||
public class ExtensionRule | ||
{ | ||
#region Constructor | ||
/// <summary> | ||
/// 初始化 <see cref="ExtensionRule"/> 类的新实例。 | ||
/// </summary> | ||
public ExtensionRule() | ||
{ | ||
|
||
} | ||
|
||
/// <summary> | ||
/// <inheritdoc cref="ExtensionRule.ExtensionRule()"/> | ||
/// </summary> | ||
/// <param name="extension"></param> | ||
/// <param name="importerGuid"></param> | ||
public ExtensionRule(string extension, Guid importerGuid) | ||
{ | ||
Extension = extension; | ||
ImporterGuid = importerGuid; | ||
} | ||
#endregion | ||
|
||
#region Properties | ||
/// <summary> | ||
/// 获取或设置扩展名。 | ||
/// </summary> | ||
public string Extension { get; set; } | ||
|
||
/// <summary> | ||
/// 获取或设置导入程序 GUID。 | ||
/// </summary> | ||
public Guid ImporterGuid { get; set; } | ||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
using System; | ||
using System.Drawing; | ||
using System.IO; | ||
|
||
namespace MMEdit.Configuration | ||
{ | ||
/// <summary> | ||
/// 表示历史项目。 | ||
/// </summary> | ||
[Serializable] | ||
public class History | ||
{ | ||
#region Constructor | ||
/// <summary> | ||
/// 初始化 <see cref=" History"/> 类的新实例。 | ||
/// </summary> | ||
public History() | ||
{ | ||
DateTime = DateTime.Now; | ||
} | ||
|
||
/// <summary> | ||
/// <inheritdoc cref="History()"/> | ||
/// </summary> | ||
/// <param name="fileName">文件名。</param> | ||
/// <param name="importerGuid">导入程序 GUID。</param> | ||
public History(string fileName, Guid importerGuid) : this() | ||
{ | ||
FullName = fileName; | ||
ImporterGuid = importerGuid; | ||
} | ||
|
||
/// <summary> | ||
/// <inheritdoc cref="History()"/> | ||
/// </summary> | ||
/// <param name="fileName">文件名。</param> | ||
/// <param name="importerGuid">导入程序 GUID。</param> | ||
/// <param name="image">图像。</param> | ||
public History(string fileName, Guid importerGuid, Image image) : this(fileName, importerGuid) | ||
{ | ||
Image = image; | ||
} | ||
|
||
/// <summary> | ||
/// <inheritdoc cref="History()"/> | ||
/// </summary> | ||
/// <param name="fileName">文件名。</param> | ||
/// <param name="importerGuid">导入程序 GUID。</param> | ||
/// <param name="image">图像。</param> | ||
/// <param name="dateTime">日期时间。</param> | ||
public History(string fileName, Guid importerGuid, Image image, DateTime dateTime) : this(fileName, importerGuid, image) | ||
{ | ||
DateTime = dateTime; | ||
} | ||
#endregion | ||
|
||
#region Properties | ||
/// <summary> | ||
/// 获取文件的名称。 | ||
/// </summary> | ||
public string Name | ||
{ | ||
get | ||
{ | ||
return Path.GetFileName(FullName); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// 获取或设置文件的完整名称。 | ||
/// </summary> | ||
public string FullName { get; set; } | ||
|
||
/// <summary> | ||
/// 获取或设置导入程序 GUID。 | ||
/// </summary> | ||
public Guid ImporterGuid { get; set; } | ||
|
||
/// <summary> | ||
/// 获取或设置图像。 | ||
/// </summary> | ||
public Image Image { get; set; } | ||
|
||
/// <summary> | ||
/// 获取日期时间。 | ||
/// </summary> | ||
public DateTime DateTime { get; set; } | ||
#endregion | ||
|
||
/// <summary> | ||
/// 获取历史缓存文件的路径。 | ||
/// </summary> | ||
public static string HistoryCachePath => Path.Combine(System.Windows.Forms.Application.UserAppDataPath, "Histories"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System.Collections.Generic; | ||
using System.Windows.Forms; | ||
|
||
namespace MMEdit.Configuration | ||
{ | ||
/// <summary> | ||
/// 定义自定义设置。 | ||
/// </summary> | ||
public interface ICustomSettings | ||
{ | ||
/// <summary> | ||
/// 获取标签文本。 | ||
/// </summary> | ||
string Text { get; } | ||
|
||
/// <summary> | ||
/// 获取子设置集合。 | ||
/// </summary> | ||
IList<ICustomSettings> Settings { get; } | ||
|
||
/// <summary> | ||
/// 存储设置属性的当前值。 | ||
/// </summary> | ||
void Save(); | ||
|
||
/// <summary> | ||
/// 创建控件。 | ||
/// </summary> | ||
/// <returns></returns> | ||
Control CreateControl(); | ||
} | ||
} |
Oops, something went wrong.