|
@@ -135,12 +135,14 @@ namespace HOZProject
|
|
|
|
|
|
//加载窗口移动事件
|
|
|
this.MouseDown += new MouseEventHandler(FormHOZMain_MouseDown);
|
|
|
- //plFill.MouseDown += new MouseEventHandler(FormHOZMain_MouseDown);
|
|
|
- //plTop.MouseDown += new MouseEventHandler(FormHOZMain_MouseDown);
|
|
|
- //plLeft.MouseDown += new MouseEventHandler(FormHOZMain_MouseDown);
|
|
|
- //plLeftContent.MouseDown += new MouseEventHandler(FormHOZMain_MouseDown);
|
|
|
//新建
|
|
|
NewCreate();
|
|
|
+ //实例初始化窗体对象
|
|
|
+ if (uControl_Init == null)
|
|
|
+ {
|
|
|
+ uControl_Init = new UControl_Init(this);
|
|
|
+ uControl_Init.ReloadConfig();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
#region 创建切孔列表信息
|
|
@@ -291,9 +293,24 @@ namespace HOZProject
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- m_MeasureFile.Save();
|
|
|
- //将初始化中的参数,配置到测量参数中
|
|
|
- m_MeasureFile.MParam = uControl_Init.GetMeasureParamInfo();
|
|
|
+ //保存测量文件
|
|
|
+ if (m_MeasureFile.Save())
|
|
|
+ {
|
|
|
+ //获取测量文件所在路径
|
|
|
+ string savePath = m_MeasureFile.FilePath;
|
|
|
+ //数据库名称
|
|
|
+ string dbFileName = "MeasureFile.db";
|
|
|
+ //要复制的文件路径
|
|
|
+ string pLocalFilePath = Application.StartupPath +"\\"+dbFileName;
|
|
|
+ string pSaveFilePath = savePath + dbFileName;//指定存储的路径
|
|
|
+ if (File.Exists(pLocalFilePath))//必须判断要复制的文件是否存在
|
|
|
+ {
|
|
|
+ //三个参数分别是源文件路径,存储路径,若存储路径有相同文件是否替换
|
|
|
+ File.Copy(pLocalFilePath, pSaveFilePath, true);
|
|
|
+ }
|
|
|
+ //将初始化中的参数,配置到测量参数中
|
|
|
+ m_MeasureFile.MParam = uControl_Init.GetMeasureParamInfo();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|