|
@@ -208,25 +208,28 @@ namespace OTSPartA_STDEditor
|
|
|
|
|
|
try
|
|
|
{
|
|
|
- SaveFileDialog saveFile = new SaveFileDialog();
|
|
|
- saveFile.Title = "Please select the path which to save the file";
|
|
|
- saveFile.Filter = "Database File(*.db)|*.db";
|
|
|
- saveFile.OverwritePrompt = true; //是否覆盖当前文件
|
|
|
- saveFile.RestoreDirectory = true; //还原上次目录
|
|
|
- if (saveFile.ShowDialog() == DialogResult.OK)
|
|
|
- {
|
|
|
- System.IO.File.Copy(STDDBAddress, saveFile.FileName, true);
|
|
|
- bool result = SaveDictionaryToClassify(saveFile.FileName);
|
|
|
- if (result)
|
|
|
- {
|
|
|
- MessageBox.Show("Export file successful!", "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return;
|
|
|
- }
|
|
|
+ SaveFileDialog saveFile = new SaveFileDialog();
|
|
|
+ saveFile.Title = "Please select the path which to save the file";
|
|
|
+ saveFile.Filter = "Database File(*.db)|*.db";
|
|
|
+ saveFile.InitialDirectory = Application.StartupPath + "\\Config\\SysData\\";
|
|
|
+ saveFile.OverwritePrompt = true; //是否覆盖当前文件
|
|
|
+ //saveFile.RestoreDirectory = true; //还原上次目录
|
|
|
+ if (saveFile.ShowDialog() == DialogResult.OK)
|
|
|
+ {
|
|
|
+ System.IO.File.Copy(STDDBAddress, saveFile.FileName, true);
|
|
|
+ bool result = SaveDictionaryToClassify(saveFile.FileName);
|
|
|
+ STDDBAddress = saveFile.FileName;
|
|
|
+ this.Text = this.Text.Split(' ')[0] + " " + saveFile.FileName;
|
|
|
+ //if (result)
|
|
|
+ //{
|
|
|
+ // MessageBox.Show("Export file successful!", "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
+ //}
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
MessageBox.Show(ex.Message);
|
|
@@ -330,7 +333,7 @@ namespace OTSPartA_STDEditor
|
|
|
STDDictionaryInitial = Clone(STDDictionary) as Dictionary<int, STDdata>;
|
|
|
forWaiting.Close();
|
|
|
IsModified = false;
|
|
|
- MessageBox.Show("Save successful!", "Tip");
|
|
|
+ //MessageBox.Show("Save successful!", "Tip");
|
|
|
}
|
|
|
else
|
|
|
{
|