private void btnBack_Click(object sender, RoutedEventArgs e) { LoadTestWindow form = new LoadTestWindow(); form.WindowStartupLocation = WindowStartupLocation.CenterScreen; form.Visibility = Visibility.Visible; this.Visibility = Visibility.Collapsed; }
private void btnFinish_Click(object sender, RoutedEventArgs e) { if (CheckInput() == false) { return; } CreateQuestion(); MessageBox.Show("Тест был успешно создан"); LoadTestWindow form = new LoadTestWindow(); form.WindowStartupLocation = WindowStartupLocation.CenterScreen; form.Visibility = Visibility.Visible; this.Visibility = Visibility.Collapsed; }
private void btnStart_Click(object sender, RoutedEventArgs e) { if (check == true) { foreach (Window window in App.Current.Windows) { if (window is LoadTestWindow) { window.Visibility = Visibility.Visible; } } } else { LoadTestWindow form = new LoadTestWindow(); form.WindowStartupLocation = WindowStartupLocation.CenterScreen; form.Visibility = Visibility.Visible; check = true; } this.Visibility = Visibility.Collapsed; }