private void addExcBinding_Executed(object sender, ExecutedRoutedEventArgs e)
 {
     if (calendar.SelectedDate.HasValue)
     {
         var w = new ExcercisesWindow();
         w.ShowDialog();
         if (w.DialogResult == true)
         {
             TrainResult train = Results[calendar.SelectedDate.Value];
             if (train == null)
             {
                 train = new TrainResult(calendar.SelectedDate.Value, Results);
                 Results.TrainDays.Add(train);
                 resultsSp.DataContext = Results[calendar.SelectedDate.Value];
             }
             var res = new ExcerciseResult(w.Selected, train, 4);
             train.Uprs.Add(res);
         }
     }
 }
        private void OpenLib_Click(object sender, RoutedEventArgs e)
        {
            var w = new ExcercisesWindow();

            w.ShowDialog();
        }