public void OnLoad(bool resetTalkWindowPosition = true) { PositionSizeController.OnLoad(); TextController.OnLoad(); PositionSizeController.ScaleForm(); Windows.SetWindowPosition(ScannerForm, Context.AppWindowPosition); if (Context.ShowTalkWindowOnStartup) { Context.AppTalkWindowManager.ToggleTalkWindow(); Context.ShowTalkWindowOnStartup = false; } if (resetTalkWindowPosition) { Context.AppTalkWindowManager.SetTalkWindowPosition(ScannerForm); } StatusBarController.UpdateStatusBar(); subscribeToEvents(); SetWidgetEnabledStates(WindowActivityMonitor.GetForegroundWindowInfo()); }
/// <summary> /// Call this in the OnResume event handler in the form /// </summary> public void OnResume() { if (!_isPaused) { return; } _isPaused = false; try { StatusBarController.UpdateStatusBar(); PositionSizeController.ScaleForm(); if (!DialogMode) { if (!KeepTalkWindowActive) { Log.Debug(ScannerForm.Name + ", _talkWindowPaused : " + _talkWindowPaused); if (_talkWindowPaused) { Log.Debug(ScannerForm.Name + ", Resuming talk window: " + _talkWindowPaused); Context.AppTalkWindowManager.Resume(); _talkWindowPaused = false; } } PositionSizeController.AutoSetPositionAndNotify(); } } catch (Exception ex) { Log.Debug(ex.ToString()); } }
/// <summary> /// The keystate of one of the modifier keys (shift, alt, /// ctrl or function) changed. Update the scanner status bar /// </summary> private void KeyStateTracker_EvtKeyStateChanged() { StatusBarController.UpdateStatusBar(); }