将以往的代码复制到代码库

This commit is contained in:
于智纯
2025-08-30 17:19:57 +08:00
parent da46e0242d
commit 20ea70bf64
198 changed files with 10075 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
namespace Future.Contract
{
/// <summary>
/// 配置声明
/// </summary>
public class Config : INotifyPropertyChanged
{
/// <summary>
/// 标识码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 显示名
/// </summary>
public string Title { get; set; }
/// <summary>
/// 描述
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 分组名
/// </summary>
public string Group { get; set; }
/// <summary>
/// 用于存储配置的默认值
/// </summary>
private string mValue = "";
/// <summary>
/// 值
/// </summary>
public string Value
{
get => this.mValue;
set
{
if (this.mValue == value)
{
this.Value = value;
this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Value"));
}
}
}
/// <summary>
/// 默认值
/// </summary>
public string Default { get; set; }
public event PropertyChangedEventHandler PropertyChanged;
/// <summary>
/// 辅助模式:重置配置=False智能配置=True
/// </summary>
public bool AssistMode { get; set; } = false;
/// <summary>
/// 配置数据格式有效性校验
/// </summary>
/// <returns>如果失败则返回原因</returns>
public virtual string InputVerify() { return null; }
/// <summary>
/// 可用性校验及解决方案返回
/// </summary>
/// <returns>如果失败则返回解决问题使用的专用界面</returns>
public virtual Control UsabilityCheck() { return null; }
/// <summary>
/// 重置参数的默认值
/// </summary>
/// <returns>如果失败则返回原因</returns>
public virtual string Resetting() { return null; }
}
}