Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/28/11 13:47:28 (13 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.MainForm.WindowsForms/3.3/MainForms/MainForm.cs

    r6935 r7085  
    2323using System.Collections.Generic;
    2424using System.Linq;
    25 using System.Reflection;
    2625using System.Windows.Forms;
    2726using HeuristicLab.Common;
     
    3433    private int appStartingCursors;
    3534    private int waitingCursors;
    36     private string title;
    3735
    3836    protected MainForm()
     
    177175    }
    178176
    179     protected virtual void OnInitialized(EventArgs e) {
    180       AssemblyFileVersionAttribute version = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyFileVersionAttribute), true).
    181                                              Cast<AssemblyFileVersionAttribute>().FirstOrDefault();
    182       title = "HeuristicLab Optimizer";
    183       if (version != null) title += " " + version.Version;
    184       Title = title;
    185     }
     177    protected virtual void OnInitialized(EventArgs e) { }
     178
     179    public virtual void UpdateTitle() { }
    186180
    187181    private void FormActivated(object sender, EventArgs e) {
     
    498492    }
    499493    #endregion
    500 
    501     public virtual void UpdateTitle() {
    502       if (InvokeRequired)
    503         Invoke(new Action(UpdateTitle));
    504       else {
    505         IContentView activeView = ActiveView as IContentView;
    506         if ((activeView != null) && (activeView.Content != null) && (activeView.Content is IStorableContent)) {
    507           IStorableContent content = (IStorableContent)activeView.Content;
    508           Title = title + " [" + (string.IsNullOrEmpty(content.Filename) ? "Unsaved" : content.Filename) + "]";
    509         } else {
    510           Title = title;
    511         }
    512       }
    513     }
    514494  }
    515495}
Note: See TracChangeset for help on using the changeset viewer.