Toasts – Blame information for rev 43
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
41 | office | 1 | using System; |
2 | using System.Collections.Generic; |
||
3 | using System.ComponentModel; |
||
4 | using System.Drawing; |
||
5 | using System.Linq; |
||
6 | using System.Runtime.CompilerServices; |
||
7 | using System.Text; |
||
8 | using System.Threading.Tasks; |
||
9 | |||
10 | namespace Toasts |
||
11 | { |
||
12 | public class ToastDisplayData : INotifyPropertyChanged |
||
13 | { |
||
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; |
||
43 | office | 21 | private float _contentHeight; |
22 | private Point _pinPoint; |
||
23 | private bool _enablePin; |
||
24 | |||
41 | office | 25 | public string Title |
26 | { |
||
27 | get => _title; |
||
28 | set |
||
29 | { |
||
30 | if (value == _title) return; |
||
31 | _title = value; |
||
32 | OnPropertyChanged(); |
||
33 | } |
||
34 | } |
||
35 | |||
36 | public string Body |
||
37 | { |
||
38 | get => _body; |
||
39 | set |
||
40 | { |
||
41 | if (value == _body) return; |
||
42 | _body = value; |
||
43 | OnPropertyChanged(); |
||
44 | } |
||
45 | } |
||
46 | |||
47 | public float ContentHeight |
||
48 | { |
||
49 | get => _contentHeight; |
||
50 | set |
||
51 | { |
||
52 | if (value == _contentHeight) return; |
||
53 | _contentHeight = value; |
||
54 | OnPropertyChanged(); |
||
55 | } |
||
56 | } |
||
57 | |||
58 | public bool EnableChime |
||
59 | { |
||
60 | get => _enableChime; |
||
61 | set |
||
62 | { |
||
63 | if (value == _enableChime) return; |
||
64 | _enableChime = value; |
||
65 | OnPropertyChanged(); |
||
66 | } |
||
67 | } |
||
68 | |||
69 | public byte[] Chime |
||
70 | { |
||
71 | get => _chime; |
||
72 | set |
||
73 | { |
||
74 | if (Equals(value, _chime)) return; |
||
75 | _chime = value; |
||
76 | OnPropertyChanged(); |
||
77 | } |
||
78 | } |
||
79 | |||
80 | public int LingerTime |
||
81 | { |
||
82 | get => _lingerTime; |
||
83 | set |
||
84 | { |
||
85 | if (value == _lingerTime) return; |
||
86 | _lingerTime = value; |
||
87 | OnPropertyChanged(); |
||
88 | } |
||
89 | } |
||
90 | |||
91 | public Image Image |
||
92 | { |
||
93 | get => _image; |
||
94 | set |
||
95 | { |
||
96 | if (Equals(value, _image)) return; |
||
97 | _image = value; |
||
98 | OnPropertyChanged(); |
||
99 | } |
||
100 | } |
||
101 | |||
102 | public string Content |
||
103 | { |
||
104 | get => _content; |
||
105 | set |
||
106 | { |
||
107 | if (value == _content) return; |
||
108 | _content = value; |
||
109 | OnPropertyChanged(); |
||
110 | } |
||
43 | office | 111 | } |
112 | |||
113 | public Point PinPoint |
||
114 | { |
||
115 | get => _pinPoint; |
||
116 | set |
||
117 | { |
||
118 | if (value == _pinPoint) return; |
||
119 | |||
120 | _pinPoint = value; |
||
121 | OnPropertyChanged(); |
||
122 | } |
||
41 | office | 123 | } |
43 | office | 124 | |
125 | public bool EnablePin |
||
126 | { |
||
127 | get => _enablePin; |
||
128 | set |
||
129 | { |
||
130 | if (value == _enablePin) return; |
||
131 | |||
132 | _enablePin = value; |
||
133 | OnPropertyChanged(); |
||
134 | } |
||
135 | } |
||
136 | |||
41 | office | 137 | public ToastDisplayData() |
138 | { |
||
139 | |||
140 | } |
||
141 | |||
142 | public event PropertyChangedEventHandler PropertyChanged; |
||
143 | |||
144 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) |
||
145 | { |
||
146 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); |
||
147 | } |
||
148 | } |
||
149 | } |