2 using System.Collections.Generic;
5 using System.Windows.Input;
7 namespace IE_WPF_WinForms
9 public class IECommands
11 public static RoutedUICommand New { get; private set; }
12 public static RoutedUICommand Close { get; private set; }
13 public static RoutedUICommand Quit { get; private set; }
14 public static RoutedUICommand About { get; private set; }
15 public static RoutedUICommand AboutOk { get; private set; }
21 InputGestureCollection inputsNew = new InputGestureCollection();
22 inputsNew.Add( new KeyGesture( Key.N, ModifierKeys.Control, "Ctrl + N" ) );
23 New = new RoutedUICommand( "New", "New", typeof(IECommands), inputsNew );
25 Close = new RoutedUICommand( "Close", "Close", typeof(IECommands) );
27 InputGestureCollection inputsQuit = new InputGestureCollection();
28 inputsQuit.Add( new KeyGesture( Key.F4, ModifierKeys.Alt, "Alt + F4" ) );
29 Quit = new RoutedUICommand( "Quit", "Quit", typeof(IECommands), inputsQuit );
31 InputGestureCollection inputsAbout = new InputGestureCollection();
32 inputsAbout.Add( new KeyGesture( Key.F1 ) );
33 About = new RoutedUICommand( "About", "About", typeof(IECommands), inputsAbout );
38 InputGestureCollection inputsAboutOk = new InputGestureCollection();
39 inputsAboutOk.Add( new KeyGesture( Key.Enter ) );
40 AboutOk = new RoutedUICommand( "AboutOk", "AboutOk", typeof(IECommands), inputsAboutOk );