Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OKB/HeuristicLab.MainForm.WPF/WPFUserInterfaceItem.cs @ 8119

Last change on this file since 8119 was 4311, checked in by swagner, 14 years ago

Integrated OKB clients for HL 3.3 (#1166)

File size: 721 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Drawing;
6
7namespace HeuristicLab.MainForm.WPF {
8  public abstract class WPFUserInterfaceItem : ActionUserInterfaceItem {
9
10    private bool isEnabled = true;
11    public bool IsEnabled {
12      get {
13        return isEnabled;
14      }
15      set {
16        if (value == isEnabled)
17          return;
18        isEnabled = value;
19        OnIsEnabledChanged();
20      }
21    }
22
23    public event EventHandler IsEnabledChanged;
24
25    protected void OnIsEnabledChanged() {
26      EventHandler handler = IsEnabledChanged;
27      if (handler != null)
28        handler(this, EventArgs.Empty);
29    }
30   
31  }
32}
Note: See TracBrowser for help on using the repository browser.