private void Window_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Escape) { Close(); } if (e.Key == Key.A) { tabControl.SelectedItem = tabItem1; } if (e.Key == Key.U) { tabControl.SelectedItem = tabItem3; SV4.Focus(); } if (e.Key == Key.C) { tabControl.SelectedItem = tabItem5; TCList.Focus(); } if (e.Key == Key.I) { tabControl.SelectedItem = tabItem4; } if (e.Key == Key.S && tabItem1.IsSelected) { button1_Click(this, e); } if (e.Key == Key.H) { Anleitung An = new Anleitung(); An.ShowDialog(); } }
private void Window_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { button2_Click(sender, e); } if (e.Key == Key.Escape) { Close(); } if (e.Key == Key.I || e.Key == Key.E) { button_Click(this, e); } if (e.Key == Key.N) { if (MessageBox.Show("Bist du sicher, dass du das Programm neustarten willst?", "Neustarten", MessageBoxButton.YesNo, MessageBoxImage.Information) == MessageBoxResult.Yes) { System.Diagnostics.Process.Start(Application.ResourceAssembly.Location); Application.Current.Shutdown(); } } if (e.Key == Key.H || e.Key == Key.A) { Anleitung An = new Anleitung(); An.ShowDialog(); } }
private void button3_Click(object sender, RoutedEventArgs e) { Anleitung An = new Anleitung(); An.ShowDialog(); }