Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/18/11 16:02:58 (13 years ago)
Author:
ascheibe
Message:

#1652 fixed a bug when saving a file in SD or MD mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimizer/3.3/OptimizerMultipleDocumentMainForm.cs

    r6827 r6935  
    2323using System.ComponentModel;
    2424using System.Linq;
    25 using System.Reflection;
    2625using System.Windows.Forms;
    2726using HeuristicLab.Common;
     
    3332namespace HeuristicLab.Optimizer {
    3433  internal partial class OptimizerMultipleDocumentMainForm : MultipleDocumentMainForm {
    35     private string title;
    3634
    3735    private Clipboard<IItem> clipboard;
     
    5553    protected override void OnInitialized(EventArgs e) {
    5654      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;
    6255
    6356      ContentManager.Initialize(new PersistenceContentManager());
     
    10396      UpdateTitle();
    10497    }
    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     }
    11998  }
    12099}
Note: See TracChangeset for help on using the changeset viewer.