Exemplo n.º 1
0
 /// <summary>
 /// Wait for some text to appear at the specified location
 /// </summary>
 /// <param name="x"></param>
 /// <param name="y"></param>
 /// <param name="text"></param>
 /// <param name="timeoutMS"></param>
 /// <returns></returns>
 private void currentConnection_OnDisconnect(TNEmulator where, string Reason)
 {
     if (this.Disconnected != null)
     {
         this.Disconnected(this, Reason);
     }
 }
Exemplo n.º 2
0
        public void Connect()
        {
            emu = new TNEmulator();
            emu.Disconnected += emu_Disconnected;
            emu.CursorLocationChanged += emu_CursorLocationChanged;
            emu.ScreenContentChanged += emu_ScreenContentChanged;

            //Retrieve host settings
            emu.Config.HostName = Properties.Settings.Default.Hostname;
            emu.Config.HostPort = Properties.Settings.Default.HostPort;
            emu.Config.TermType = Properties.Settings.Default.TerminalType;
            emu.Config.UseSSL = Properties.Settings.Default.UseSSL;
            if (!String.IsNullOrEmpty(Properties.Settings.Default.LUName))
            {
                emu.Config.HostLU = Properties.Settings.Default.LUName;
            }
            emu.Config.ThrowExceptionOnLockedScreen = false;
            emu.Config.FastScreenMode = true;

            //Begin the connection process asynchomously
            this.IsConnecting = true;
            //ConnectToHost();
            worker.RunWorkerAsync();
            /*Task.Factory.StartNew(ConnectToHost).ContinueWith((t) =>
                {
                    //Update the display when we are finished connecting
                    this.IsConnecting = false;
                    this.IsConnected = emu.IsConnected;
                    //callRedraw();
                    //this.ScreenText = emu.CurrentScreenObject.Dump();
                    //Refresh();
                });*/
        }
Exemplo n.º 3
0
 public Terminal(string Host, int Port, string TermType, bool RequireSSl, int RowsCount, int ColumnsCount, MainFrameDriver mdriver)
 {
     this.emu = new TNEmulator();
     this.emu.Disconnected   += emu_Disconnected;
     this.emu.Config.HostName = Host;
     this.emu.Config.HostPort = Port;
     this.emu.Config.TermType = TermType;
     this.emu.Config.UseSSL   = RequireSSl;
     emu.Config.RowsCount     = RowsCount;
     emu.Config.ColumnsCount  = ColumnsCount;
     MFDriver = mdriver;
 }
Exemplo n.º 4
0
 public Terminal()
 {
     this.emu = new TNEmulator();
     this.emu.Disconnected          += emu_Disconnected;
     this.emu.CursorLocationChanged += emu_CursorLocationChanged;
 }