-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathViewModel.cs
112 lines (99 loc) · 2.86 KB
/
ViewModel.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
namespace Hbo.Sheepish
{
using System.Collections.Generic;
using System.ComponentModel;
class ViewModel : INotifyPropertyChanged
{
private string _primaryQuery;
private string _secondaryQuery;
private int _primaryCount;
private int _secondaryCount;
private YouTrackService.SavedSearch _primaryScope;
private YouTrackService.SavedSearch _secondaryScope;
private IList<YouTrackService.SavedSearch> _scopes;
private bool _showingEditDialog = false;
public string PrimaryQuery
{
get { return _primaryQuery; }
set
{
_primaryQuery = value;
_NotifyPropertyChanged("PrimaryQuery");
}
}
public int PrimaryCount
{
get { return _primaryCount; }
set
{
_primaryCount = value;
_NotifyPropertyChanged("PrimaryCount");
}
}
public YouTrackService.SavedSearch PrimaryScope
{
get { return _primaryScope; }
set
{
_primaryScope = value;
_NotifyPropertyChanged("PrimaryScope");
}
}
public string SecondaryQuery
{
get { return _secondaryQuery; }
set
{
_secondaryQuery = value;
_NotifyPropertyChanged("SecondaryQuery");
}
}
public int SecondaryCount
{
get { return _secondaryCount; }
set
{
_secondaryCount = value;
_NotifyPropertyChanged("SecondaryCount");
}
}
public YouTrackService.SavedSearch SecondaryScope
{
get { return _secondaryScope; }
set
{
_secondaryScope = value;
_NotifyPropertyChanged("SecondaryScope");
}
}
public IList<YouTrackService.SavedSearch> Scopes
{
get { return _scopes; }
set
{
_scopes = value;
_NotifyPropertyChanged("Scopes");
}
}
public bool ShowingEditDialog
{
get { return _showingEditDialog; }
set
{
_showingEditDialog = value;
_NotifyPropertyChanged("ShowingEditDialog");
}
}
#region INotifyPropertyChanged implementation
private void _NotifyPropertyChanged(string propertyName)
{
var handler = PropertyChanged;
if (handler != null)
{
handler(this, new PropertyChangedEventArgs(propertyName));
}
}
public event PropertyChangedEventHandler PropertyChanged;
#endregion
}
}