Esempio n. 1
0
 internal void Import(TCPTerminalParam r)
 {
     base.Import(r);
     _host   = r._host;
     _port   = r._port;
     _method = r._method;
 }
Esempio n. 2
0
 internal TCPTerminalParam(TCPTerminalParam r)
     : base(r)
 {
     _host   = r._host;
     _port   = r._port;
     _method = r._method;
 }
Esempio n. 3
0
        ///
        ///
        ///
        public override bool Equals(object t_)
        {
            TCPTerminalParam t = t_ as TCPTerminalParam;

            if (t == null)
            {
                return(false);
            }

            return(base.Equals(t) && _host == t.Host && _port == t.Port && _method == t.Method);
        }
Esempio n. 4
0
 internal void Import(TCPTerminalParam r)
 {
     base.Import(r);
     _host = r._host;
     _port = r._port;
     _method = r._method;
 }
Esempio n. 5
0
 internal TCPTerminalParam(TCPTerminalParam r)
     : base(r)
 {
     _host = r._host;
     _port = r._port;
     _method = r._method;
 }
        public CommandResult NewConnectionWithDialog(TCPTerminalParam param)
        {
            if(!CheckPaneCount()) return CommandResult.Denied;

            ConnectionHistory hst = GApp.ConnectionHistory;
            LoginDialog dlg = new LoginDialog();
            if(param!=null)
                dlg.ApplyParam(param);
            else
                dlg.ApplyParam(hst.TopTCPParam);

            if(GCUtil.ShowModalDialog(_frame, dlg)==DialogResult.OK) { //�_�C�A���O��o���Ȃ��Ȃ疳����Őڑ���J��
                AddNewTerminal(dlg.Result);
                return CommandResult.Success;
            }
            else
                return CommandResult.Cancelled;
        }
Esempio n. 7
0
 public SSHTerminalConnection(TCPTerminalParam p, int width, int height)
     : base(p, width, height)
 {
 }
Esempio n. 8
0
        /// <summary>
        /// ������TCPTerminalParam�̓�e��UI��ݒ肷��
        /// </summary>
        public void ApplyParam(TCPTerminalParam param)
        {
            _initializing = true;
            _methodBox.SelectedIndex = (int)param.Method;
            _portBox.SelectedIndex = _portBox.FindStringExact(PortDescription(param.Port));
            _methodBox.SelectedIndex = _methodBox.FindStringExact(param.Method.ToString());
            if(param.IsSSH) {
                SSHTerminalParam sp = (SSHTerminalParam)param;
                _userNameBox.SelectedIndex = _userNameBox.FindStringExact(sp.Account);
                _passphraseBox.Text = sp.Passphrase;

                if(sp.AuthType==AuthType.PublicKey)
                    _privateKeyFile.Text = sp.IdentityFile;
                else
                    _privateKeyFile.Text = "";
                _authOptions.SelectedIndex = (int)sp.AuthType;
            }

            _encodingBox.SelectedIndex = (int)param.EncodingProfile.Type;
            _newLineBox.SelectedIndex = (int)param.TransmitNL;
            _localEchoBox.SelectedIndex = param.LocalEcho? 1 : 0;
            _terminalTypeBox.SelectedIndex = (int)param.TerminalType;
            _initializing = false;

            EnableValidControls();
        }
Esempio n. 9
0
        public static SocketWithTimeout StartNewConnection(ISocketWithTimeoutClient client, TCPTerminalParam param, string password, HostKeyCheckCallback keycheck)
        {
            Size sz = GEnv.Frame.TerminalSizeForNextConnection;

            SocketWithTimeout swt;
            if(param.Method==ConnectionMethod.Telnet) { //Telnet
                swt = new TelnetConnector((TelnetTerminalParam)param, sz);
            }
            else { //SSH
                swt = new SSHConnector((SSHTerminalParam)param, sz, password, keycheck);
            }

            if(GEnv.Options.UseSocks)
                swt.AsyncConnect(client, CreateSocksParam(param.Host, param.Port));
            else
                swt.AsyncConnect(client, param.Host, param.Port);
            return swt;
        }