equal
deleted
inserted
replaced
|
1 using System; |
|
2 using System.Net; |
|
3 using System.Windows; |
|
4 using System.Windows.Controls; |
|
5 using System.Windows.Documents; |
|
6 using System.Windows.Ink; |
|
7 using System.Windows.Input; |
|
8 using System.Windows.Media; |
|
9 using System.Windows.Media.Animation; |
|
10 using System.Windows.Shapes; |
|
11 using Iri.Modernisation.BaseMVVM.ViewModel; |
|
12 using Iri.Modernisation.BaseMVVM.Commands; |
|
13 namespace Iri.Modernisation.Controls.ViewModel |
|
14 { |
|
15 public class HeaderControlVM : BaseMVVM.ViewModel.ViewModel |
|
16 { |
|
17 private String _connectedName = String.Empty; |
|
18 public String ConnectedName |
|
19 { |
|
20 get |
|
21 { |
|
22 if (_connectedName != String.Empty) |
|
23 { |
|
24 return _connectedName; |
|
25 } |
|
26 else |
|
27 { |
|
28 return "Non Connecté"; |
|
29 } |
|
30 } |
|
31 set |
|
32 { |
|
33 _connectedName = value; |
|
34 OnPropertyChanged("ConnectedName"); |
|
35 } |
|
36 } |
|
37 public HeaderControlVM() |
|
38 { |
|
39 InitializeCommands(); |
|
40 } |
|
41 public HeaderControlVM(String name) |
|
42 { |
|
43 _connectedName = name; |
|
44 InitializeCommands(); |
|
45 } |
|
46 private void InitializeCommands() |
|
47 { |
|
48 Commands.HeaderControl.ButtonClick.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(ButtonClick_Executed); |
|
49 } |
|
50 |
|
51 void ButtonClick_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e) |
|
52 { |
|
53 MessageBox.Show(e.Parameter.ToString()); |
|
54 } |
|
55 } |
|
56 } |