Winify

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 82  →  ?path2? @ 83
/trunk/Winify/Gotify/GotifyApplication.cs
@@ -1,25 +1,107 @@
using Newtonsoft.Json;
using System.Collections.Generic;
using Newtonsoft.Json;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using Winify.Properties;
 
namespace Winify.Gotify
{
public class GotifyApplication
public class GotifyApplication : INotifyPropertyChanged
{
private int _id;
private string _token;
private string _name;
private string _description;
private bool _internal;
private string _image;
 
#region Public Enums, Properties and Fields
 
[JsonProperty(PropertyName = "id")] public int Id { get; set; }
[JsonProperty(PropertyName = "id")]
public int Id
{
get => _id;
set
{
if (value == _id) return;
_id = value;
OnPropertyChanged();
}
}
 
[JsonProperty(PropertyName = "token")] public string Token { get; set; }
[JsonProperty(PropertyName = "token")]
public string Token
{
get => _token;
set
{
if (value == _token) return;
_token = value;
OnPropertyChanged();
}
}
 
[JsonProperty(PropertyName = "name")] public string Name { get; set; }
[JsonProperty(PropertyName = "name")]
public string Name
{
get => _name;
set
{
if (value == _name) return;
_name = value;
OnPropertyChanged();
}
}
 
[JsonProperty(PropertyName = "description")]
public string Description { get; set; }
public string Description
{
get => _description;
set
{
if (value == _description) return;
_description = value;
OnPropertyChanged();
}
}
 
[JsonProperty(PropertyName = "internal")]
public bool Internal { get; set; }
public bool Internal
{
get => _internal;
set
{
if (value == _internal) return;
_internal = value;
OnPropertyChanged();
}
}
 
[JsonProperty(PropertyName = "image")] public string Image { get; set; }
[JsonProperty(PropertyName = "image")]
public string Image
{
get => _image;
set
{
if (value == _image) return;
_image = value;
OnPropertyChanged();
}
}
 
#endregion
 
[UsedImplicitly]
public GotifyApplication()
{
 
}
 
public event PropertyChangedEventHandler PropertyChanged;
 
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}