Esempio n. 1
0
        private void OpenInputPassphraseDialog(IPoderosaForm form, AgentPrivateKey key)
        {
            Debug.Assert(!form.AsForm().InvokeRequired);
            InputPassphraseDialog dlg = new InputPassphraseDialog(key);

            dlg.ShowDialog(form.AsForm());
        }
Esempio n. 2
0
 private void AddListItem(AgentPrivateKey key)
 {
     ListViewItem li = new ListViewItem(key.FileName);
     li.SubItems.Add(ToStatusString(key));
     li.SubItems.Add(key.Key == null ? "" : key.Key.Comment);
     li.Tag = key;
     _list.Items.Add(li);
 }
Esempio n. 3
0
 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);
         }
     }
 }
Esempio n. 4
0
 private string ToStatusString(AgentPrivateKey key)
 {
     return key.Status == PrivateKeyStatus.OK ? "OK" : "";
 }
 public InputPassphraseDialog(AgentPrivateKey key) {
     _key = key;
     InitializeComponent();
     InitText();
 }
Esempio n. 6
0
 private void OpenInputPassphraseDialog(IPoderosaForm form, AgentPrivateKey key) {
     Debug.Assert(!form.AsForm().InvokeRequired);
     InputPassphraseDialog dlg = new InputPassphraseDialog(key);
     dlg.ShowDialog(form.AsForm());
 }