public OCRLiveForm() { InitializeComponent(); displayImage = new displayImageDelegate(DisplayImages); closeDialog = new closeDialogDelegate(StopGrabAndCloseDialog); }
/// <summary> /// Closes the dialog in a safe cross thread manner. /// </summary> public void CloseSyncDialog() { closeDialogDelegate closeDelegate = new closeDialogDelegate(CloseSyncDialog); if (this.InvokeRequired) { this.Invoke(closeDelegate); } else { show = false; Close(); } }