/// <summary> /// Initialize a new instance of the ControlObscurer class. /// </summary> public ScreenObscurer() { // First time needed, create the top level obscurer window if (_obscurer == null) { _obscurer = new ObscurerForm(); } }
/// <summary> /// Hide the obscurer from display. /// </summary> public void Dispose() { if (_obscurer != null) { _obscurer.Hide(); _obscurer.Dispose(); _obscurer = null; } }
/// <summary> /// Initialize a new instance of the ControlObscurer class. /// </summary> /// <param name="c">Control to obscure.</param> /// <param name="designMode">Is the source in design mode.</param> public ScreenObscurer(Control c, bool designMode) { // Check the incoming control is valid if ((c != null) && !c.IsDisposed && !designMode) { // First time needed, create the top level obscurer window if (_obscurer == null) _obscurer = new ObscurerForm(); // We need a control to work with! if (c != null) _obscurer.ShowForm(c.RectangleToScreen(c.ClientRectangle)); } }
/// <summary> /// Initialize a new instance of the ControlObscurer class. /// </summary> /// <param name="f">Form to obscure.</param> /// <param name="designMode">Is the source in design mode.</param> public ScreenObscurer(Form f, bool designMode) { // Check the incoming form is valid if ((f != null) && !f.IsDisposed && !designMode) { // First time needed, create the top level obscurer window if (_obscurer == null) _obscurer = new ObscurerForm(); // We need a control to work with! if (f != null) _obscurer.ShowForm(f.Bounds); } }
/// <summary> /// Initialize a new instance of the ControlObscurer class. /// </summary> /// <param name="c">Control to obscure.</param> /// <param name="designMode">Is the source in design mode.</param> public ScreenObscurer(Control c, bool designMode) { // Check the incoming control is valid if ((c != null) && !c.IsDisposed && !designMode) { // First time needed, create the top level obscurer window if (_obscurer == null) { _obscurer = new ObscurerForm(); } // We need a control to work with! _obscurer.ShowForm(c.RectangleToScreen(c.ClientRectangle)); } }
/// <summary> /// Initialize a new instance of the ControlObscurer class. /// </summary> /// <param name="f">Form to obscure.</param> /// <param name="designMode">Is the source in design mode.</param> public ScreenObscurer(Form f, bool designMode) { // Check the incoming form is valid if ((f != null) && !f.IsDisposed && !designMode) { // First time needed, create the top level obscurer window if (_obscurer == null) { _obscurer = new ObscurerForm(); } // We need a control to work with! _obscurer.ShowForm(f.Bounds); } }
/// <summary> /// Initialize a new instance of the ControlObscurer class. /// </summary> public ScreenObscurer() { // First time needed, create the top level obscurer window if (_obscurer == null) _obscurer = new ObscurerForm(); }