- Timestamp:
- 05/04/17 19:53:35 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceReintegration/HeuristicLab.Optimizer/3.3/FileManager.cs
r14185 r14930 78 78 if (view == null) 79 79 ErrorHandling.ShowErrorDialog("There is no view for the loaded item. It cannot be displayed.", new InvalidOperationException("No View Available")); 80 } 81 catch (Exception ex) { 80 } catch (Exception ex) { 82 81 ErrorHandling.ShowErrorDialog((Control)MainFormManager.MainForm, "Cannot open file.", ex); 83 } 84 finally { 82 } finally { 85 83 ((MainForm.WindowsForms.MainForm)MainFormManager.MainForm).ResetAppStartingCursor(); 86 84 } … … 101 99 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().SetAppStartingCursor(); 102 100 SetSaveOperationProgressInContentViews(content, true); 103 ContentManager.SaveAsync(content, content.Filename, true,SavingCompleted);101 ContentManager.SaveAsync(content, content.Filename, SavingCompleted); 104 102 } 105 103 } … … 118 116 saveFileDialog.Title = "Save Item"; 119 117 saveFileDialog.DefaultExt = "hl"; 120 saveFileDialog.Filter = " Uncompressed HeuristicLab Files|*.hl|HeuristicLab Files|*.hl|All Files|*.*";121 saveFileDialog.FilterIndex = 2;118 saveFileDialog.Filter = "HeuristicLab Files|*.hl|All Files|*.*"; 119 saveFileDialog.FilterIndex = 1; 122 120 } 123 121 … … 133 131 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().SetAppStartingCursor(); 134 132 SetSaveOperationProgressInContentViews(content, true, saveFileDialog.FileName); 135 if (saveFileDialog.FilterIndex == 1) { 136 ContentManager.SaveAsync(content, saveFileDialog.FileName, false, SavingCompleted); 137 } else { 138 ContentManager.SaveAsync(content, saveFileDialog.FileName, true, SavingCompleted); 139 } 133 ContentManager.SaveAsync(content, saveFileDialog.FileName, SavingCompleted); 140 134 } 141 135 } … … 145 139 if (error != null) throw error; 146 140 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().UpdateTitle(); 147 } 148 catch (Exception ex) { 141 } catch (Exception ex) { 149 142 ErrorHandling.ShowErrorDialog((Control)MainFormManager.MainForm, "Cannot save file.", ex); 150 } 151 finally { 143 } finally { 152 144 SetSaveOperationProgressInContentViews(content, false); 153 145 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().ResetAppStartingCursor();
Note: See TracChangeset
for help on using the changeset viewer.