Changeset 2665 for trunk/sources/HeuristicLab.Optimizer
- Timestamp:
- 01/21/10 05:10:12 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimizer/3.3/FileManager.cs
r2656 r2665 53 53 if (newItemDialog.ShowDialog() == DialogResult.OK) { 54 54 IView view = MainFormManager.CreateDefaultView(newItemDialog.Item); 55 if (view is IObjectView) { 56 view.Caption = "Item" + newDocumentsCounter.ToString() + ".hl"; 57 newDocumentsCounter++; 55 if (view == null) { 56 MessageBox.Show("There is no view for the new item. It cannot be displayed. ", "No View Available", MessageBoxButtons.OK, MessageBoxIcon.Error); 57 } else { 58 if (view is IObjectView) { 59 view.Caption = "Item" + newDocumentsCounter.ToString() + ".hl"; 60 newDocumentsCounter++; 61 } 62 MainFormManager.MainForm.ShowView(view); 58 63 } 59 MainFormManager.MainForm.ShowView(view);60 64 } 61 65 } … … 188 192 Invoke(delegate() { 189 193 IObjectView view = MainFormManager.CreateDefaultView(item) as IObjectView; 190 if (view != null) { 194 if (view == null) { 195 MessageBox.Show("There is no view for the loaded item. It cannot be displayed. ", "No View Available", MessageBoxButtons.OK, MessageBoxIcon.Error); 196 } else { 191 197 view.Caption = Path.GetFileName(filename); 192 198 files.Add(view, new FileInfo(filename));
Note: See TracChangeset
for help on using the changeset viewer.