Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using System.Drawing;
|
---|
6 |
|
---|
7 | namespace 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.