public void Disconnect() { if (_Connected) { Log.ConncetionSuccesful = true; VpnManagerDal.UpdateLog(Log); } _connetion.Disconnect(); }
private void _connetion_Info(eConnectionState state) { try { ConnectionChanged(state); if (state == eConnectionState.Disconnected) { _connetion = null; ConnectToClient = null; _Connected = false; Log.ConncetionSuccesful = true; VpnManagerDal.UpdateLog(Log); tTimeout.Abort(); tTimeout = null; } else if (state == eConnectionState.Connected) { _Connected = true; } } catch { } }