public SettingDataDef() { RunData = new RunDataDef(); vData = new VDataDef(); rinseData = new CleanDef(); slaverData = new SlaverData(); }
/// <summary> /// 加载配置 /// </summary> public void OpenProject(string path) { try { SettingDataDef data = (SettingDataDef)Common.CreateProject.OpenProject(typeof(SettingDataDef), path); //将data的数据赋给this. 数据 this.RunData = data.RunData; this.vData = data.vData; this.slaverData = data.slaverData; this.rinseData = data.rinseData; } catch (Exception ex) { Common.LogWriter.WriteException(ex); Common.LogWriter.WriteLog(string.Format("错误:加载配置文件失败!\n异常描述:{0}\n时间:{1}", ex.Message, System.DateTime.Now.ToString("yyyyMMddhhmmss"))); } }