/// <summary> /// Event handler for when a scanner is closed. Reset the default position /// of the form /// </summary> /// <param name="sender">event sender</param> /// <param name="arg">event args</param> private void Instance_EvtScannerClosed(object sender, ScannerCloseEventArg arg) { if (arg.Scanner != _form) { Windows.SetWindowPositionAndNotify(_form, Windows.WindowPosition.CenterScreen); } }
/// <summary> /// Event handler for when a scanner closes /// </summary> /// <param name="sender">event sender</param> /// <param name="arg">event args</param> private void panelStack_EvtScannerClosed(object sender, ScannerCloseEventArg arg) { if (EvtScannerClosed != null) { EvtScannerClosed(sender, arg); } }
/// <summary> /// Event handler for when a scanner closes. Reposition this scanner /// to its default position /// </summary> /// <param name="sender">event sender</param> /// <param name="arg">event args</param> private void Instance_EvtScannerClosed(object sender, ScannerCloseEventArg arg) { if (arg.Scanner != this) { if (_dockedWithForm == arg.Scanner) { _dockedWithForm = null; } _scannerCommon.PositionSizeController.AutoSetPosition(); } }