Пример #1
0
        public override void ProcessInStream(List<TOBEntityBase> inStreamList)
        {
            //This function is called whenever new feeds arrive
            foreach (TOBEntityBase tobEB in inStreamList)
            {
                if (tobEB.GetType() == typeof(Status))
                {
                    Status tempVar = (Status)tobEB;
                    tsd.AddFeedData(tempVar.UserProfile.ScreenName);
                }

                if (tobEB.GetType() == typeof(DirectMessage))
                {
                    DirectMessage tempDM = (DirectMessage)tobEB;
                    tsd.AddFeedData(tempDM.UserProfile.ScreenName);
                }
            }

            tsd.SortList();

            if (uc == null)
            {
                uc = CreateTweetStatsUC(tsd);
                AddControlToPanel(uc);
            }

            uc.SetItemSource(tsd.tweetStatsData);

            return;
        }
Пример #2
0
        //Create UC
        private TweetStatsUC CreateTweetStatsUC(TweetStatsData tsd)
        {
            TweetStatsUC newUC = null;

            //Needed to get into STA context.
            Action action = delegate()
            {
                newUC = new TweetStatsUC(tsd);
            };

            Application.Current.Dispatcher.Invoke(DispatcherPriority.Send, action);

            return newUC;
        }