public static void RestartHook() { LangLedHook.UnhookShiftUp(); Action longAction = delegate { _mainForm?.RefreshIndicatorOnSignal(); }; Action shortAction = delegate { _mainForm?.BeginInvoke(longAction); }; LangLedHook.SetShiftUpHook(shortAction); }
static void Main(string[] args) { Win32.SetProcessDPIAware(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (!ParseCommandLineArguments(args)) { return; } _mainForm = new LangLedForm(); RestartHook(); Application.Run(_mainForm); LangLedHook.UnhookShiftUp(); }