inraetemplate / INRAETemplate / ViewModel / Base / BaseViewModel.cs @ fa2aa88f
Historique | Voir | Annoter | Télécharger (812 octets)
1 | fa2aa88f | ajournaux | 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 INRAETemplate.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 | } |