Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/28/11 13:47:28 (12 years ago)
Author:
sforsten
Message:

#1669: branch has been merged with the trunk in revision 7081 and methods in RegressionBenchmark have been renamed.

Location:
branches/RegressionBenchmarks
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/RegressionBenchmarks

  • branches/RegressionBenchmarks/HeuristicLab.Optimizer/3.3/OptimizerMultipleDocumentMainForm.cs

    r6935 r7085  
    2323using System.ComponentModel;
    2424using System.Linq;
     25using System.Reflection;
    2526using System.Windows.Forms;
    2627using HeuristicLab.Common;
     
    3233namespace HeuristicLab.Optimizer {
    3334  internal partial class OptimizerMultipleDocumentMainForm : MultipleDocumentMainForm {
     35    private string title;
    3436
    3537    private Clipboard<IItem> clipboard;
     
    5355    protected override void OnInitialized(EventArgs e) {
    5456      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;
    5563
    5664      ContentManager.Initialize(new PersistenceContentManager());
     
    96104      UpdateTitle();
    97105    }
     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    }
    98120  }
    99121}
Note: See TracChangeset for help on using the changeset viewer.