|
2
|
1 |
using System; |
|
|
2 |
using System.IO; |
|
|
3 |
using System.Net; |
|
|
4 |
using System.Windows; |
|
|
5 |
using System.Windows.Controls; |
|
|
6 |
using System.Windows.Data; |
|
|
7 |
using System.Windows.Media; |
|
|
8 |
using System.Windows.Media.Animation; |
|
|
9 |
using System.Windows.Navigation; |
|
|
10 |
|
|
|
11 |
namespace FingersDance.Control.Menu |
|
|
12 |
{ |
|
|
13 |
public partial class UserControlMenu |
|
|
14 |
{ |
|
|
15 |
public UserControlMenu() |
|
|
16 |
{ |
|
|
17 |
this.InitializeComponent(); |
|
|
18 |
initChildSize(); |
|
|
19 |
|
|
|
20 |
// Insert code required on object creation below this point. |
|
|
21 |
} |
|
|
22 |
|
|
|
23 |
//Premet de deplacer les sous menus vers la droite pour avoir un effect tree view |
|
|
24 |
private void initChildSize() |
|
|
25 |
{ |
|
3
|
26 |
//Niveau 1 |
|
|
27 |
PanelAnnotation.Width -= 0.10*this.Width; |
|
|
28 |
PanelRecherche.Width -= 0.10 * this.Width; |
|
|
29 |
//Niveau 2 |
|
|
30 |
PanelChildChore.Width -= 0.10 * this.Width; |
|
|
31 |
PanelChildCine.Width -= 0.10 * this.Width; |
|
|
32 |
//Niveau 3 |
|
|
33 |
PanelChild1AxeCam.Width -= 0.05 * this.Width; |
|
|
34 |
PanelChild1MouvCam.Width -= 0.05 * this.Width; |
|
10
|
35 |
|
|
2
|
36 |
} |
|
|
37 |
|
|
3
|
38 |
#region Events |
|
|
39 |
//Annotation |
|
2
|
40 |
private void ButtonAnnotation_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) |
|
|
41 |
{ |
|
|
42 |
if (PanelAnnotation.Visibility == Visibility.Collapsed) |
|
|
43 |
{ |
|
|
44 |
PanelAnnotation.Visibility = Visibility.Visible; |
|
|
45 |
} |
|
|
46 |
else |
|
|
47 |
{ |
|
|
48 |
PanelAnnotation.Visibility = Visibility.Collapsed; |
|
|
49 |
} |
|
|
50 |
} |
|
|
51 |
|
|
3
|
52 |
private void ButtonAnnotation_Click(object sender, RoutedEventArgs e) |
|
|
53 |
{ |
|
|
54 |
if (PanelAnnotation.Visibility == Visibility.Collapsed) |
|
|
55 |
{ |
|
|
56 |
PanelAnnotation.Visibility = Visibility.Visible; |
|
|
57 |
} |
|
|
58 |
else |
|
|
59 |
{ |
|
|
60 |
PanelAnnotation.Visibility = Visibility.Collapsed; |
|
|
61 |
} |
|
|
62 |
} |
|
|
63 |
//Recherche |
|
2
|
64 |
private void ButtonRecherche_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) |
|
|
65 |
{ |
|
|
66 |
if (PanelRecherche.Visibility == Visibility.Collapsed) |
|
|
67 |
{ |
|
|
68 |
PanelRecherche.Visibility = Visibility.Visible; |
|
|
69 |
} |
|
|
70 |
else |
|
|
71 |
{ |
|
|
72 |
PanelRecherche.Visibility = Visibility.Collapsed; |
|
|
73 |
} |
|
3
|
74 |
} |
|
|
75 |
|
|
2
|
76 |
private void ButtonRecherche_Click(object sender, RoutedEventArgs e) |
|
|
77 |
{ |
|
|
78 |
if (PanelRecherche.Visibility == Visibility.Collapsed) |
|
|
79 |
{ |
|
|
80 |
PanelRecherche.Visibility = Visibility.Visible; |
|
|
81 |
} |
|
|
82 |
else |
|
|
83 |
{ |
|
|
84 |
PanelRecherche.Visibility = Visibility.Collapsed; |
|
|
85 |
} |
|
|
86 |
} |
|
3
|
87 |
//ChildCine |
|
|
88 |
private void ButtonChildCine_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) |
|
|
89 |
{ |
|
|
90 |
if (PanelChildCine.Visibility == Visibility.Collapsed) |
|
|
91 |
{ |
|
|
92 |
PanelChildCine.Visibility = Visibility.Visible; |
|
|
93 |
} |
|
|
94 |
else |
|
|
95 |
{ |
|
|
96 |
PanelChildCine.Visibility = Visibility.Collapsed; |
|
|
97 |
} |
|
|
98 |
} |
|
|
99 |
|
|
|
100 |
private void ButtonChildCine_Click(object sender, RoutedEventArgs e) |
|
|
101 |
{ |
|
|
102 |
if (PanelChildCine.Visibility == Visibility.Collapsed) |
|
|
103 |
{ |
|
|
104 |
PanelChildCine.Visibility = Visibility.Visible; |
|
|
105 |
} |
|
|
106 |
else |
|
|
107 |
{ |
|
|
108 |
PanelChildCine.Visibility = Visibility.Collapsed; |
|
|
109 |
} |
|
|
110 |
} |
|
|
111 |
//ChildCore |
|
|
112 |
private void ButtonChildChore_Click(object sender, RoutedEventArgs e) |
|
|
113 |
{ |
|
|
114 |
if (PanelChildChore.Visibility == Visibility.Collapsed) |
|
|
115 |
{ |
|
|
116 |
PanelChildChore.Visibility = Visibility.Visible; |
|
|
117 |
} |
|
|
118 |
else |
|
|
119 |
{ |
|
|
120 |
PanelChildChore.Visibility = Visibility.Collapsed; |
|
|
121 |
} |
|
|
122 |
} |
|
|
123 |
|
|
|
124 |
private void ButtonChildChore_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) |
|
|
125 |
{ |
|
|
126 |
if (PanelChildChore.Visibility == Visibility.Collapsed) |
|
|
127 |
{ |
|
|
128 |
PanelChildChore.Visibility = Visibility.Visible; |
|
|
129 |
} |
|
|
130 |
else |
|
|
131 |
{ |
|
|
132 |
PanelChildChore.Visibility = Visibility.Collapsed; |
|
|
133 |
} |
|
|
134 |
} |
|
|
135 |
//Child1MouvCam |
|
|
136 |
private void ButtonChild1MouvCam_Click(object sender, RoutedEventArgs e) |
|
|
137 |
{ |
|
|
138 |
if (PanelChild1MouvCam.Visibility == Visibility.Collapsed) |
|
|
139 |
{ |
|
|
140 |
PanelChild1MouvCam.Visibility = Visibility.Visible; |
|
|
141 |
} |
|
|
142 |
else |
|
|
143 |
{ |
|
|
144 |
PanelChild1MouvCam.Visibility = Visibility.Collapsed; |
|
|
145 |
} |
|
|
146 |
} |
|
|
147 |
|
|
|
148 |
private void ButtonChild1MouvCam_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) |
|
|
149 |
{ |
|
|
150 |
if (PanelChild1MouvCam.Visibility == Visibility.Collapsed) |
|
|
151 |
{ |
|
|
152 |
PanelChild1MouvCam.Visibility = Visibility.Visible; |
|
|
153 |
} |
|
|
154 |
else |
|
|
155 |
{ |
|
|
156 |
PanelChild1MouvCam.Visibility = Visibility.Collapsed; |
|
|
157 |
} |
|
|
158 |
} |
|
|
159 |
//Child1AxeCam |
|
|
160 |
private void buttonChild1AxeCam_Click(object sender, RoutedEventArgs e) |
|
|
161 |
{ |
|
|
162 |
if (PanelChild1AxeCam.Visibility == Visibility.Collapsed) |
|
|
163 |
{ |
|
|
164 |
PanelChild1AxeCam.Visibility = Visibility.Visible; |
|
|
165 |
} |
|
|
166 |
else |
|
|
167 |
{ |
|
|
168 |
PanelChild1AxeCam.Visibility = Visibility.Collapsed; |
|
|
169 |
} |
|
|
170 |
} |
|
|
171 |
|
|
|
172 |
private void buttonChild1AxeCam_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) |
|
|
173 |
{ |
|
|
174 |
if (PanelChild1AxeCam.Visibility == Visibility.Collapsed) |
|
|
175 |
{ |
|
|
176 |
PanelChild1AxeCam.Visibility = Visibility.Visible; |
|
|
177 |
} |
|
|
178 |
else |
|
|
179 |
{ |
|
|
180 |
PanelChild1AxeCam.Visibility = Visibility.Collapsed; |
|
|
181 |
} |
|
|
182 |
} |
|
|
183 |
#endregion |
|
|
184 |
|
|
|
185 |
|
|
|
186 |
} |
|
2
|
187 |
} |