static void Main( ) { if (!Support.SetLicense()) { return; } using (WiaVersionForm WiaVersionDlg = new WiaVersionForm()) { if (WiaVersionDlg.ShowDialog() == DialogResult.OK) { _wiaVersion = WiaVersionDlg._selectedWiaVersion; } else { return; } } Application.Run(new MainForm()); }
private void _miWiaVersion_Click(object sender, EventArgs e) { bool bTopMost = logWindow.TopMost; logWindow.TopMost = false; try { using (WiaVersionForm WiaVersionDlg = new WiaVersionForm()) { if (WiaVersionDlg.ShowDialog() == DialogResult.OK) { _wiaVersion = WiaVersionDlg._selectedWiaVersion; _mySettings._settings.wiaVersion = (int)_wiaVersion; _mySettings.Save(); InitializeWia(); } } } catch { } logWindow.TopMost = bTopMost; }