public ErrorItemViewModel(CompletedEventArgs e)
 {
     this.CompletedEventArgs = e;
 }
 public static ErrorItemViewModel FromCompletion(CompletedEventArgs e)
 {
     if (null == e || null == e.Error) return null;
     return new ErrorItemViewModel(e);
 }
 public CoreDataLoadedMessage(object sender, CompletedEventArgs sessionArg, CompletedEventArgs speakerArgs)
     : base(sender, "CoreDataLoaded")
 {
     this.SessionCompletedInfo = sessionArg;
     this.SpeakerCompletedInfo = speakerArgs;
 }
Ejemplo n.º 4
0
        private void AfterMapDataLoaded(CompletedEventArgs e)
        {
            this.Location = new GeoCoordinate(_mapService.ConferenceLocation.Latitude,
                _mapService.ConferenceLocation.Longitude);

            var points = new ObservableCollection<MapPointItemViewModel>();
            _mapService.Data.OrderBy(x=> x.Label).ToList().ForEach(p=> points.Add(new MapPointItemViewModel(p, this)));

            this.MapPoints = points;
            this.SelectedJumpToPoint = MapPoints.Single(x => x.Label == _mapService.ConferenceLocation.Label);
        }
        protected void SetResult(IEnumerable<int> sessionIds, CompletedEventArgs e = null)
        {
            // currently null == not complete which isn't ideal but can change later
            // really this is only for error situations
            if (null == sessionIds)
                sessionIds = new List<int>();

            _parentViewModel.SetResult(sessionIds, e);
        }
        public void SetResult(IEnumerable<int> sessionIds, CompletedEventArgs e = null)
        {
            this.Error = (null == e || null == e.Error) ? null : new ErrorItemViewModel(e);
            this.SessionIds = sessionIds;

            //this.SetBusy(false); // no
        }
        private void SearchComplete(CompletedEventArgs e)
        {
            var result = _twitterSearchService.Result;
            var items = new ObservableCollection<TweetItemViewModel>();

            if (result != null && result.Tweets != null)
                result.Tweets.ForEach(t => items.Add(TweetItemViewModel.CreateTweetItem(t)));

            this.TweetItems = items;
            this.Invalidated = false;
            this.LastLoaded = DateTime.Now;
            this.LastSearchText = this.SearchText;
            this.SetBusy(false);

            this.Error = (null == e.Error) ? null : new ErrorItemViewModel(e);
        }