/// <summary> /// Webservice download complete event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void webClient_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) { try { if (e.Error == null && e.Result != null) { conditionLeaflets = JsonHelper.Deserialize <ConditionLeafletsCollection>(e.Result); List <LeafletsGroup <ConditionLeafletsResponse> > DataSource = LeafletsGroup <ConditionLeafletsResponse> .CreateGroups(conditionLeaflets, System.Threading.Thread.CurrentThread.CurrentUICulture, (ConditionLeafletsResponse s) => { return(s.Title); }, true); objHomePanoramaViewModel.ProgressBarLeafletVisibilty = Visibility.Collapsed; objHomePanoramaViewModel.LeafletsCollection = DataSource; } } catch (Exception) { objHomePanoramaViewModel.ProgressBarLeafletVisibilty = Visibility.Collapsed; objHomePanoramaViewModel.LeafletNoInternetVisibility = Visibility.Visible; } }
/// <summary> /// Webservice download complete event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void webClient_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) { try { if (e.Error == null && e.Result != null) { conditionLeaflets = JsonHelper.Deserialize<ConditionLeafletsCollection>(e.Result); List<LeafletsGroup<ConditionLeafletsResponse>> DataSource = LeafletsGroup<ConditionLeafletsResponse>.CreateGroups(conditionLeaflets, System.Threading.Thread.CurrentThread.CurrentUICulture, (ConditionLeafletsResponse s) => { return s.Title; }, true); objHomePanoramaViewModel.ProgressBarLeafletVisibilty = Visibility.Collapsed; objHomePanoramaViewModel.LeafletsCollection = DataSource; } } catch (Exception) { objHomePanoramaViewModel.ProgressBarLeafletVisibilty = Visibility.Collapsed; objHomePanoramaViewModel.LeafletNoInternetVisibility = Visibility.Visible; } }