forked from ugniusramanauskas/iMacrosTest-CSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProjectTable.cs
120 lines (110 loc) · 3.33 KB
/
ProjectTable.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
namespace iMacrosPostingDashboard
{
public class ProjectTableRow : INotifyPropertyChanged
{
private int _id;
private string _projectName;
private string _topicsTable;
private string _answerTemplate;
private int _progressbar;
private string _projStatus;
private string _progressReport;
private string _language;
private int _pausebeforeconfirm;
private int _pausebeforenextpost;
private bool _postQnA;
public event PropertyChangedEventHandler PropertyChanged;
public ProjectTableRow(int id, string projectname, string topicstable, string answertemplate, string language, int pausebeforeconfirm, int pausebeforenextpost, bool postQnA)
{
_id = id;
_projectName = projectname;
_topicsTable = topicstable;
_answerTemplate = answertemplate;
_progressbar = 0;
_projStatus = "Not running"; // + Environment.NewLine;
_progressReport = "None";
_language = language;
_pausebeforeconfirm = pausebeforeconfirm;
_pausebeforenextpost = pausebeforenextpost;
_postQnA = postQnA;
}
public int Id
{
get { return _id; }
set { _id = value; }
}
public string ProjectName
{
get { return _projectName; }
set { _projectName = value; }
}
public string TopicsTable
{
get { return _topicsTable; }
set { _topicsTable = value; }
}
public string AnswerTemplate
{
get { return _answerTemplate; }
set { _answerTemplate = value; }
}
public string Language
{
get { return _language; }
set { _language = value; }
}
public int Pausebeforeconfirm
{
get { return _pausebeforeconfirm; }
set { _pausebeforeconfirm = value; }
}
public int Pausebeforenextpost
{
get { return _pausebeforenextpost; }
set { _pausebeforenextpost = value; }
}
public bool PostQnA
{
get { return _postQnA; }
set { _postQnA = value; }
}
// Notify when the following properties change
public int ProgressBar
{
get { return _progressbar; }
set
{
_progressbar = value;
this.NotifyPropertyChanged("ProgressBar");
}
}
public string ProjStatus
{
get { return _projStatus; }
set
{
_projStatus = value;
this.NotifyPropertyChanged("ProjStatus");
}
}
public string ProgressReport
{
get { return _progressReport; }
set
{
_progressReport = value;
this.NotifyPropertyChanged("ProgressReport");
}
}
private void NotifyPropertyChanged(string name)
{
if(PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(name));
}
}
}