sicpaconnexions / SICPA_Connexions / ViewModel / Base / BaseViewModel.cs @ 87e7d061
Historique | Voir | Annoter | Télécharger (815 octets)
1 |
using System; |
---|---|
2 |
using System.Collections.Generic; |
3 |
using System.ComponentModel; |
4 |
using System.Linq; |
5 |
using System.Text; |
6 |
using System.Threading.Tasks; |
7 |
|
8 |
namespace SICPA_Connexions.ViewModel.Base |
9 |
{ |
10 |
public class BaseViewModel : INotifyPropertyChanged |
11 |
{ |
12 |
private bool isBusy; |
13 |
|
14 |
public bool IsBusy |
15 |
{ |
16 |
get |
17 |
{ |
18 |
return isBusy; |
19 |
} |
20 |
set |
21 |
{ |
22 |
isBusy = value; |
23 |
OnPropertyChanged(nameof(IsBusy)); |
24 |
} |
25 |
} |
26 |
|
27 |
public event PropertyChangedEventHandler PropertyChanged; |
28 |
|
29 |
protected void OnPropertyChanged(string propertyName) |
30 |
{ |
31 |
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); |
32 |
} |
33 |
|
34 |
} |
35 |
} |