-
Notifications
You must be signed in to change notification settings - Fork 1
/
Progress.cs
44 lines (39 loc) · 1.11 KB
/
Progress.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
namespace Thingie.WPF
{
public sealed class Progress : ChangeNotifierBase
{
private string _title;
public string Title
{
get { return _title; }
set { _title = value; OnPropertyChanged("Title"); }
}
private string _subTitle;
public string SubTitle
{
get { return _subTitle; }
set { _subTitle = value; OnPropertyChanged("SubTitle"); }
}
private int _currentProgress;
public int CurrentProgress
{
get { return _currentProgress; }
set { _currentProgress = value; OnPropertyChanged("CurrentProgress"); }
}
private int _maxProgress;
public int MaxProgress
{
get { return _maxProgress; }
set { _maxProgress = value; OnPropertyChanged("MaxProgress"); OnPropertyChanged("IsIndeterminate"); }
}
public bool IsIndeterminate
{
get { return MaxProgress > 0; }
}
public Progress()
{
Title = "Working...";
MaxProgress = 0;
}
}
}