Esempio n. 1
0
 private void UninstallPreferences()
 {
     Console.WriteLine("BansheeRemoteListener: UninstallPreferences() called");
     bansheePrefs["RemoteControl"]["BansheeRemote"].Remove(port_pref);
     bansheePrefs["RemoteControl"].Remove(bansheePrefs["RemoteControl"].FindById("BansheeRemote"));
     bansheePrefs.Remove(bansheePrefs.FindById("RemoteControl"));
 }
        void IDisposable.Dispose()
        {
            _disposed = true;

            _prefs["RemoteControl"]["BansheeRemote"].Remove(_portPref);
            _prefs["RemoteControl"]["BansheeRemote"].Remove(_passIdPref);
            _prefs["RemoteControl"].Remove(_prefs["RemoteControl"].FindById("BansheeRemote"));
            _prefs.Remove(_prefs.FindById("RemoteControl"));

            ServiceManager.SourceManager.SourceRemoved += OnSourceRemoved;

            if (_listener != null)
            {
                try {
                    _listener.Close();
                } catch (Exception e) {
                    Log.Error("error while closing socket of remote listener: " + e.Message);
                }
            }
        }