using HMI.Core.Entity;
|
using HMI.Core.Util;
|
using System;
|
using System.Collections.Generic;
|
using System.Collections.ObjectModel;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
using System.Xml.Serialization;
|
|
namespace HMI.DataViewer.Entity
|
{
|
/// <summary>
|
/// 数据库配置类
|
/// </summary>
|
[Serializable]
|
public class DataBase_Setting : NotifyBase
|
{
|
/// <summary>
|
/// 数据库文件路径
|
/// </summary>
|
private string dBFilePath = string.Empty;
|
|
/// <summary>
|
/// 数据库操作类
|
/// </summary>
|
private SqliteHelper sql = null;
|
|
/// <summary>
|
/// 数据表名称
|
/// </summary>
|
private string tableName = string.Empty;
|
|
/// <summary>
|
/// 设定程序名
|
/// </summary>
|
private string program = string.Empty;
|
|
private string timeCol = string.Empty;
|
|
/// <summary>
|
/// 高级查询条件
|
/// </summary>
|
private ObservableCollection<QueryCondition> condition = new ObservableCollection<QueryCondition>();
|
|
/// <summary>
|
/// 构造函数
|
/// </summary>
|
public DataBase_Setting()
|
{
|
// do nothing
|
}
|
|
/// <summary>
|
/// 数据库文件的存储路径
|
/// </summary>
|
public string DBFilePath
|
{
|
get => dBFilePath;
|
set { Set(ref dBFilePath, value); }
|
}
|
|
public string TimeCol
|
{
|
get => timeCol;
|
set { Set(ref timeCol, value); }
|
}
|
|
/// <summary>
|
/// 数据库操作句柄
|
/// </summary>
|
[XmlIgnore]
|
public SqliteHelper SQL
|
{
|
get { return this.sql; }
|
set { this.sql = value; }
|
}
|
|
/// <summary>
|
/// 高级查询条件
|
/// </summary>
|
public ObservableCollection<QueryCondition> Condition
|
{
|
get { return this.condition; }
|
set { Set(ref condition, value); }
|
}
|
|
/// <summary>
|
/// 数据表名称
|
/// </summary>
|
public string TableName
|
{
|
get { return this.tableName; }
|
set { Set(ref tableName, value); }
|
}
|
|
/// <summary>
|
/// 设定程序名
|
/// </summary>
|
public string Program
|
{
|
get { return this.program; }
|
set { Set(ref program, value); }
|
}
|
}
|
}
|