using FLY.Integrated.Server.OBJProxy; using FLY.OBJComponents.Server.OBJProxy; using FLY.OBJComponents.Server; using FObjBase; using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; using FLY.Integrated.Server.Model; namespace FLY.Integrated.Server { public class TDGage { public string mParamDirectory;//参数目录 m_path;//数据文件的 根目录默认是 Gage1 public string mName;//名字 如:gage0 public SysParam mSysParam; public IntegratedSystem mData; Model.DbModel mDbModel; public Model.HistoryDb mHistoryDb; public WarningSystem mWarning; public TDGage(string nam) { mName = nam; mParamDirectory = mName;// @"D:\" + m_name; if (!System.IO.Directory.Exists(mParamDirectory)) { System.IO.Directory.CreateDirectory(mParamDirectory); } System.Environment.CurrentDirectory = mParamDirectory; Init1(); } #region Init登陆服务器初始化---------------------------------------------------- /// /// 第1步, 加载本地数据 /// public void Init1() { mSysParam = new SysParam(); mData = new IntegratedSystem(); //--------------------------------------------------------------------------------------------------------------- //数据库 mDbModel = new DbModel(); mDbModel.Init(); mHistoryDb = new HistoryDb(); mHistoryDb.Init(mDbModel); mHistoryDb.KeepDBSize(mSysParam.DBKeepMonth); mWarning = new WarningSystem(); mWarning.Init(mHistoryDb.ErrorBuffer); mData.Init(mHistoryDb, mWarning); } #endregion } }