예제 #1
0
 private static void OnStatusUpdated(StatusUpdatedEventArgs e)
 {
     if (StatusUpdated != null)
     {
         StatusUpdated(typeof(CommunicationManager), e);
     }
 }
 void CommunicationManager_StatusUpdated(object sender, StatusUpdatedEventArgs e)
 {
     Dispatcher.Invoke(DispatcherPriority.Normal, (Action)(() =>
     {                
         VisualHelper.BindTarget(TweetsListView, ListViewItem.OpacityProperty);
     }));
 }
 private static void OnStatusUpdated(StatusUpdatedEventArgs e)
 {
     if (StatusUpdated != null)
     {
         StatusUpdated(typeof(CommunicationManager), e);
     }
 }
        void CommunicationManager_StatusUpdated(object sender, StatusUpdatedEventArgs e)
        {            
            Dispatcher.Invoke(DispatcherPriority.Normal, (Action)(() =>
            {
                if (e.StatusReceived.Length > 0)
                {                  
                    var balloon = new TweetsBalloon();
                    balloon.Title = "Updates";
                    balloon.Text = e.StatusReceived.Length + " new tweets.";                     
                    tb.ShowCustomBalloon(balloon, PopupAnimation.Slide, 5000);                    
                }

                LabelStatus.Content = String.Format("Last update at {0:HH:mm:ss} ({1} new tweets).", DateTime.Now, e.StatusReceived.Length);
                UpdateTweetsInfo();
            })); 
        }