Toasts – Blame information for rev 32
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
27 | office | 1 | using System; |
2 | using System.Collections.Generic; |
||
32 | office | 3 | using System.ComponentModel; |
27 | office | 4 | using System.Drawing; |
5 | using System.Linq; |
||
32 | office | 6 | using System.Runtime.CompilerServices; |
27 | office | 7 | using System.Text; |
8 | using System.Threading.Tasks; |
||
9 | |||
10 | namespace Toasts |
||
11 | { |
||
32 | office | 12 | public class ToastDisplayData : INotifyPropertyChanged |
27 | office | 13 | { |
32 | office | 14 | private string _title; |
15 | private string _body; |
||
16 | private bool _enableChime; |
||
17 | private byte[] _chime; |
||
18 | private int _lingerTime; |
||
19 | private Image _image; |
||
20 | private string _content; |
||
21 | |||
22 | public string Title |
||
23 | { |
||
24 | get => _title; |
||
25 | set |
||
26 | { |
||
27 | if (value == _title) return; |
||
28 | _title = value; |
||
29 | OnPropertyChanged(); |
||
30 | } |
||
31 | } |
||
32 | |||
33 | public string Body |
||
34 | { |
||
35 | get => _body; |
||
36 | set |
||
37 | { |
||
38 | if (value == _body) return; |
||
39 | _body = value; |
||
40 | OnPropertyChanged(); |
||
41 | } |
||
42 | } |
||
43 | |||
44 | public bool EnableChime |
||
45 | { |
||
46 | get => _enableChime; |
||
47 | set |
||
48 | { |
||
49 | if (value == _enableChime) return; |
||
50 | _enableChime = value; |
||
51 | OnPropertyChanged(); |
||
52 | } |
||
53 | } |
||
54 | |||
55 | public byte[] Chime |
||
56 | { |
||
57 | get => _chime; |
||
58 | set |
||
59 | { |
||
60 | if (Equals(value, _chime)) return; |
||
61 | _chime = value; |
||
62 | OnPropertyChanged(); |
||
63 | } |
||
64 | } |
||
65 | |||
66 | public int LingerTime |
||
67 | { |
||
68 | get => _lingerTime; |
||
69 | set |
||
70 | { |
||
71 | if (value == _lingerTime) return; |
||
72 | _lingerTime = value; |
||
73 | OnPropertyChanged(); |
||
74 | } |
||
75 | } |
||
76 | |||
77 | public Image Image |
||
78 | { |
||
79 | get => _image; |
||
80 | set |
||
81 | { |
||
82 | if (Equals(value, _image)) return; |
||
83 | _image = value; |
||
84 | OnPropertyChanged(); |
||
85 | } |
||
86 | } |
||
87 | |||
88 | public string Content |
||
89 | { |
||
90 | get => _content; |
||
91 | set |
||
92 | { |
||
93 | if (value == _content) return; |
||
94 | _content = value; |
||
95 | OnPropertyChanged(); |
||
96 | } |
||
97 | } |
||
98 | |||
99 | public ToastDisplayData() |
||
100 | { |
||
101 | |||
102 | } |
||
103 | |||
104 | public event PropertyChangedEventHandler PropertyChanged; |
||
105 | |||
106 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) |
||
107 | { |
||
108 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); |
||
109 | } |
||
27 | office | 110 | } |
111 | } |