/// <summary> /// Starts/stops application if needed :) /// </summary> private void OnStartStopClicked(object sender, object e) { Log4cs.Log("Start/stop is clicked..."); if (_radioThread == null) { _radioThread = new PageDownloaderThread(); _radioThread.SongParsed += new SongParsedDelegate(OnSongParsed); } // Stop thread if running if (_radioThread.IsRunning) { _radioThread.Stop(); } else { // Need to run thread _radioThread.Start(Settings.RadioStations); } }
/// <summary> /// Starts/stops application if needed :) /// </summary> private void OnStartStopClicked(object sender, object e) { Log4cs.Log("Start/stop is clicked..."); if( _radioThread == null ) { _radioThread = new PageDownloaderThread(); _radioThread.SongParsed += new SongParsedDelegate(OnSongParsed); } // Stop thread if running if(_radioThread.IsRunning) { _radioThread.Stop(); } else { // Need to run thread _radioThread.Start(Settings.RadioStations); } }