Ejemplo n.º 1
0
        public static ConnectionTag CreateNewConnection(SSHTerminalParam param, HostKeyCheckCallback keycheck)
        {
            SilentClient      s   = new SilentClient();
            SocketWithTimeout swt = StartNewConnection(s, param, param.Passphrase, keycheck);

            if (swt == null)
            {
                return(null);
            }
            else
            {
                return(s.Wait(swt));
            }
        }
Ejemplo n.º 2
0
            public ConnectionTag Wait(SocketWithTimeout swt)
            {
                _connector = swt;

                _event.WaitOne();
                _event.Close();

                if (_result == null)
                {
                    return(null);
                }
                else
                {
                    return(_result);
                }
            }
Ejemplo n.º 3
0
 public ConnectionTag Wait(SocketWithTimeout swt)
 {
     _connector = swt;
     //Form form = GEnv.Frame.AsForm();
     //if(form!=null) form.Cursor = Cursors.WaitCursor;
     _event.WaitOne();
     _event.Close();
     //if(form!=null) form.Cursor = Cursors.Default;
     if (_result == null)
     {
         //GUtil.Warning(GEnv.Frame, _errorMessage);
         //MessageBox.Show("error");
         return(null);
     }
     else
     {
         return(_result);
     }
 }
Ejemplo n.º 4
0
 public static ConnectionTag CreateNewConnection(TerminalParam param)
 {
     if (param is SerialTerminalParam)
     {
         return(CreateNewSerialConnection(GEnv.Frame, (SerialTerminalParam)param));
     }
     else if (param is LocalShellTerminalParam)
     {
         return(CreateNewLocalShellConnection(GEnv.Frame, (LocalShellTerminalParam)param));
     }
     else
     {
         SilentClient      s   = new SilentClient();
         SocketWithTimeout swt = StartNewConnection(s, (TCPTerminalParam)param, null, null);
         if (swt == null)
         {
             return(null);
         }
         else
         {
             return(s.Wait(swt));
         }
     }
 }
Ejemplo n.º 5
0
        private void OnOK(object sender, System.EventArgs e)
        {
            this.DialogResult = DialogResult.None;
            TCPTerminalParam param = ValidateContent();
            if(param==null) return;  //�p�����[�^�Ɍ�肪����Α��E�o

            _loginButton.Enabled = false;
            _cancelButton.Enabled = false;
            this.Cursor = Cursors.WaitCursor;
            this.Text = GApp.Strings.GetString("Caption.SSHShortcutLoginDialog.Connecting");

            HostKeyCheckCallback checker = new HostKeyCheckCallback(new HostKeyChecker(this, (SSHTerminalParam)param).CheckHostKeyCallback);
            _connector = CommunicationUtil.StartNewConnection(this, param, _passphraseBox.Text, checker);
            if(_connector==null) ClearConnectingState();
        }
Ejemplo n.º 6
0
 private void ClearConnectingState()
 {
     _loginButton.Enabled = true;
     _cancelButton.Enabled = true;
     this.Cursor = Cursors.Default;
     this.Text = GApp.Strings.GetString("Form.SSHShortcutLoginDialog.Text");
     _connector = null;
 }
Ejemplo n.º 7
0
 public ConnectionTag Wait(SocketWithTimeout swt)
 {
     _connector = swt;
     Form form = GEnv.Frame.AsForm();
     if(form!=null) form.Cursor = Cursors.WaitCursor;
     _event.WaitOne();
     _event.Close();
     if(form!=null) form.Cursor = Cursors.Default;
     if(_result==null) {
         GUtil.Warning(GEnv.Frame, _errorMessage);
         return null;
     }
     else
         return _result;
 }