/// <summary> /// 加载工程 /// </summary> public void OpenProject(string path) { try { string name = Path.GetFileName(path); string fileName = path + "\\" + name + ".pro"; ProjectData data = (ProjectData)CreateProject.OpenProject(typeof(ProjectData), fileName); this.SaveData = data.SaveData; if (data.Product == null) { this.Product = new ProductStatistics(); } else { this.Product = data.Product; } } catch (Exception ex) { LogWriter.WriteException(ex); LogWriter.WriteLog(string.Format("错误:加载配置文件失败!\n异常描述:{0}\n时间:{1}", ex.Message, System.DateTime.Now.ToString("yyyyMMddhhmmss"))); } }