private void OnClickKeyFileCreate(object sender, EventArgs e) { IOConnectionInfo ioc = m_ioInfo; bool bSecDesk = m_bSecureDesktop; GAction f = delegate() { KeyFileCreationForm dlg = new KeyFileCreationForm(); dlg.InitEx(ioc); DialogResult dr = dlg.ShowDialog(); if ((dr == DialogResult.OK) && !bSecDesk) { string strFile = dlg.ResultFile; if (!string.IsNullOrEmpty(strFile)) { m_cmbKeyFile.Items.Add(strFile); m_cmbKeyFile.SelectedIndex = m_cmbKeyFile.Items.Count - 1; UpdateUIState(); } else { Debug.Assert(false); } } UIUtil.DestroyForm(dlg); }; ProtectedDialog.ContinueOnNormalDesktop(f, this, ref m_fInvokeAfterClose, bSecDesk); }
private void OnClickKeyFileCreate(object sender, EventArgs e) { KeyFileCreationForm dlg = new KeyFileCreationForm(); dlg.InitEx(m_ioInfo); if (dlg.ShowDialog() == DialogResult.OK) { string strFile = dlg.ResultFile; if (!string.IsNullOrEmpty(strFile)) { m_cmbKeyFile.Items.Add(strFile); m_cmbKeyFile.SelectedIndex = m_cmbKeyFile.Items.Count - 1; } else { Debug.Assert(false); } } UIUtil.DestroyForm(dlg); EnableUserControls(); }