/// <summary> /// Displays the transluscent glass that overlays /// the screen behind the scanner /// </summary> public void ShowGlass() { Glass.ShowGlass(); if (Glass.Enable) { Windows.SetTopMost(ScannerForm); } }
/// <summary> /// Creates a glass object if one is not already created. /// Doesn't show it though /// </summary> /// <returns>true</returns> public static bool CreateGlass() { if (!Enable) { return(false); } if (_glass == null) { _glass = new Glass { TopMost = true, ShowInTaskbar = false }; } return(true); }
/// <summary> /// Call this in the OnClose event handler for the form. /// Releases resources /// </summary> public void OnClosing() { try { _animationManager.Dispose(); _rootWidget.Dispose(); if (Context.AppQuit) { Windows.ShowTaskbar(); Context.AppTalkWindowManager.Dispose(); Glass.HideGlass(); } } catch (Exception ex) { Log.Exception(ex); } }
/// <summary> /// Hides the glass. /// </summary> public static void HideGlass() { try { Windows.ShowTaskbar(); if (_glass == null) { return; } waitForThread(); _quit = true; Windows.CloseForm(_glass); _glass = null; } catch { } }
/// <summary> /// Creates a glass object if one is not already created. /// Doesn't show it though /// </summary> /// <returns>true</returns> public static bool CreateGlass() { if (!Enable) { return false; } if (_glass == null) { _glass = new Glass { TopMost = true, ShowInTaskbar = false }; } return true; }
/// <summary> /// Hides the glass window /// </summary> public void HideGlass() { Glass.HideGlass(); }