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; |
||
6 | { |
13 | private string _name; |
|
7 | #region Public Enums, Properties and Fields |
- | ||
8 | |
14 | private string _description; |
|
- | 15 | private bool _internal; |
||
Line 9... | Line 16... | |||
9 | [JsonProperty(PropertyName = "id")] public int Id { get; set; } |
16 | private string _image; |
|
Line -... | Line 17... | |||
- | 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(); |
||
10 | |
41 | } |
|
- | 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; |
||
Line 11... | Line 52... | |||
11 | [JsonProperty(PropertyName = "token")] public string Token { get; set; } |
52 | OnPropertyChanged(); |
|
12 | |
53 | } |
|
- | 54 | } |
||
- | 55 | |
||
- | 56 | [JsonProperty(PropertyName = "description")] |
||
- | 57 | public string Description |
||
- | 58 | { |
||
- | 59 | get => _description; |
||
- | 60 | set |
||
- | 61 | { |
||
- | 62 | if (value == _description) return; |
||
Line 13... | Line 63... | |||
13 | [JsonProperty(PropertyName = "name")] public string Name { get; set; } |
63 | _description = value; |
|
14 | |
64 | OnPropertyChanged(); |
|
- | 65 | } |
||
- | 66 | } |
||
- | 67 | |
||
- | 68 | [JsonProperty(PropertyName = "internal")] |
||
- | 69 | public bool Internal |
||
- | 70 | { |
||
- | 71 | get => _internal; |
||
- | 72 | set |
||
- | 73 | { |
||
15 | [JsonProperty(PropertyName = "description")] |
74 | if (value == _internal) return; |
|
16 | public string Description { get; set; } |
75 | _internal = value; |
|
- | 76 | OnPropertyChanged(); |
||
- | 77 | } |
||
- | 78 | } |
||
- | 79 | |
||
- | 80 | [JsonProperty(PropertyName = "image")] |
||
- | 81 | public string Image |
||
- | 82 | { |
||
- | 83 | get => _image; |
||
- | 84 | set |
||
- | 85 | { |
||
Line 17... | Line 86... | |||
17 | |
86 | if (value == _image) return; |
|
- | 87 | _image = value; |
||
- | 88 | OnPropertyChanged(); |
||
- | 89 | } |
||
- | 90 | } |
||
- | 91 | |
||
- | 92 | #endregion |
||
- | 93 | |
||
- | 94 | [UsedImplicitly] |
||
- | 95 | public GotifyApplication() |
||
- | 96 | { |
||
- | 97 | |
||
- | 98 | } |
||
- | 99 | |
||
18 | [JsonProperty(PropertyName = "internal")] |
100 | public event PropertyChangedEventHandler PropertyChanged; |
|
19 | public bool Internal { get; set; } |
101 | |
|
20 | |
102 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) |