SECI  1
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events
UserEntry.cs
Go to the documentation of this file.
1 using System;
2 using System.ComponentModel;
3 
4 namespace SeciUserInterface.Dialogs.Alerts
5 {
6  class UserEntry : INotifyPropertyChanged
7  {
8  string _name = "";
9  string _number = "";
10  public Boolean Expires { get; set; }
11  public DateTime Expiration { get; set; }
12 
13  public event PropertyChangedEventHandler PropertyChanged;
14 
15  public String Name
16  {
17  get
18  {
19  return _name;
20  }
21  set
22  {
23  _name = value;
24  OnPropertyChanged("Name");
25  }
26  }
27 
28  public String Number
29  {
30  get
31  {
32  return _number;
33  }
34  set
35  {
36  _number = value;
37  OnPropertyChanged("Number");
38  }
39  }
40 
41 
42 
43  public UserEntry(String name, String number)
44  {
45  _name = name;
46  _number = number;
47  Expires = false;
48  Expiration = new DateTime();
49  }
50 
51  protected void OnPropertyChanged(string name)
52  {
53  PropertyChangedEventHandler handler = PropertyChanged;
54  if (handler != null)
55  {
56  handler(this, new PropertyChangedEventArgs(name));
57  }
58  }
59  }
60 }
PropertyChangedEventHandler PropertyChanged
Definition: UserEntry.cs:13
UserEntry(String name, String number)
Definition: UserEntry.cs:43