-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCustomCommands.cs
69 lines (61 loc) · 2.78 KB
/
CustomCommands.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
using System.Windows.Input;
namespace SkinText {
public static class CustomCommands {
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")]
public static readonly RoutedUICommand Exit = new RoutedUICommand
(
"Exit",
"Exit",
typeof(CustomCommands),
new InputGestureCollection()
{
new KeyGesture(Key.F4, ModifierKeys.Alt)
}
);
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")]
public static readonly RoutedUICommand Save = new RoutedUICommand
(
"Save",
"Save",
typeof(CustomCommands),
new InputGestureCollection()
{
new KeyGesture(Key.S, ModifierKeys.Control)
}
);
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")]
public static readonly RoutedUICommand SaveAs = new RoutedUICommand
(
"SaveAs",
"SaveAs",
typeof(CustomCommands),
new InputGestureCollection()
{
new KeyGesture(Key.S, ModifierKeys.Control | ModifierKeys.Shift)
}
);
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")]
public static readonly RoutedUICommand Open = new RoutedUICommand
(
"Open",
"Open",
typeof(CustomCommands),
new InputGestureCollection()
{
new KeyGesture(Key.O, ModifierKeys.Control)
}
);
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")]
public static readonly RoutedUICommand New = new RoutedUICommand
(
"New",
"New",
typeof(CustomCommands),
new InputGestureCollection()
{
new KeyGesture(Key.N, ModifierKeys.Control)
}
);
//Define more commands here, just like the one above
}
}