private void OnAddButton(object sender, System.EventArgs e) { string fn = TerminalUtil.SelectPrivateKeyFileByDialog(this); if (fn != null) { AgentPrivateKey key = new AgentPrivateKey(fn); if (key.GuessValidKeyFileOrWarn(this)) { InputPassphraseDialog dlg = new InputPassphraseDialog(key); if (dlg.ShowDialog(this) == DialogResult.OK) AddListItem(key); } } }
private void OnAddButton(object sender, System.EventArgs e) { string fn = TerminalUtil.SelectPrivateKeyFileByDialog(this); if (fn != null) { AgentPrivateKey key = new AgentPrivateKey(fn); if (key.GuessValidKeyFileOrWarn(this)) { InputPassphraseDialog dlg = new InputPassphraseDialog(key); if (dlg.ShowDialog(this) == DialogResult.OK) { AddListItem(key); } } } }
private void OnListDoubleClick(object sender, System.EventArgs e) { ListViewItem li = GetSelectedItem(); AgentPrivateKey key = li.Tag as AgentPrivateKey; Debug.Assert(key != null); if (key.Status == PrivateKeyStatus.OK) return; //���Ɋm�F�ς� if (key.GuessValidKeyFileOrWarn(this)) { InputPassphraseDialog dlg = new InputPassphraseDialog(key); if (dlg.ShowDialog(this) == DialogResult.OK) { li.SubItems[1].Text = ToStatusString(key); li.SubItems[2].Text = key.Key.Comment; Debug.Assert(key.Status == PrivateKeyStatus.OK); } } }
private void OnListDoubleClick(object sender, System.EventArgs e) { ListViewItem li = GetSelectedItem(); AgentPrivateKey key = li.Tag as AgentPrivateKey; Debug.Assert(key != null); if (key.Status == PrivateKeyStatus.OK) { return; //既に確認済み } if (key.GuessValidKeyFileOrWarn(this)) { InputPassphraseDialog dlg = new InputPassphraseDialog(key); if (dlg.ShowDialog(this) == DialogResult.OK) { li.SubItems[1].Text = ToStatusString(key); li.SubItems[2].Text = key.Key.Comment; Debug.Assert(key.Status == PrivateKeyStatus.OK); } } }
private void OpenInputPassphraseDialog(IPoderosaForm form, AgentPrivateKey key) { Debug.Assert(!form.AsForm().InvokeRequired); InputPassphraseDialog dlg = new InputPassphraseDialog(key); dlg.ShowDialog(form.AsForm()); }