This repository has been archived by the owner on Aug 16, 2020. It is now read-only.
forked from golfandsurf/Campah
-
Notifications
You must be signed in to change notification settings - Fork 1
/
UpdateData.cs
103 lines (89 loc) · 2.21 KB
/
UpdateData.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
using System;
using System.ComponentModel;
namespace CampahApp
{
public class UpdateData : INotifyPropertyChanged
{
public UpdateData()
{
_name = "";
_comment = "";
File = "";
RelPath = UpdateConstants.UpdateFolder;
_status = "Beginning Update";
_completed = false;
Url = UpdateConstants.UpdateUrl;
}
public string File { get; set; }
public string RelPath { get; set; }
public string Url { get; set; }
public string Hash { get; set; }
public string Version { get; set; }
public static UpdateData Instance { get; private set; }
static UpdateData()
{
Instance = new UpdateData();
}
private string _name;
public String Name
{
get
{
return _name;
}
set
{
_name = value;
NotifyPropertyChanged("Name");
}
}
private bool _completed;
public bool Completed
{
get
{
return _completed;
}
set
{
_completed = value;
NotifyPropertyChanged("Completed");
}
}
private string _status;
public String Status
{
get
{
return _status;
}
set
{
_status = value;
NotifyPropertyChanged("Status");
}
}
private string _comment;
public String Comment
{
get
{
return _comment;
}
set
{
_comment = value;
NotifyPropertyChanged("Comment");
}
}
public event PropertyChangedEventHandler PropertyChanged;
public void NotifyPropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this,
new PropertyChangedEventArgs(propertyName));
}
}
}
}