Toasts – Blame information for rev 41
?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; |
||
21 | private float _contentHeight; |
||
22 | |||
23 | public string Title |
||
24 | { |
||
25 | get => _title; |
||
26 | set |
||
27 | { |
||
28 | if (value == _title) return; |
||
29 | _title = value; |
||
30 | OnPropertyChanged(); |
||
31 | } |
||
32 | } |
||
33 | |||
34 | public string Body |
||
35 | { |
||
36 | get => _body; |
||
37 | set |
||
38 | { |
||
39 | if (value == _body) return; |
||
40 | _body = value; |
||
41 | OnPropertyChanged(); |
||
42 | } |
||
43 | } |
||
44 | |||
45 | public float ContentHeight |
||
46 | { |
||
47 | get => _contentHeight; |
||
48 | set |
||
49 | { |
||
50 | if (value == _contentHeight) return; |
||
51 | _contentHeight = value; |
||
52 | OnPropertyChanged(); |
||
53 | } |
||
54 | } |
||
55 | |||
56 | public bool EnableChime |
||
57 | { |
||
58 | get => _enableChime; |
||
59 | set |
||
60 | { |
||
61 | if (value == _enableChime) return; |
||
62 | _enableChime = value; |
||
63 | OnPropertyChanged(); |
||
64 | } |
||
65 | } |
||
66 | |||
67 | public byte[] Chime |
||
68 | { |
||
69 | get => _chime; |
||
70 | set |
||
71 | { |
||
72 | if (Equals(value, _chime)) return; |
||
73 | _chime = value; |
||
74 | OnPropertyChanged(); |
||
75 | } |
||
76 | } |
||
77 | |||
78 | public int LingerTime |
||
79 | { |
||
80 | get => _lingerTime; |
||
81 | set |
||
82 | { |
||
83 | if (value == _lingerTime) return; |
||
84 | _lingerTime = value; |
||
85 | OnPropertyChanged(); |
||
86 | } |
||
87 | } |
||
88 | |||
89 | public Image Image |
||
90 | { |
||
91 | get => _image; |
||
92 | set |
||
93 | { |
||
94 | if (Equals(value, _image)) return; |
||
95 | _image = value; |
||
96 | OnPropertyChanged(); |
||
97 | } |
||
98 | } |
||
99 | |||
100 | public string Content |
||
101 | { |
||
102 | get => _content; |
||
103 | set |
||
104 | { |
||
105 | if (value == _content) return; |
||
106 | _content = value; |
||
107 | OnPropertyChanged(); |
||
108 | } |
||
109 | } |
||
110 | |||
111 | public ToastDisplayData() |
||
112 | { |
||
113 | |||
114 | } |
||
115 | |||
116 | public event PropertyChangedEventHandler PropertyChanged; |
||
117 | |||
118 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) |
||
119 | { |
||
120 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); |
||
121 | } |
||
122 | } |
||
123 | } |