Example #1
0
 /// <summary>
 /// When we click on contect menu "Ajouter un entrainement", go to the training page
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void MenuItem_Click_Add_Training(object sender, RoutedEventArgs e)
 {
     _trainingPage       = new TrainingPage(new Training());
     _trainingPage.Owner = this;
     this.IsEnabled      = false;
     this.Visibility     = System.Windows.Visibility.Hidden;
     _trainingPage.Show();
 }
Example #2
0
 /// <summary>
 /// When we click on context menu "Modifier"
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void MenuItem_Click_Modify_Training(object sender, RoutedEventArgs e)
 {
     if (lvTrainings.SelectedItem != null)
     {
         Training training = (lvTrainings.SelectedItem) as Training;
         lvTrainings.SelectedItem = null;
         _trainingPage            = new TrainingPage(training);
         _trainingPage.Owner      = this;
         this.IsEnabled           = false;
         this.Visibility          = System.Windows.Visibility.Hidden;
         _trainingPage.Show();
     }
 }