Changeset 7013 for trunk/sources/HeuristicLab.Optimizer
- Timestamp:
- 11/17/11 14:09:13 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimizer/3.3
- Files:
-
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimizer/3.3/HeuristicLab.Optimizer-3.3.csproj
r6999 r7013 120 120 <EmbeddedResource Include="Documents\VNS_TSP.hl" /> 121 121 <EmbeddedResource Include="Documents\PSO_Schwefel.hl" /> 122 <EmbeddedResource Include="MainFormTypeSelectionDialog.resx">123 <DependentUpon>MainFormTypeSelectionDialog.cs</DependentUpon>124 </EmbeddedResource>125 <EmbeddedResource Include="OptimizerDockingMainForm.resx">126 <DependentUpon>OptimizerDockingMainForm.cs</DependentUpon>127 </EmbeddedResource>128 122 <None Include="Plugin.cs.frame" /> 129 123 <Compile Include="OptimizerSingleDocumentMainForm.cs"> -
trunk/sources/HeuristicLab.Optimizer/3.3/OptimizerDockingMainForm.cs
r6935 r7013 23 23 using System.ComponentModel; 24 24 using System.Linq; 25 using System.Reflection; 25 26 using System.Windows.Forms; 26 27 using HeuristicLab.Common; … … 32 33 namespace HeuristicLab.Optimizer { 33 34 internal partial class OptimizerDockingMainForm : DockingMainForm { 35 private string title; 34 36 35 37 private Clipboard<IItem> clipboard; … … 53 55 protected override void OnInitialized(EventArgs e) { 54 56 base.OnInitialized(e); 57 58 AssemblyFileVersionAttribute version = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyFileVersionAttribute), true). 59 Cast<AssemblyFileVersionAttribute>().FirstOrDefault(); 60 title = "HeuristicLab Optimizer"; 61 if (version != null) title += " " + version.Version; 62 Title = title; 55 63 56 64 ContentManager.Initialize(new PersistenceContentManager()); … … 96 104 UpdateTitle(); 97 105 } 106 107 public override void UpdateTitle() { 108 if (InvokeRequired) 109 Invoke(new Action(UpdateTitle)); 110 else { 111 IContentView activeView = ActiveView as IContentView; 112 if ((activeView != null) && (activeView.Content != null) && (activeView.Content is IStorableContent)) { 113 IStorableContent content = (IStorableContent)activeView.Content; 114 Title = title + " [" + (string.IsNullOrEmpty(content.Filename) ? "Unsaved" : content.Filename) + "]"; 115 } else { 116 Title = title; 117 } 118 } 119 } 98 120 } 99 121 } -
trunk/sources/HeuristicLab.Optimizer/3.3/OptimizerMultipleDocumentMainForm.cs
r6935 r7013 23 23 using System.ComponentModel; 24 24 using System.Linq; 25 using System.Reflection; 25 26 using System.Windows.Forms; 26 27 using HeuristicLab.Common; … … 32 33 namespace HeuristicLab.Optimizer { 33 34 internal partial class OptimizerMultipleDocumentMainForm : MultipleDocumentMainForm { 35 private string title; 34 36 35 37 private Clipboard<IItem> clipboard; … … 53 55 protected override void OnInitialized(EventArgs e) { 54 56 base.OnInitialized(e); 57 58 AssemblyFileVersionAttribute version = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyFileVersionAttribute), true). 59 Cast<AssemblyFileVersionAttribute>().FirstOrDefault(); 60 title = "HeuristicLab Optimizer"; 61 if (version != null) title += " " + version.Version; 62 Title = title; 55 63 56 64 ContentManager.Initialize(new PersistenceContentManager()); … … 96 104 UpdateTitle(); 97 105 } 106 107 public override void UpdateTitle() { 108 if (InvokeRequired) 109 Invoke(new Action(UpdateTitle)); 110 else { 111 IContentView activeView = ActiveView as IContentView; 112 if ((activeView != null) && (activeView.Content != null) && (activeView.Content is IStorableContent)) { 113 IStorableContent content = (IStorableContent)activeView.Content; 114 Title = title + " [" + (string.IsNullOrEmpty(content.Filename) ? "Unsaved" : content.Filename) + "]"; 115 } else { 116 Title = title; 117 } 118 } 119 } 98 120 } 99 121 } -
trunk/sources/HeuristicLab.Optimizer/3.3/OptimizerSingleDocumentMainForm.cs
r6935 r7013 23 23 using System.ComponentModel; 24 24 using System.Linq; 25 using System.Reflection; 25 26 using System.Windows.Forms; 26 27 using HeuristicLab.Common; … … 32 33 namespace HeuristicLab.Optimizer { 33 34 internal partial class OptimizerSingleDocumentMainForm : SingleDocumentMainForm { 35 private string title; 34 36 35 37 private Clipboard<IItem> clipboard; … … 53 55 protected override void OnInitialized(EventArgs e) { 54 56 base.OnInitialized(e); 57 58 AssemblyFileVersionAttribute version = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyFileVersionAttribute), true). 59 Cast<AssemblyFileVersionAttribute>().FirstOrDefault(); 60 title = "HeuristicLab Optimizer"; 61 if (version != null) title += " " + version.Version; 62 Title = title; 55 63 56 64 ContentManager.Initialize(new PersistenceContentManager()); … … 96 104 UpdateTitle(); 97 105 } 106 107 public override void UpdateTitle() { 108 if (InvokeRequired) 109 Invoke(new Action(UpdateTitle)); 110 else { 111 IContentView activeView = ActiveView as IContentView; 112 if ((activeView != null) && (activeView.Content != null) && (activeView.Content is IStorableContent)) { 113 IStorableContent content = (IStorableContent)activeView.Content; 114 Title = title + " [" + (string.IsNullOrEmpty(content.Filename) ? "Unsaved" : content.Filename) + "]"; 115 } else { 116 Title = title; 117 } 118 } 119 } 98 120 } 99 121 }
Note: See TracChangeset
for help on using the changeset viewer.