Beispiel #1
0
        private void connectSSHToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //Poderosa.Forms.MultiPaneControl mc = new Poderosa.Forms.MultiPaneControl();
            //mc.Dock = DockStyle.Fill;
            //mc.BackColor = System.Drawing.Color.AliceBlue;
            //tabPage1.Controls.Add(mc);

            InitialAction a = new InitialAction();
            //Poderosa.Forms.GFrame frame = new Poderosa.Forms.GFrame(a);
            ConnectionHistory hst = GApp.ConnectionHistory;
            Poderosa.Forms.LoginDialog dlg = new Poderosa.Forms.LoginDialog();

            TCPTerminalParam param = hst.TopTCPParam;

            dlg.ApplyParam(param);
            dlg.StartPosition = FormStartPosition.CenterParent;

            //if (GCUtil.ShowModalDialog(_frame, dlg) == DialogResult.OK)
            //frame.Show();
            //GCUtil.ShowModalDialog(frame, dlg);
            //dlg.ShowDialog();
            dlg._hostBox.Text = "palm";
            dlg._methodBox.SelectedIndex = 2;
            dlg._portBox.Text = "22";
            dlg._userNameBox.Text = "bwilliam";
            dlg._passphraseBox.Text = "lkmj9u";
            dlg.OnOK(null, null);

            Connection.ConnectionTag ct = dlg.Result;
        }
Beispiel #2
0
        private void connectSSHToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //Poderosa.Forms.MultiPaneControl mc = new Poderosa.Forms.MultiPaneControl();
            //mc.Dock = DockStyle.Fill;
            //mc.BackColor = System.Drawing.Color.AliceBlue;
            //tabPage1.Controls.Add(mc);

            InitialAction a = new InitialAction();
            //Poderosa.Forms.GFrame frame = new Poderosa.Forms.GFrame(a);
            ConnectionHistory hst = GApp.ConnectionHistory;

            Poderosa.Forms.LoginDialog dlg = new Poderosa.Forms.LoginDialog();

            TCPTerminalParam param = hst.TopTCPParam;

            dlg.ApplyParam(param);
            dlg.StartPosition = FormStartPosition.CenterParent;

            //if (GCUtil.ShowModalDialog(_frame, dlg) == DialogResult.OK)
            //frame.Show();
            //GCUtil.ShowModalDialog(frame, dlg);
            //dlg.ShowDialog();
            dlg._hostBox.Text            = "palm";
            dlg._methodBox.SelectedIndex = 2;
            dlg._portBox.Text            = "22";
            dlg._userNameBox.Text        = "bwilliam";
            dlg._passphraseBox.Text      = "lkmj9u";
            dlg.OnOK(null, null);

            Connection.ConnectionTag ct = dlg.Result;
        }
        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;
        }