Exemple #1
0
        internal void Reset()
        {
            if (!mainWorker.IsBusy)
            {
                mainWorker.RunWorkerAsync();
            }

            if ((MyTelnetConnection != null) && (MyTelnetConnection.IsConnected()))
            {
                throw new Exception();
            }
        }
Exemple #2
0
        private void TelnetInit()
        {
            if (MyTelnetConnection == null)
            {
                MyTelnetConnection = new TelnetConnection(
                    Settings.Default.ONTIPADDRESS,
                    Settings.Default.ONTPORT
                    );
            }
            else
            {
                MyTelnetConnection.Disconnect();
                MyTelnetConnection.Connect();
            }

            if (MyTelnetConnection.IsConnected())
            {
                OnConnectedEvent(this, null);
            }
        }