equal
deleted
inserted
replaced
53 |
53 |
54 private void InitPivotInertia() |
54 private void InitPivotInertia() |
55 { |
55 { |
56 try |
56 try |
57 { |
57 { |
58 ScatterViewItem item = (ScatterViewItem)ScaterView.Items.GetItemAt(0); |
58 ScatterViewItem item = (ScatterViewItem)scaterview.Items.GetItemAt(0); |
59 item.DecelerationRate = double.NaN; |
59 item.DecelerationRate = double.NaN; |
60 } |
60 } |
61 catch (Exception ex) { } |
61 catch (Exception ex) { } |
62 } |
62 } |
63 |
63 |
64 private void InitGridPositions() |
64 private void InitGridPositions() |
65 { |
65 { |
66 //Initialise les 4 Grids à la positions initiale du Pivot. |
66 //Initialise les 4 Grids à la positions initiale du Pivot. |
67 try |
67 try |
68 { |
68 { |
69 ScatterViewItem item = (ScatterViewItem)ScaterView.Items.GetItemAt(0); |
69 ScatterViewItem item = (ScatterViewItem)scaterview.Items.GetItemAt(0); |
70 Grid1.Width =item.Center.X; |
70 Grid1.Width =item.Center.X; |
71 Grid1.Height = item.Center.Y; |
71 Grid1.Height = item.Center.Y; |
72 |
72 |
73 Grid2.Width = item.Center.X; |
73 Grid2.Width = item.Center.X; |
74 Grid2.Height = 768 - item.Center.Y; |
74 Grid2.Height = 768 - item.Center.Y; |
147 private void OnApplicationDeactivated(object sender, EventArgs e) |
147 private void OnApplicationDeactivated(object sender, EventArgs e) |
148 { |
148 { |
149 //TODO: disable audio, animations here |
149 //TODO: disable audio, animations here |
150 } |
150 } |
151 |
151 |
152 private void ScaterView_ContactChanged(object sender, ContactEventArgs e) |
152 private void scaterview_ContactChanged(object sender, ContactEventArgs e) |
|
153 { |
|
154 //Permet la MAJ des 4 Grids à la position du pivot |
|
155 /*try |
|
156 { |
|
157 Grid1.Width = e.GetPosition(mainSurfaceWindow).X; |
|
158 Grid1.Height = e.GetPosition(mainSurfaceWindow).Y; |
|
159 |
|
160 Grid3.Width = e.GetPosition(mainSurfaceWindow).X; |
|
161 Grid3.Height = 768 - e.GetPosition(mainSurfaceWindow).Y; |
|
162 |
|
163 Grid4.Width = 1024 - e.GetPosition(mainSurfaceWindow).X; |
|
164 Grid4.Height = 768 - e.GetPosition(mainSurfaceWindow).Y; |
|
165 |
|
166 Grid2.Width = 1024 - e.GetPosition(mainSurfaceWindow).X; |
|
167 Grid2.Height = e.GetPosition(mainSurfaceWindow).Y; |
|
168 } |
|
169 catch (Exception ex) { }*/ |
|
170 } |
|
171 |
|
172 private void ScatterViewItemPivot_ContactChanged(object sender, ContactEventArgs e) |
153 { |
173 { |
154 //Permet la MAJ des 4 Grids à la position du pivot |
174 //Permet la MAJ des 4 Grids à la position du pivot |
155 try |
175 try |
156 { |
176 { |
157 Grid1.Width = e.GetPosition(mainSurfaceWindow).X; |
177 Grid1.Width = e.GetPosition(mainSurfaceWindow).X; |
174 |
194 |
175 if (!isCreatedP1) |
195 if (!isCreatedP1) |
176 { |
196 { |
177 UserControlListVideo ListVideo1 = new UserControlListVideo(); |
197 UserControlListVideo ListVideo1 = new UserControlListVideo(); |
178 ListVideo1.Name = "ListVideo1"; |
198 ListVideo1.Name = "ListVideo1"; |
|
199 |
179 Grid1.Children.Add(ListVideo1); |
200 Grid1.Children.Add(ListVideo1); |
|
201 |
|
202 //Creation des Events pour chaque item de la video |
180 ListVideo1.EH_ItemVideo1_ContactDown += new System.EventHandler(this.ListVideo1_EH_ItemVideo1_ContactDown); |
203 ListVideo1.EH_ItemVideo1_ContactDown += new System.EventHandler(this.ListVideo1_EH_ItemVideo1_ContactDown); |
181 ListVideo1.EH_ItemVideo2_ContactDown += new System.EventHandler(this.ListVideo1_EH_ItemVideo2_ContactDown); |
204 ListVideo1.EH_ItemVideo2_ContactDown += new System.EventHandler(this.ListVideo1_EH_ItemVideo2_ContactDown); |
182 /* |
205 /* |
183 UserControlUserPanel UserPanel1 = new UserControlUserPanel(); |
206 UserControlUserPanel UserPanel1 = new UserControlUserPanel(); |
184 UserPanel1.Name = "UserPanel1"; |
207 UserPanel1.Name = "UserPanel1"; |
220 } |
243 } |
221 } |
244 } |
222 |
245 |
223 private void ListVideo1_EH_ItemVideo1_ContactDown(object sender, EventArgs e) |
246 private void ListVideo1_EH_ItemVideo1_ContactDown(object sender, EventArgs e) |
224 { |
247 { |
|
248 |
|
249 //Creation d'un ScatterView Item |
|
250 //ScatterViewItem scatterViewItemSessionInput = new ScatterViewItem(); |
|
251 //scatterViewItemSessionInput.Name = "ScatterViewItemSessionInput"; |
|
252 |
|
253 |
225 //Creation d'une nouvelle seance. |
254 //Creation d'une nouvelle seance. |
226 |
255 |
227 UserControlSessionInput SessionInput = new UserControlSessionInput(); |
256 UserControlSessionInput SessionInput = new UserControlSessionInput(); |
228 SessionInput.Name = "SessionInput"; |
257 SessionInput.Name = "SessionInput"; |
229 |
258 |
231 Grid actualGrid = (Grid)(((UserControlListVideo)sender).Parent); |
260 Grid actualGrid = (Grid)(((UserControlListVideo)sender).Parent); |
232 actualGrid.Children.Add(SessionInput); |
261 actualGrid.Children.Add(SessionInput); |
233 |
262 |
234 SessionInput.EH_SurfaceButtonSubmit_ContactDown += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
263 SessionInput.EH_SurfaceButtonSubmit_ContactDown += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown); |
235 actualGrid.Children.Remove((UserControlListVideo)sender); |
264 actualGrid.Children.Remove((UserControlListVideo)sender); |
|
265 |
|
266 //Init Scatter View Properties and Add it to the scatter view. |
|
267 /*scatterViewItemSessionInput.Content = SessionInput; |
|
268 scatterViewItemSessionInput.CanMove = true; |
|
269 scatterViewItemSessionInput.CanScale = false; |
|
270 scatterViewItemSessionInput.CanRotate = true; |
|
271 scatterViewItemSessionInput.Center = new Point((double)actualGrid.ActualWidth,(double)actualGrid.ActualHeight); |
|
272 scaterview.Items.Add(scatterViewItemSessionInput);*/ |
236 } |
273 } |
237 catch (Exception ex) { } |
274 catch (Exception ex) { } |
238 isCreatedP1 = true; |
275 isCreatedP1 = true; |
239 } |
276 } |
240 |
277 |
257 |
294 |
258 } |
295 } |
259 catch (Exception ex) { } |
296 catch (Exception ex) { } |
260 } |
297 } |
261 |
298 |
|
299 |
|
300 |
262 } |
301 } |
263 } |
302 } |