Winify – Diff between revs 44 and 83
?pathlinks?
Rev 44 | Rev 83 | |||
---|---|---|---|---|
Line -... | Line 1... | |||
- | 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; |
||
Line 2... | Line 6... | |||
2 | |
6 | |
|
3 | namespace Winify.Gotify |
7 | namespace Winify.Gotify |
|
4 | { |
8 | { |
|
5 | public class GotifyApplication |
9 | public class GotifyApplication : INotifyPropertyChanged |
|
- | 10 | { |
||
- | 11 | private int _id; |
||
- | 12 | private string _token; |
||
- | 13 | private string _name; |
||
- | 14 | private string _description; |
||
- | 15 | private bool _internal; |
||
- | 16 | private string _image; |
||
6 | { |
17 | |
|
Line 7... | Line 18... | |||
7 | #region Public Enums, Properties and Fields |
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(); |
||
Line 8... | Line 29... | |||
8 | |
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; |
||
Line 9... | Line 40... | |||
9 | [JsonProperty(PropertyName = "id")] public int Id { get; set; } |
40 | OnPropertyChanged(); |
|
- | 41 | } |
||
- | 42 | } |
||
- | 43 | |
||
- | 44 | [JsonProperty(PropertyName = "name")] |
||
- | 45 | public string Name |
||
- | 46 | { |
||
- | 47 | get => _name; |
||
- | 48 | set |
||
- | 49 | { |
||
- | 50 | if (value == _name) return; |
||
Line 10... | Line 51... | |||
10 | |
51 | _name = value; |
|
11 | [JsonProperty(PropertyName = "token")] public string Token { get; set; } |
52 | OnPropertyChanged(); |
|
- | 53 | } |
||
- | 54 | } |
||
- | 55 | |
||
- | 56 | [JsonProperty(PropertyName = "description")] |
||
- | 57 | public string Description |
||
- | 58 | { |
||
- | 59 | get => _description; |
||
- | 60 | set |
||
- | 61 | { |
||
Line 12... | Line 62... | |||
12 | |
62 | if (value == _description) return; |
|
13 | [JsonProperty(PropertyName = "name")] public string Name { get; set; } |
63 | _description = value; |
|
- | 64 | OnPropertyChanged(); |
||
- | 65 | } |
||
- | 66 | } |
||
- | 67 | |
||
- | 68 | [JsonProperty(PropertyName = "internal")] |
||
- | 69 | public bool Internal |
||
- | 70 | { |
||
- | 71 | get => _internal; |
||
- | 72 | set |
||
Line 14... | Line 73... | |||
14 | |
73 | { |
|
- | 74 | if (value == _internal) return; |
||
- | 75 | _internal = value; |
||
- | 76 | OnPropertyChanged(); |
||
- | 77 | } |
||
- | 78 | } |
||
- | 79 | |
||
- | 80 | [JsonProperty(PropertyName = "image")] |
||
- | 81 | public string Image |
||
- | 82 | { |
||
- | 83 | get => _image; |
||
Line 15... | Line 84... | |||
15 | [JsonProperty(PropertyName = "description")] |
84 | set |
|
- | 85 | { |
||
- | 86 | if (value == _image) return; |
||
- | 87 | _image = value; |
||
- | 88 | OnPropertyChanged(); |
||
- | 89 | } |
||
- | 90 | } |
||
- | 91 | |
||
- | 92 | #endregion |
||
- | 93 | |
||
- | 94 | [UsedImplicitly] |
||
- | 95 | public GotifyApplication() |
||
- | 96 | { |
||
- | 97 | |
||
16 | public string Description { get; set; } |
98 | } |
|
17 | |
99 | |
|
18 | [JsonProperty(PropertyName = "internal")] |
100 | public event PropertyChangedEventHandler PropertyChanged; |