HamBook – Blame information for rev 12

Subversion Repositories:
Rev:
Rev Author Line No. Line
12 office 1 using Configuration.Annotations;
2 using System;
3 using System.Collections.Generic;
4 using System.ComponentModel;
5 using System.Data;
6 using System.Linq;
7 using System.Runtime.CompilerServices;
8 using System.Runtime.InteropServices;
9 using System.Text;
10 using System.Threading.Tasks;
11 using System.Xml.Linq;
12  
13 namespace Configuration
14 {
15 public class NotificationState : INotifyPropertyChanged
16 {
17 private int _lingerTime = 5000;
18 private bool _enabled = false;
19 private NotificationType _type = NotificationType.None;
20  
21 public int LingerTime
22 {
23 get => _lingerTime;
24 set
25 {
26 if (value == _lingerTime)
27 {
28 return;
29 }
30  
31 _lingerTime = value;
32 OnPropertyChanged();
33 }
34 }
35  
36 public bool Enabled
37 {
38 get => _enabled;
39 set
40 {
41 if (value == _enabled)
42 {
43 return;
44 }
45  
46 _enabled = value;
47 OnPropertyChanged();
48 }
49 }
50  
51 public NotificationType Type
52 {
53 get => _type;
54 set
55 {
56 if (value == _type)
57 {
58 return;
59 }
60  
61 _type = value;
62 OnPropertyChanged();
63 }
64 }
65  
66 public NotificationState()
67 {
68  
69 }
70  
71 public event PropertyChangedEventHandler PropertyChanged;
72  
73 [NotifyPropertyChangedInvocator]
74 protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
75 {
76 PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
77 }
78 }
79  
80  
81 }