forked from manuelmayer-dev/Macro-Deck-Windows-Utils-Plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.cs
55 lines (47 loc) · 1.34 KB
/
Main.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
using SuchByte.MacroDeck.Plugins;
using SuchByte.WindowsUtils.Actions;
using SuchByte.WindowsUtils.Language;
using System.Collections.Generic;
using WindowsInput;
namespace SuchByte.WindowsUtils;
public static class PluginInstance
{
public static Main Main;
}
public class Main : MacroDeckPlugin
{
public static Main Instance;
public InputSimulator InputSimulator = new();
public System.Timers.Timer TickTimer;
public Main()
{
Instance = this;
PluginInstance.Main = this;
}
public override void Enable()
{
PluginLanguageManager.Initialize();
this.Actions = new List<PluginAction>
{
new WriteTextAction(),
new CommandlineAction(),
new OpenFileAction(),
new OpenFolderAction(),
new StartApplicationAction(),
new IncreaseVolumeAction(),
new DecreaseVolumeAction(),
new MuteVolumeAction(),
new WindowsExplorerControlAction(),
//new WebrequestAction(), // TODO
//new WindowsOpenWebsiteAction(), // TODO
new HotkeyAction(),
//new MultiHotkeyAction(),
};
this.TickTimer = new System.Timers.Timer()
{
Enabled = true,
Interval = 2000,
};
this.TickTimer.Start();
}
}