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; |
2
|
35 |
} |
|
36 |
|
3
|
37 |
#region Events |
|
38 |
//Annotation |
2
|
39 |
private void ButtonAnnotation_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) |
|
40 |
{ |
|
41 |
if (PanelAnnotation.Visibility == Visibility.Collapsed) |
|
42 |
{ |
|
43 |
PanelAnnotation.Visibility = Visibility.Visible; |
|
44 |
} |
|
45 |
else |
|
46 |
{ |
|
47 |
PanelAnnotation.Visibility = Visibility.Collapsed; |
|
48 |
} |
|
49 |
} |
|
50 |
|
3
|
51 |
private void ButtonAnnotation_Click(object sender, RoutedEventArgs e) |
|
52 |
{ |
|
53 |
if (PanelAnnotation.Visibility == Visibility.Collapsed) |
|
54 |
{ |
|
55 |
PanelAnnotation.Visibility = Visibility.Visible; |
|
56 |
} |
|
57 |
else |
|
58 |
{ |
|
59 |
PanelAnnotation.Visibility = Visibility.Collapsed; |
|
60 |
} |
|
61 |
} |
|
62 |
//Recherche |
2
|
63 |
private void ButtonRecherche_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) |
|
64 |
{ |
|
65 |
if (PanelRecherche.Visibility == Visibility.Collapsed) |
|
66 |
{ |
|
67 |
PanelRecherche.Visibility = Visibility.Visible; |
|
68 |
} |
|
69 |
else |
|
70 |
{ |
|
71 |
PanelRecherche.Visibility = Visibility.Collapsed; |
|
72 |
} |
3
|
73 |
} |
|
74 |
|
2
|
75 |
private void ButtonRecherche_Click(object sender, RoutedEventArgs e) |
|
76 |
{ |
|
77 |
if (PanelRecherche.Visibility == Visibility.Collapsed) |
|
78 |
{ |
|
79 |
PanelRecherche.Visibility = Visibility.Visible; |
|
80 |
} |
|
81 |
else |
|
82 |
{ |
|
83 |
PanelRecherche.Visibility = Visibility.Collapsed; |
|
84 |
} |
|
85 |
} |
3
|
86 |
//ChildCine |
|
87 |
private void ButtonChildCine_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) |
|
88 |
{ |
|
89 |
if (PanelChildCine.Visibility == Visibility.Collapsed) |
|
90 |
{ |
|
91 |
PanelChildCine.Visibility = Visibility.Visible; |
|
92 |
} |
|
93 |
else |
|
94 |
{ |
|
95 |
PanelChildCine.Visibility = Visibility.Collapsed; |
|
96 |
} |
|
97 |
} |
|
98 |
|
|
99 |
private void ButtonChildCine_Click(object sender, RoutedEventArgs e) |
|
100 |
{ |
|
101 |
if (PanelChildCine.Visibility == Visibility.Collapsed) |
|
102 |
{ |
|
103 |
PanelChildCine.Visibility = Visibility.Visible; |
|
104 |
} |
|
105 |
else |
|
106 |
{ |
|
107 |
PanelChildCine.Visibility = Visibility.Collapsed; |
|
108 |
} |
|
109 |
} |
|
110 |
//ChildCore |
|
111 |
private void ButtonChildChore_Click(object sender, RoutedEventArgs e) |
|
112 |
{ |
|
113 |
if (PanelChildChore.Visibility == Visibility.Collapsed) |
|
114 |
{ |
|
115 |
PanelChildChore.Visibility = Visibility.Visible; |
|
116 |
} |
|
117 |
else |
|
118 |
{ |
|
119 |
PanelChildChore.Visibility = Visibility.Collapsed; |
|
120 |
} |
|
121 |
} |
|
122 |
|
|
123 |
private void ButtonChildChore_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) |
|
124 |
{ |
|
125 |
if (PanelChildChore.Visibility == Visibility.Collapsed) |
|
126 |
{ |
|
127 |
PanelChildChore.Visibility = Visibility.Visible; |
|
128 |
} |
|
129 |
else |
|
130 |
{ |
|
131 |
PanelChildChore.Visibility = Visibility.Collapsed; |
|
132 |
} |
|
133 |
} |
|
134 |
//Child1MouvCam |
|
135 |
private void ButtonChild1MouvCam_Click(object sender, RoutedEventArgs e) |
|
136 |
{ |
|
137 |
if (PanelChild1MouvCam.Visibility == Visibility.Collapsed) |
|
138 |
{ |
|
139 |
PanelChild1MouvCam.Visibility = Visibility.Visible; |
|
140 |
} |
|
141 |
else |
|
142 |
{ |
|
143 |
PanelChild1MouvCam.Visibility = Visibility.Collapsed; |
|
144 |
} |
|
145 |
} |
|
146 |
|
|
147 |
private void ButtonChild1MouvCam_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) |
|
148 |
{ |
|
149 |
if (PanelChild1MouvCam.Visibility == Visibility.Collapsed) |
|
150 |
{ |
|
151 |
PanelChild1MouvCam.Visibility = Visibility.Visible; |
|
152 |
} |
|
153 |
else |
|
154 |
{ |
|
155 |
PanelChild1MouvCam.Visibility = Visibility.Collapsed; |
|
156 |
} |
|
157 |
} |
|
158 |
//Child1AxeCam |
|
159 |
private void buttonChild1AxeCam_Click(object sender, RoutedEventArgs e) |
|
160 |
{ |
|
161 |
if (PanelChild1AxeCam.Visibility == Visibility.Collapsed) |
|
162 |
{ |
|
163 |
PanelChild1AxeCam.Visibility = Visibility.Visible; |
|
164 |
} |
|
165 |
else |
|
166 |
{ |
|
167 |
PanelChild1AxeCam.Visibility = Visibility.Collapsed; |
|
168 |
} |
|
169 |
} |
|
170 |
|
|
171 |
private void buttonChild1AxeCam_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) |
|
172 |
{ |
|
173 |
if (PanelChild1AxeCam.Visibility == Visibility.Collapsed) |
|
174 |
{ |
|
175 |
PanelChild1AxeCam.Visibility = Visibility.Visible; |
|
176 |
} |
|
177 |
else |
|
178 |
{ |
|
179 |
PanelChild1AxeCam.Visibility = Visibility.Collapsed; |
|
180 |
} |
|
181 |
} |
|
182 |
#endregion |
|
183 |
|
|
184 |
|
|
185 |
} |
2
|
186 |
} |