- Timestamp:
- 05/27/14 08:35:48 (10 years ago)
- Location:
- stable
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 10498
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Optimizer/3.3/OptimizerDockingMainForm.cs
r9456 r10893 86 86 protected override void OnClosing(CancelEventArgs e) { 87 87 base.OnClosing(e); 88 if (MainFormManager.MainForm.Views.OfType<IContentView>(). FirstOrDefault() != null) {88 if (MainFormManager.MainForm.Views.OfType<IContentView>().Any(v=>v.Content is IStorableContent)) { 89 89 if (MessageBox.Show(this, "Some views are still opened. If their content has not been saved, it will be lost after closing. Do you really want to close HeuristicLab Optimizer?", "Close Optimizer", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.No) 90 90 e.Cancel = true; … … 110 110 else { 111 111 IContentView activeView = ActiveView as IContentView; 112 if ((activeView != null) && (activeView.Content != null) && (activeView.Contentis IStorableContent)) {112 if ((activeView != null) && (activeView.Content is IStorableContent)) { 113 113 IStorableContent content = (IStorableContent)activeView.Content; 114 114 Title = title + " [" + (string.IsNullOrEmpty(content.Filename) ? "Unsaved" : content.Filename) + "]"; -
stable/HeuristicLab.Optimizer/3.3/OptimizerMultipleDocumentMainForm.cs
r9456 r10893 86 86 protected override void OnClosing(CancelEventArgs e) { 87 87 base.OnClosing(e); 88 if (MainFormManager.MainForm.Views.OfType<IContentView>(). FirstOrDefault() != null) {88 if (MainFormManager.MainForm.Views.OfType<IContentView>().Any(v => v.Content is IStorableContent)) { 89 89 if (MessageBox.Show(this, "Some views are still opened. If their content has not been saved, it will be lost after closing. Do you really want to close HeuristicLab Optimizer?", "Close Optimizer", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.No) 90 90 e.Cancel = true; … … 110 110 else { 111 111 IContentView activeView = ActiveView as IContentView; 112 if ((activeView != null) && (activeView.Content != null) && (activeView.Contentis IStorableContent)) {112 if ((activeView != null) && (activeView.Content is IStorableContent)) { 113 113 IStorableContent content = (IStorableContent)activeView.Content; 114 114 Title = title + " [" + (string.IsNullOrEmpty(content.Filename) ? "Unsaved" : content.Filename) + "]"; -
stable/HeuristicLab.Optimizer/3.3/OptimizerSingleDocumentMainForm.cs
r9456 r10893 86 86 protected override void OnClosing(CancelEventArgs e) { 87 87 base.OnClosing(e); 88 if (MainFormManager.MainForm.Views.OfType<IContentView>(). FirstOrDefault() != null) {88 if (MainFormManager.MainForm.Views.OfType<IContentView>().Any(v => v.Content is IStorableContent)) { 89 89 if (MessageBox.Show(this, "Some views are still opened. If their content has not been saved, it will be lost after closing. Do you really want to close HeuristicLab Optimizer?", "Close Optimizer", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.No) 90 90 e.Cancel = true; … … 110 110 else { 111 111 IContentView activeView = ActiveView as IContentView; 112 if ((activeView != null) && (activeView.Content != null) && (activeView.Contentis IStorableContent)) {112 if ((activeView != null) && (activeView.Content is IStorableContent)) { 113 113 IStorableContent content = (IStorableContent)activeView.Content; 114 114 Title = title + " [" + (string.IsNullOrEmpty(content.Filename) ? "Unsaved" : content.Filename) + "]";
Note: See TracChangeset
for help on using the changeset viewer.