-
Notifications
You must be signed in to change notification settings - Fork 82
/
NextApplication.cs
107 lines (82 loc) · 2.22 KB
/
NextApplication.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
using System;
using GestureSign.Common.Plugins;
using WindowsInput;
using WindowsInput.Native;
using GestureSign.Common.Localization;
using System.Windows.Forms;
namespace GestureSign.CorePlugins
{
public class NextApplication : IPlugin
{
#region Private Variables
IHostControl _HostControl = null;
#endregion
#region IAction Properties
public string Name
{
get { return LocalizationProvider.Instance.GetTextValue("CorePlugins.NextApplication.Name"); }
}
public string Description
{
get { return LocalizationProvider.Instance.GetTextValue("CorePlugins.NextApplication.Description"); }
}
public object GUI
{
get { return null; }
}
public bool ActivateWindowDefault
{
get { return false; }
}
public string Category
{
get { return "Windows"; }
}
public bool IsAction
{
get { return true; }
}
public object Icon => IconSource.Window;
#endregion
#region IAction Methods
public void Initialize()
{
}
public bool Gestured(PointInfo ActionPoint)
{
InputSimulator simulator = new InputSimulator();
try
{
simulator.Keyboard.ModifiedKeyStroke(VirtualKeyCode.LMENU, VirtualKeyCode.TAB);
}
catch (Exception)
{
KeyboardHelper.ResetKeyState(ActionPoint.Window, Keys.LMenu);
return false;
}
return true;
}
public bool Deserialize(string SerializedData)
{
return true;
// Nothing to deserialize
}
public string Serialize()
{
// Nothing to serialize, send empty string
return "";
}
public void ShowGUI(bool IsNew)
{
// Nothing to do here
}
#endregion
#region Host Control
public IHostControl HostControl
{
get { return _HostControl; }
set { _HostControl = value; }
}
#endregion
}
}