Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/08/10 00:20:29 (14 years ago)
Author:
swagner
Message:

Refactored enabling and disabling of save buttons and menu items to prevent saving of running algorithms (#685)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/ContentView.cs

    r2916 r2961  
    3131namespace HeuristicLab.MainForm.WindowsForms {
    3232  public partial class ContentView : View, IContentView {
    33     public ContentView()
    34       : base() {
    35       InitializeComponent();
    36     }
    37 
    38     public ContentView(object content)
    39       : this() {
    40       this.content = content;
    41     }
    42 
    4333    private object content;
    4434    public object Content {
     
    5848        }
    5949      }
     50    }
     51    private bool saveEnabled;
     52    public bool SaveEnabled {
     53      get { return saveEnabled; }
     54      protected set {
     55        if (value != saveEnabled) {
     56          saveEnabled = value;
     57          OnChanged();
     58        }
     59      }
     60    }
     61
     62    public ContentView()
     63      : base() {
     64      InitializeComponent();
     65      saveEnabled = true;
     66    }
     67    public ContentView(object content)
     68      : this() {
     69      this.content = content;
    6070    }
    6171
Note: See TracChangeset for help on using the changeset viewer.