0024355: Compiler Warning level 4 for MFC samples
[occt.git] / samples / CSharp / WPF / IECommands.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.Windows.Input;
6
7 namespace IE_WPF
8 {
9     public class IECommands
10     {
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; }
16
17         static IECommands()
18         {
19             #region menu
20
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 );
24             
25             Close = new RoutedUICommand( "Close", "Close", typeof(IECommands) );
26
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 );
30
31             InputGestureCollection inputsAbout = new InputGestureCollection();
32             inputsAbout.Add( new KeyGesture( Key.F1 ) );
33             About = new RoutedUICommand( "About", "About", typeof(IECommands), inputsAbout );
34
35             #endregion
36
37             #region aboutDlg
38             InputGestureCollection inputsAboutOk = new InputGestureCollection();
39             inputsAboutOk.Add( new KeyGesture( Key.Enter ) );
40             AboutOk = new RoutedUICommand( "AboutOk", "AboutOk", typeof(IECommands), inputsAboutOk );
41             #endregion
42         }
43     }
44 }