DirectOutputR1
DirectOutput framework R1 for virtual pinball cabinets.
Go to:
Overview 
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros Pages
NamedItemBase.cs
Go to the documentation of this file.
1 using System;
2 
3 namespace DirectOutput.General.Generic
4 {
9  public abstract class NamedItemBase : INamedItem
10  {
11  #region Name
12  private string _Name;
21  public string Name
22  {
23  get { return _Name; }
24  set
25  {
26  if (_Name != value)
27  {
28  string OldName = _Name;
29  if (BeforeNameChange != null)
30  {
31  BeforeNameChange(this, new NameChangeEventArgs(OldName, value));
32  }
33 
34  _Name = value;
35 
36  if (AfterNameChanged != null)
37  {
38  AfterNameChanged(this, new NameChangeEventArgs(OldName, value));
39  }
40  }
41  }
42  }
46  public event EventHandler<NameChangeEventArgs> AfterNameChanged;
47 
51  public event EventHandler<NameChangeEventArgs> BeforeNameChange;
52  #endregion
53 
54 
55 
56  }
57 }