Beispiel #1
0
        public RasProperties(IHostingForm parentForm, RASConnection rasConnection)
        {
            this.RasConnection = rasConnection;
            this.ParentForm    = parentForm;
            this.InitializeComponent();

            if (parentForm.InvokeRequired)
            {
                parentForm.Invoke(new MethodInvoker(delegate
                {
                    this.timer = new Timer {
                        Interval = 2000
                    };
                    this.timer.Tick += this.timer_Tick;
                    this.timer.Start();
                }));
            }
            else
            {
                this.timer = new Timer {
                    Interval = 2000
                };
                this.timer.Tick += this.timer_Tick;
                this.timer.Start();
            }
        }
 public static IConnection CreateConnection(FavoriteConfigurationElement Favorite, TerminalTabControlItem TerminalTabPage, MainForm parentForm)
 {
     IConnection conn = null; ;
     switch (Favorite.Protocol) {
         case "VNC":
             conn = new VNCConnection();
             break;
         case "VMRC":
             conn = new VMRCConnection();
             break;
         case "RAS":
             conn = new RASConnection();
             break;
         case "Telnet":
             conn = new TerminalConnection();
             break;
         case "ICA Citrix":
             conn = new ICAConnection();
             break;
         case "HTTP":
             conn = new HTTPConnection();
             break;
         case "HTTPS":
             conn = new HTTPConnection();
             break;
         default:
             conn = new RDPConnection();
             break;
     }
     conn.Favorite = Favorite;
     TerminalTabPage.Connection = conn;
     conn.TerminalTabPage = TerminalTabPage;
     conn.ParentForm = parentForm;
     return conn;
 }
        public static IConnection CreateConnection(FavoriteConfigurationElement Favorite, TerminalTabControlItem TerminalTabPage, MainForm parentForm)
        {
            IConnection conn = null;;

            switch (Favorite.Protocol)
            {
            case "VNC":
                conn = new VNCConnection();
                break;

            case "VMRC":
                conn = new VMRCConnection();
                break;

            case "RAS":
                conn = new RASConnection();
                break;

            case "Telnet":
                conn = new TerminalConnection();
                break;

            case "ICA Citrix":
                conn = new ICAConnection();
                break;

            case "HTTP":
                conn = new HTTPConnection();
                break;

            case "HTTPS":
                conn = new HTTPConnection();
                break;

            default:
                conn = new RDPConnection();
                break;
            }
            conn.Favorite = Favorite;
            TerminalTabPage.Connection = conn;
            conn.TerminalTabPage       = TerminalTabPage;
            conn.ParentForm            = parentForm;
            return(conn);
        }
Beispiel #4
0
        public RasProperties(IHostingForm parentForm, RASConnection rasConnection)
        {
            this.RasConnection = rasConnection;
            this.ParentForm = parentForm;
            this.InitializeComponent();

            if (parentForm.InvokeRequired)
                parentForm.Invoke(new MethodInvoker(delegate
                {
                    this.timer = new Timer { Interval = 2000 };
                    this.timer.Tick += this.timer_Tick;
                    this.timer.Start();
                }));
            else
            {
                this.timer = new Timer { Interval = 2000 };
                this.timer.Tick += this.timer_Tick;
                this.timer.Start();
            }
        }
Beispiel #5
0
 public void Disconnect()
 {
     t.Stop();
     RASConnection.Disconnect();
 }
Beispiel #6
0
 public bool Connect()
 {
     return(RASConnection.Connect());
 }
Beispiel #7
0
 public void Disconnect()
 {
     this.timer.Stop();
     RASConnection.Disconnect();
 }