private void ShowDetails()
        {
            if (resultTable.SelectedItem is Progress progress)
            {
                if (performWindow != null)
                {
                    using (AppDbContext db = new AppDbContext())
                    {
                        Test test = db.Tests.Find(progress.TestId);
                        if (test.CanUserSeeResult)
                        {
                            performWindow.TryFillWorkspace(new ProgressDetails(progress));
                            performWindow.backButton.Visibility = Visibility.Visible;
                        }
                        else
                        {
                            MessageBox.Show("Sorry, but creator of the test has forbidden viewing of details", "Information",
                                            MessageBoxButton.OK, MessageBoxImage.Information, MessageBoxResult.OK);
                        }
                    }
                }

                if (constructorWindow != null)
                {
                    constructorWindow.TryFillWorkspace(false, new ProgressDetails(progress));
                    constructorWindow.backButton.Visibility = Visibility.Visible;
                }
            }
        }
 private void ShowDetailsTextBlock_Click(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     if (currentTest.CanUserSeeResult)
     {
         performWindow.TryFillWorkspace(new ProgressDetails((Progress)DataContext));
     }
     else
     {
         MessageBox.Show("Sorry, but creator of the test has forbidden viewing of details", "Information",
                         MessageBoxButton.OK, MessageBoxImage.Information, MessageBoxResult.OK);
     }
 }