private void OnGetClickStatsRPCCompleted(object sender, XMLRPCCompletedEventArgs <ClickDataPoint> args) { GetClickStatsRPC rpc = sender as GetClickStatsRPC; rpc.Completed -= OnGetClickStatsRPCCompleted; if (args.Cancelled) { } else if (null == args.Error) { HideStatControls(); clicksGrid.Visibility = Visibility.Visible; ObservableObjectCollection dataSource = Resources["clickStatsDataSource"] as ObservableObjectCollection; dataSource.Clear(); args.Items.ForEach(item => dataSource.Add(item)); } else { this.HandleException(args.Error); } loadingStatsProgressBar.Opacity = 0.0; }
private void RetrieveClicks() { GetClickStatsRPC rpc = new GetClickStatsRPC(App.MasterViewModel.CurrentBlog); rpc.StatisicPeriod = StatisticPeriod; rpc.Completed += OnGetClickStatsRPCCompleted; rpc.ExecuteAsync(); loadingStatsProgressBar.Opacity = 1.0; }