public Main() { InitializeComponent(); // Material var materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT; materialSkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue200, TextShade.WHITE); // Notify icon niNotifyIcon.ContextMenu = new ContextMenu(new[] { new MenuItem("Show", (sender, args) => { this.niNotifyIcon_MouseDoubleClick(sender, null); }), new MenuItem("-"), new MenuItem("Exit", (sender, args) => { this.Close(); }) }); // Scroll Lock handler ScrollLockInterceptor.ScrollLockChange += ScrollLockInterceptorOnScrollLockChange; _timer = new Timer { Interval = 10000 }; _timer.Tick += (sender, args) => ScrollLockInterceptor.InvokeScrollLockChange(); _timer.Start(); _timeCounter = new TimeCounter(); }
private async Task InvokeScrollLockChangeSoon() { await Task.Delay(1000); ScrollLockInterceptor.InvokeScrollLockChange(); }