# HG changeset patch # User sarias # Date 1253718703 -7200 # Node ID 0f29e2660bb74c926d62bc296a4aab5a1b9bf4a4 # Parent 64d5eca7f5d65c5c5d66d58905a152805428ee8f grisage sur le les controls diff -r 64d5eca7f5d6 -r 0f29e2660bb7 src/FingersDance/MainSurfaceWindow.xaml.cs --- a/src/FingersDance/MainSurfaceWindow.xaml.cs Wed Sep 23 16:27:43 2009 +0200 +++ b/src/FingersDance/MainSurfaceWindow.xaml.cs Wed Sep 23 17:11:43 2009 +0200 @@ -188,28 +188,61 @@ Grid2.Width = 1024 - e.GetPosition(mainSurfaceWindow).X; Grid2.Height = e.GetPosition(mainSurfaceWindow).Y; - if (Grid1.Width < (1024 / 4) || Grid2.Height < (1024 / 4)) + //GRISAGE + //Grid1 + if (Grid1.Width < (1024 / 4) || Grid2.Height < (768 / 4)) { - Grid1.Visibility = Visibility.Hidden; + try + {Grid1.Children[1].Visibility = Visibility.Hidden;} + catch (Exception) { } } - else { Grid1.Visibility = Visibility.Visible; } - if (Grid2.Width < (1024 / 4) || Grid2.Height < (1024 / 4)) + else + { + try + { Grid1.Children[1].Visibility = Visibility.Visible; } + catch (Exception) { } + } + //Grid2 + if (Grid2.Width < (1024 / 4) || Grid2.Height < (768 / 4)) { - Grid2.Visibility = Visibility.Hidden; + try + { Grid2.Children[1].Visibility = Visibility.Hidden; } + catch (Exception) { } + } + else + { + try + { Grid2.Children[1].Visibility = Visibility.Visible; } + catch (Exception) { } } - else { Grid2.Visibility = Visibility.Visible; } - if (Grid3.Width < (1024 / 4) || Grid3.Height < (1024 / 4)) + //Grid3 + if (Grid3.Width < (1024 / 4) || Grid3.Height < (768 / 4)) { - Grid3.Visibility = Visibility.Hidden; + try + { Grid3.Children[1].Visibility = Visibility.Hidden; } + catch (Exception) { } + } + else + { + try + { Grid3.Children[1].Visibility = Visibility.Visible; } + catch (Exception) { } } - else { Grid3.Visibility = Visibility.Visible; } - if (Grid4.Width < (1024 / 4) || Grid4.Height < (1024 / 4)) + //Grid4 + if (Grid4.Width < (1024 / 4) || Grid4.Height < (768 / 4)) { - Grid4.Visibility = Visibility.Hidden; + try + { Grid4.Children[1].Visibility = Visibility.Hidden; } + catch (Exception) { } } - else { Grid4.Visibility = Visibility.Visible; } + else + { + try + { Grid4.Children[1].Visibility = Visibility.Visible; } + catch (Exception) { } + } } - catch (Exception ex) { } + catch (Exception) { } } private void UserControlPivot_EH_SurfaceButtonPlayer1_ContactDown(object sender, EventArgs e) @@ -242,10 +275,10 @@ { if (!isCreatedP2) { - UserControlUserPanel UserPanel2 = new UserControlUserPanel(); + /* UserControlUserPanel UserPanel2 = new UserControlUserPanel(); UserPanel2.Name = "UserPanel2"; Grid2.Children.Add(UserPanel2); - isCreatedP2 = true; + isCreatedP2 = true;*/ //1-Creation du control Screen UserControlScreen Screen2 = new UserControlScreen();