Winify – Diff between revs 44 and 83
?pathlinks?
Rev 44 | Rev 83 | |||
---|---|---|---|---|
- | 1 | using System.Collections.Generic; |
||
1 | using Newtonsoft.Json; |
2 | using Newtonsoft.Json; |
|
- | 3 | using System.ComponentModel; |
||
- | 4 | using System.Runtime.CompilerServices; |
||
- | 5 | using Winify.Properties; |
||
2 | |
6 | |
|
3 | namespace Winify.Gotify |
7 | namespace Winify.Gotify |
|
4 | { |
8 | { |
|
5 | public class GotifyApplication |
9 | public class GotifyApplication : INotifyPropertyChanged |
|
6 | { |
10 | { |
|
- | 11 | private int _id; |
||
- | 12 | private string _token; |
||
- | 13 | private string _name; |
||
7 | #region Public Enums, Properties and Fields |
14 | private string _description; |
|
8 | |
- | ||
9 | [JsonProperty(PropertyName = "id")] public int Id { get; set; } |
15 | private bool _internal; |
|
- | 16 | private string _image; |
||
10 | |
17 | |
|
- | 18 | #region Public Enums, Properties and Fields |
||
- | 19 | |
||
- | 20 | [JsonProperty(PropertyName = "id")] |
||
- | 21 | public int Id |
||
- | 22 | { |
||
- | 23 | get => _id; |
||
- | 24 | set |
||
- | 25 | { |
||
- | 26 | if (value == _id) return; |
||
- | 27 | _id = value; |
||
- | 28 | OnPropertyChanged(); |
||
- | 29 | } |
||
- | 30 | } |
||
- | 31 | |
||
- | 32 | [JsonProperty(PropertyName = "token")] |
||
- | 33 | public string Token |
||
- | 34 | { |
||
- | 35 | get => _token; |
||
- | 36 | set |
||
- | 37 | { |
||
- | 38 | if (value == _token) return; |
||
- | 39 | _token = value; |
||
- | 40 | OnPropertyChanged(); |
||
- | 41 | } |
||
11 | [JsonProperty(PropertyName = "token")] public string Token { get; set; } |
42 | } |
|
- | 43 | |
||
- | 44 | [JsonProperty(PropertyName = "name")] |
||
- | 45 | public string Name |
||
- | 46 | { |
||
- | 47 | get => _name; |
||
- | 48 | set |
||
- | 49 | { |
||
- | 50 | if (value == _name) return; |
||
- | 51 | _name = value; |
||
- | 52 | OnPropertyChanged(); |
||
12 | |
53 | } |
|
13 | [JsonProperty(PropertyName = "name")] public string Name { get; set; } |
54 | } |
|
- | 55 | |
||
- | 56 | [JsonProperty(PropertyName = "description")] |
||
- | 57 | public string Description |
||
- | 58 | { |
||
- | 59 | get => _description; |
||
- | 60 | set |
||
- | 61 | { |
||
- | 62 | if (value == _description) return; |
||
- | 63 | _description = value; |
||
14 | |
64 | OnPropertyChanged(); |
|
15 | [JsonProperty(PropertyName = "description")] |
65 | } |
|
- | 66 | } |
||
- | 67 | |
||
- | 68 | [JsonProperty(PropertyName = "internal")] |
||
- | 69 | public bool Internal |
||
- | 70 | { |
||
- | 71 | get => _internal; |
||
- | 72 | set |
||
- | 73 | { |
||
- | 74 | if (value == _internal) return; |
||
16 | public string Description { get; set; } |
75 | _internal = value; |
|
17 | |
76 | OnPropertyChanged(); |
|
- | 77 | } |
||
- | 78 | } |
||
- | 79 | |
||
- | 80 | [JsonProperty(PropertyName = "image")] |
||
- | 81 | public string Image |
||
- | 82 | { |
||
- | 83 | get => _image; |
||
- | 84 | set |
||
- | 85 | { |
||
- | 86 | if (value == _image) return; |
||
18 | [JsonProperty(PropertyName = "internal")] |
87 | _image = value; |
|
- | 88 | OnPropertyChanged(); |
||
- | 89 | } |
||
- | 90 | } |
||
- | 91 | |
||
- | 92 | #endregion |
||
- | 93 | |
||
- | 94 | [UsedImplicitly] |
||
- | 95 | public GotifyApplication() |
||
- | 96 | { |
||
- | 97 | |
||
- | 98 | } |
||
- | 99 | |
||
- | 100 | public event PropertyChangedEventHandler PropertyChanged; |
||
19 | public bool Internal { get; set; } |
101 | |
|
20 | |
102 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) |
|
21 | [JsonProperty(PropertyName = "image")] public string Image { get; set; } |
103 | { |
|
22 | |
104 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); |
|
23 | #endregion |
105 | } |
|
24 | } |
106 | } |
|
25 | } |
107 | } |
|
26 | |
108 | |
|
27 |
|
109 |
|
|
28 | |
110 | |
|
29 | |
111 | |
|
30 | |
112 | |