private void webClient_DownloadTrainRoutesCompleted(object sender, DownloadStringCompletedEventArgs e) { try { string json = e.Result; if (!string.IsNullOrEmpty(json)) { RootStationObject rootStationObj = JsonConvert.DeserializeObject <RootStationObject>(json); stationList = rootStationObj.RESULTS.stationList; formatStationName(); if (stationList != null) { populateStations(); } } } catch (Exception ex) { RadMessageBox.ShowAsync("AW SNAP :-(", MessageBoxButtons.OK, "We are having trouble downloading data due to temporary server unavailability at the moment."); } this.busyIndicator.IsRunning = false; }
private void webClient_DownloadTrainRoutesCompleted(object sender, DownloadStringCompletedEventArgs e) { try { string json = e.Result; if (!string.IsNullOrEmpty(json)) { RootStationObject rootStationObj = JsonConvert.DeserializeObject <RootStationObject>(json); stationList = rootStationObj.RESULTS.stationList; formatStationName(); if (stationList != null) { populateStations(); } } } catch (Exception ex) { RadMessageBox.ShowAsync("Error!", MessageBoxButtons.OK, "Error retrieving information from server. Please check your internet connection and try again."); } }
private void webClient_DownloadTrainRoutesCompleted(object sender, DownloadStringCompletedEventArgs e) { try { string json = e.Result; if (!string.IsNullOrEmpty(json)) { RootStationObject rootStationObj = JsonConvert.DeserializeObject <RootStationObject>(json); stationList = rootStationObj.RESULTS.stationList; formatStationName(); if (stationList != null) { populateStations(); } } } catch (Exception ex) { populateOfflineStationList(); } }