-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfiguration.cs
More file actions
63 lines (57 loc) · 1.66 KB
/
Configuration.cs
File metadata and controls
63 lines (57 loc) · 1.66 KB
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
using System.ComponentModel; // Notwendig für INotifyPropertyChanged
using System.Xml.Serialization;
namespace MoSpeedUI
{
public class Configuration : INotifyPropertyChanged
{
// Das PropertyChanged Event für die Bindungen
public event PropertyChangedEventHandler PropertyChanged;
private string _moSpeedPath;
private string _javaPath;
private bool _logoDecoration = true;
[XmlElement("mospeed")]
public string MoSpeedPath
{
get => _moSpeedPath;
set
{
if (_moSpeedPath != value)
{
_moSpeedPath = value;
OnPropertyChanged(nameof(MoSpeedPath));
}
}
}
[XmlElement("javapath")]
public string JavaPath
{
get => _javaPath;
set
{
if (_javaPath != value)
{
_javaPath = value;
OnPropertyChanged(nameof(JavaPath));
}
}
}
[XmlElement("logodec")]
public bool LogoDecoration
{
get => _logoDecoration;
set
{
if (_logoDecoration != value)
{
_logoDecoration = value;
OnPropertyChanged(nameof(LogoDecoration));
}
}
}
// Methode zum Auslösen des PropertyChanged-Events
protected void OnPropertyChanged(string propertyName)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}