Esempio n. 1
0
        private void ButtonDelete_Click(object sender, RoutedEventArgs e)
        {
            // Get the element on which the button was pressed
            Button           button            = e.OriginalSource as Button;
            ExcerciseDisplay selectedExcercise = (e.OriginalSource as Button).DataContext as ExcerciseDisplay;

            DisplayDeleteDataDialog(selectedExcercise);
        }
Esempio n. 2
0
        private void ButtonEdit_Click(object sender, RoutedEventArgs e)
        {
            ExcerciseDisplay excerciseDisplayTmp = (e.OriginalSource as Button).DataContext as ExcerciseDisplay;

            application.EditExcercise(excerciseDisplayTmp.GetExcercise());
        }