private void _miWiaSelectSource_Click(object sender, System.EventArgs e) { try { #if !LEADTOOLS_V19_OR_LATER DialogResult res = _wiaSession.SelectDeviceDlg(this, WiaDeviceType.Default, WiaSelectSourceFlags.NoDefault); #else DialogResult res = _wiaSession.SelectDeviceDlg(this.Handle, WiaDeviceType.Default, WiaSelectSourceFlags.NoDefault); #endif // #if !LEADTOOLS_V19_OR_LATER if (res == DialogResult.OK) { _wiaSourceSelected = true; if (_wiaSession.SelectedDeviceType == WiaDeviceType.StreamingVideo) { _wiaVideoStreamSource = true; } else { _wiaVideoStreamSource = false; } } } catch (Exception ex) { _wiaSourceSelected = false; _wiaVideoStreamSource = false; Messager.ShowError(this, ex); } }
private void _miWiaSelectSource_Click(object sender, System.EventArgs e) { bool bTopMost = logWindow.TopMost; logWindow.TopMost = false; try { #if LEADTOOLS_V19_OR_LATER DialogResult res = _wiaSession.SelectDeviceDlg(this.Handle, WiaDeviceType.Default, WiaSelectSourceFlags.NoDefault); #else DialogResult res = _wiaSession.SelectDeviceDlg(this, WiaDeviceType.Default, WiaSelectSourceFlags.NoDefault); #endif // #if LEADTOOLS_V19_OR_LATER if (res == DialogResult.OK) { _mySettings._settings.wiaSelectedDevice = _wiaSession.GetSelectedDevice(); _wiaSourceSelected = true; _mySettings.Save(); } } catch (Exception ex) { _wiaSourceSelected = false; Messager.ShowError(this, ex); } logWindow.TopMost = bTopMost; }