예제 #1
0
        private void ButtonAjouterEvenement_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            FormulaireAddEvent form = new FormulaireAddEvent();
            WindowFormulaires  winF = new WindowFormulaires();

            form.windowParent = winF;
            winF.gridPrincWinForm.Children.Add(form);
            winF.ShowDialog();
        }
예제 #2
0
 private void MainWindowWindow_PreviewKeyDown(object sender, KeyEventArgs e)
 {
     if (Keyboard.IsKeyDown(Key.LeftAlt) && Keyboard.IsKeyDown(Key.F1))
     {
         MessageBox.Show("Help");
     }
     if (Keyboard.IsKeyDown(Key.LeftAlt) && Keyboard.IsKeyDown(Key.F2))
     {
         MessageBox.Show("About");
     }
     if (Keyboard.IsKeyDown(Key.LeftAlt) && Keyboard.IsKeyDown(Key.F4))
     {
         Application.Current.Shutdown();
     }
     if (Keyboard.IsKeyDown(Key.LeftCtrl) && Keyboard.IsKeyDown(Key.D))
     {
         DataSupervisor.ds.LogOut();
         signField.Visibility = Visibility.Visible;
         board.Visibility     = Visibility.Collapsed;
         signField.Signin(null, null);
     }
     if (Keyboard.IsKeyDown(Key.LeftCtrl) && Keyboard.IsKeyDown(Key.T))
     {
         FormulaireAddTache form = new FormulaireAddTache();
         WindowFormulaires  winF = new WindowFormulaires();
         form.windowParent = winF;
         winF.gridPrincWinForm.Children.Add(form);
         winF.ShowDialog();
     }
     if (Keyboard.IsKeyDown(Key.LeftCtrl) && Keyboard.IsKeyDown(Key.E))
     {
         FormulaireAddEvent form = new FormulaireAddEvent();
         WindowFormulaires  winF = new WindowFormulaires();
         form.windowParent = winF;
         winF.gridPrincWinForm.Children.Add(form);
         winF.ShowDialog();
     }
     if (Keyboard.IsKeyDown(Key.LeftCtrl) && Keyboard.IsKeyDown(Key.C))
     {
         WindowFormulaires    windF = new WindowFormulaires();
         FormulaireAddContact f     = new FormulaireAddContact();
         try
         {
             windF.gridPrincWinForm.Children.Clear();
         }
         catch { }
         windF.gridPrincWinForm.Children.Add(f);
         f.windowFather = windF;
         windF.ShowDialog();
     }
     if (Keyboard.IsKeyDown(Key.LeftCtrl) && Keyboard.IsKeyDown(Key.A))
     {
         FormulaireAddActivity form = new FormulaireAddActivity();
         WindowFormulaires     win  = new WindowFormulaires();
         form.windowFather = win;
         win.gridPrincWinForm.Children.Add(form);
         win.Height = 403;
         win.ShowDialog();
     }
     if (Keyboard.IsKeyDown(Key.LeftCtrl) && Keyboard.IsKeyDown(Key.R))
     {
         MainWindowWindow.WindowState = WindowState.Minimized;
     }
 }