internal void Reset() { if (!mainWorker.IsBusy) { mainWorker.RunWorkerAsync(); } if ((MyTelnetConnection != null) && (MyTelnetConnection.IsConnected())) { throw new Exception(); } }
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); } }