Winify – Diff between revs 66 and 83

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 66 Rev 83
Line 1... Line 1...
1 using System; 1 using System;
-   2 using System.Collections.Generic;
-   3 using System.ComponentModel;
-   4 using System.Runtime.CompilerServices;
2 using Newtonsoft.Json; 5 using Newtonsoft.Json;
3 using Servers; 6 using Servers;
-   7 using Winify.Properties;
Line 4... Line 8...
4   8  
5 namespace Winify.Gotify 9 namespace Winify.Gotify
6 { 10 {
7 /// <summary> 11 /// <summary>
8 /// {"id":22,"appid":1,"message":"iot","title":"Arcade 12 /// {"id":22,"appid":1,"message":"iot","title":"Arcade
9 /// Netplay","priority":0,"date":"2022-10-26T14:55:59.050734643+03:00"} 13 /// Netplay","priority":0,"date":"2022-10-26T14:55:59.050734643+03:00"}
10 /// </summary> 14 /// </summary>
11 public class GotifyMessage 15 public class GotifyMessage : INotifyPropertyChanged
-   16 {
-   17 private int _id;
12 { 18 private int _appId;
-   19 private string _message;
-   20 private string _title;
-   21 private int _priority;
-   22 private DateTime _date;
-   23 private GotifyMessageExtras _extras = new GotifyMessageExtras();
Line 13... Line 24...
13 #region Public Enums, Properties and Fields 24 private Server _server;
Line -... Line 25...
-   25  
-   26 #region Public Enums, Properties and Fields
-   27  
-   28 [JsonProperty(PropertyName = "id")]
-   29 public int Id
-   30 {
-   31 get => _id;
-   32 set
-   33 {
-   34 if (value == _id) return;
-   35 _id = value;
-   36 OnPropertyChanged();
14   37 }
-   38 }
-   39  
-   40 [JsonProperty(PropertyName = "appid")]
-   41 public int AppId
-   42 {
-   43 get => _appId;
-   44 set
-   45 {
-   46 if (value == _appId) return;
-   47 _appId = value;
Line 15... Line 48...
15 [JsonProperty(PropertyName = "id")] public int Id { get; set; } 48 OnPropertyChanged();
16   49 }
-   50 }
-   51  
-   52 [JsonProperty(PropertyName = "message")]
-   53 public string Message
-   54 {
-   55 get => _message;
-   56 set
-   57 {
-   58 if (value == _message) return;
17 [JsonProperty(PropertyName = "appid")] public int AppId { get; set; } 59 _message = value;
18   60 OnPropertyChanged();
-   61 }
-   62 }
-   63  
-   64 [JsonProperty(PropertyName = "title")]
-   65 public string Title
-   66 {
-   67 get => _title;
-   68 set
-   69 {
-   70 if (value == _title) return;
Line 19... Line 71...
19 [JsonProperty(PropertyName = "message")] 71 _title = value;
20 public string Message { get; set; } 72 OnPropertyChanged();
-   73 }
-   74 }
-   75  
-   76 [JsonProperty(PropertyName = "priority")]
-   77 public int Priority
-   78 {
-   79 get => _priority;
-   80 set
-   81 {
21   82 if (value == _priority) return;
22 [JsonProperty(PropertyName = "title")] public string Title { get; set; } 83 _priority = value;
-   84 OnPropertyChanged();
-   85 }
-   86 }
-   87  
-   88 [JsonProperty(PropertyName = "date")]
-   89 public DateTime Date
-   90 {
-   91 get => _date;
-   92 set
-   93 {
Line 23... Line 94...
23   94 if (value.Equals(_date)) return;
24 [JsonProperty(PropertyName = "priority")] 95 _date = value;
-   96 OnPropertyChanged();
-   97 }
-   98 }
-   99  
-   100 [JsonProperty(PropertyName = "extras")]
-   101 public GotifyMessageExtras Extras
-   102 {
-   103 get => _extras;
-   104 set
25 public int Priority { get; set; } 105 {
-   106 if (Equals(value, _extras)) return;
26   107 _extras = value;
-   108 OnPropertyChanged();
-   109 }
-   110 }
-   111  
-   112 [JsonIgnore]
-   113 public Server Server
-   114 {
-   115 get => _server;
-   116 set
-   117 {
Line 27... Line 118...
27 [JsonProperty(PropertyName = "date")] public DateTime Date { get; set; } 118 if (Equals(value, _server)) return;
-   119 _server = value;
-   120 OnPropertyChanged();
-   121 OnPropertyChanged();
-   122 }
-   123 }
-   124  
-   125 #endregion
-   126  
-   127 [UsedImplicitly]
-   128 public GotifyMessage()
-   129 {
-   130  
-   131 }
28   132  
29 [JsonProperty(PropertyName = "extras")] 133 public event PropertyChangedEventHandler PropertyChanged;
30 public GotifyMessageExtras Extras { get; set; } 134