-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindowViewModel.cs
52 lines (51 loc) · 1.53 KB
/
MainWindowViewModel.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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
namespace EasyService {
public class MainWindowViewModel : INotifyPropertyChanged {
public MainWindow mainWindow;
public readonly string addres = "http://127.0.0.1";
public readonly string cheker = "accdede43f326c52d88d62b98de5e940";
private string welcomeText;
public string WelcomeText {
get { return welcomeText; }
set {
welcomeText = value;
OnPropertyChanged("WelcomeText");
}
}
private string welcomeIconType;
public string WelcomeIconType {
get { return welcomeIconType; }
set {
welcomeIconType = value;
OnPropertyChanged("WelcomeIconType");
}
}
private string welcomeIconColor;
public string WelcomeIconColor {
get { return welcomeIconColor; }
set {
welcomeIconColor = value;
OnPropertyChanged("WelcomeIconColor");
}
}
public event PropertyChangedEventHandler PropertyChanged;
public void OnPropertyChanged([CallerMemberName] string prop = "") {
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(prop));
}
protected bool SetProperty<T>(ref T field, T newValue, [CallerMemberName] string propertyName = null) {
if (!Equals(field, newValue)) {
field = newValue;
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
return true;
}
return false;
}
}
}