|
0
|
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.Commands; |
|
|
12 |
using Iri.Modernisation.BaseMVVM.ViewModel; |
|
|
13 |
using Iri.Modernisation.Data.Models; |
|
|
14 |
namespace Iri.Modernisation.Controls.ViewModel |
|
|
15 |
{ |
|
|
16 |
/// <summary> |
|
|
17 |
/// ViewModel du module de ClickMenu |
|
|
18 |
/// </summary> |
|
|
19 |
public class ClickMenuVM : BaseMVVM.ViewModel.ViewModel |
|
|
20 |
{ |
|
25
|
21 |
|
|
|
22 |
private PolemicElement _selectedElement; |
|
0
|
23 |
/// <summary> |
|
25
|
24 |
/// PolémicElement sélectionné |
|
0
|
25 |
/// </summary> |
|
|
26 |
public PolemicElement SelectedElement |
|
|
27 |
{ |
|
|
28 |
get |
|
|
29 |
{ |
|
|
30 |
return _selectedElement; |
|
|
31 |
} |
|
|
32 |
set |
|
|
33 |
{ |
|
|
34 |
_selectedElement = value; |
|
|
35 |
OnPropertyChanged("SelectedElement"); |
|
|
36 |
} |
|
|
37 |
} |
|
25
|
38 |
|
|
0
|
39 |
public ClickMenuVM() |
|
|
40 |
{ |
|
|
41 |
InitializeCommands(); |
|
|
42 |
} |
|
|
43 |
private void InitializeCommands() |
|
7
|
44 |
{ |
|
|
45 |
Commands.ClickMenu.AddToRefChutier.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(AddToRefChutier_Executed); |
|
|
46 |
} |
|
|
47 |
|
|
25
|
48 |
private void AddToRefChutier_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e) |
|
7
|
49 |
{ |
|
|
50 |
Commands.ReferencesChutier.RefChutierAdd.Execute(SelectedElement); |
|
|
51 |
} |
|
0
|
52 |
} |
|
|
53 |
} |