private void Disconnect() { if (_iRemote != null) { _iRemote.addTVEvent -= _iRemote_addTVEvent; _iRemote.removeTVEvent -= iRemote_removeTVEvent; _iRemote.disconnect(); _iRemote = null; } }
private void Connect() { if (_iRemote == null) { _iRemote = new iRemote(); _iRemote.addTVEvent += new Auto3D.Samsung.iRemoteWrapper.iRemote.AddTVEventHandler(_iRemote_addTVEvent); _iRemote.removeTVEvent += new Auto3D.Samsung.iRemoteWrapper.iRemote.RemoveTVEventHandler(iRemote_removeTVEvent); } }