MainForm.cs
上传用户:szltgg
上传日期:2019-05-16
资源大小:604k
文件大小:2k
源码类别:

Telnet服务器

开发平台:

C#

  1. using System;
  2. using System.Collections;
  3. using System.IO;
  4. using System.Diagnostics;
  5. using System.Text;
  6. using System.Runtime.InteropServices;
  7. using System.Windows.Forms;
  8. using System.Xml;
  9. using Microsoft.Win32;
  10. using Poderosa.Connection;
  11. using Poderosa.ConnectionParam;
  12. using Poderosa.LocalShell;
  13. using Poderosa.Debugging;
  14. using Poderosa.Terminal;
  15. using Poderosa.Communication;
  16. using Poderosa.Text;
  17. using Poderosa.Config;
  18. using Poderosa.Forms;
  19. using Poderosa.Toolkit;
  20. namespace Poderosa
  21. {
  22.     public partial class MainForm : Form
  23.     {
  24.         public MainForm()
  25.         {
  26.             InitializeComponent();
  27.         }
  28.         private void connectSSHToolStripMenuItem_Click(object sender, EventArgs e)
  29.         {
  30.             //Poderosa.Forms.MultiPaneControl mc = new Poderosa.Forms.MultiPaneControl();
  31.             //mc.Dock = DockStyle.Fill;
  32.             //mc.BackColor = System.Drawing.Color.AliceBlue;
  33.             //tabPage1.Controls.Add(mc);
  34.             InitialAction a = new InitialAction();
  35.             //Poderosa.Forms.GFrame frame = new Poderosa.Forms.GFrame(a);
  36.             ConnectionHistory hst = GApp.ConnectionHistory;
  37.             Poderosa.Forms.LoginDialog dlg = new Poderosa.Forms.LoginDialog();
  38.             TCPTerminalParam param = hst.TopTCPParam;
  39.             dlg.ApplyParam(param);
  40.             dlg.StartPosition = FormStartPosition.CenterParent;
  41.             //if (GCUtil.ShowModalDialog(_frame, dlg) == DialogResult.OK)
  42.             //frame.Show();
  43.             //GCUtil.ShowModalDialog(frame, dlg);
  44.             //dlg.ShowDialog();
  45.             dlg._hostBox.Text = "palm";
  46.             dlg._methodBox.SelectedIndex = 2;
  47.             dlg._portBox.Text = "22";
  48.             dlg._userNameBox.Text = "bwilliam";
  49.             dlg._passphraseBox.Text = "lkmj9u";
  50.             dlg.OnOK(null, null);
  51.             Connection.ConnectionTag ct = dlg.Result;
  52.         }
  53.     }
  54. }