-
Notifications
You must be signed in to change notification settings - Fork 1
/
Preferences.cs
60 lines (52 loc) · 1.46 KB
/
Preferences.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
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace JumpKing_GamepadVibration.Model
{
public class Preferences: INotifyPropertyChanged
{
private bool _isEnabled = false;
private bool _isLanded = false;
private bool _isKnocked = false;
private bool _giantBootsPower = false;
public bool IsEnabled
{
get => _isEnabled;
set
{
_isEnabled = value;
OnPropertyChanged(nameof(IsEnabled));
}
}
public bool IsLanded {
get => _isLanded;
set
{
_isLanded = value;
OnPropertyChanged(nameof(IsLanded));
}
}
public bool IsKnocked
{
get => _isKnocked;
set
{
_isKnocked = value;
OnPropertyChanged(nameof(IsKnocked));
}
}
public bool GiantBootsPower
{
get => _giantBootsPower;
set
{
_giantBootsPower = value;
OnPropertyChanged(nameof(GiantBootsPower));
}
}
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}