- Timestamp:
- 10/18/11 16:02:58 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimizer/3.3/OptimizerMultipleDocumentMainForm.cs
r6827 r6935 23 23 using System.ComponentModel; 24 24 using System.Linq; 25 using System.Reflection;26 25 using System.Windows.Forms; 27 26 using HeuristicLab.Common; … … 33 32 namespace HeuristicLab.Optimizer { 34 33 internal partial class OptimizerMultipleDocumentMainForm : MultipleDocumentMainForm { 35 private string title;36 34 37 35 private Clipboard<IItem> clipboard; … … 55 53 protected override void OnInitialized(EventArgs e) { 56 54 base.OnInitialized(e); 57 AssemblyFileVersionAttribute version = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyFileVersionAttribute), true).58 Cast<AssemblyFileVersionAttribute>().FirstOrDefault();59 title = "HeuristicLab Optimizer";60 if (version != null) title += " " + version.Version;61 Title = title;62 55 63 56 ContentManager.Initialize(new PersistenceContentManager()); … … 103 96 UpdateTitle(); 104 97 } 105 106 public void UpdateTitle() {107 if (InvokeRequired)108 Invoke(new Action(UpdateTitle));109 else {110 IContentView activeView = ActiveView as IContentView;111 if ((activeView != null) && (activeView.Content != null) && (activeView.Content is IStorableContent)) {112 IStorableContent content = (IStorableContent)activeView.Content;113 Title = title + " [" + (string.IsNullOrEmpty(content.Filename) ? "Unsaved" : content.Filename) + "]";114 } else {115 Title = title;116 }117 }118 }119 98 } 120 99 }
Note: See TracChangeset
for help on using the changeset viewer.