using System;
using System.IO;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Navigation;
using System.Windows.Input;
namespace WWWings_WPF
{
 public partial class F_Flugbuchung_Commands
 {

  public static RoutedCommand BeendenBefehl = new RoutedCommand();

  public F_Flugbuchung_Commands()
  {
   this.InitializeComponent();
   // Tastaturkürzel definieren
   KeyGesture Taste = new KeyGesture(Key.B,ModifierKeys.Control);

   // Befehl definieren
   BeendenBefehl.InputGestures.Add(Taste);

   // Binding definieren
   CommandBinding cb = new System.Windows.Input.CommandBinding(BeendenBefehl);
   this.CommandBindings.Add(cb);
   cb.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(cb_Executed);
   cb.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(cb_CanExecute);
  }

  void cb_CanExecute(object sender, System.Windows.Input.CanExecuteRoutedEventArgs e)
  {
   e.CanExecute = true;
  }

  void cb_Executed(object sender, System.Windows.Input.ExecutedRoutedEventArgs e)
  {
   this.Close();
  }

  private void C_Ende_Click(object sender, RoutedEventArgs e)
  {
   this.Close();
  }
 }
}