Example #1
0
        public void StartTimelines()
        {
            if (_timers == null)
            {
                _timers = new Timers();
            }
            _timers.Add(Settings.Default.UseStreamingApi ? 180 : 70, (s, e) =>
            {
                try
                {
                    _timelinesModel.UpdateHome();
                    _timelinesModel.UpdateMentions();
                    _timelinesModel.UpdateDirectMessages();
                    _timelinesModel.UpdateFavorites();
                }
                catch (WebException ex)
                {
                    Trace.TraceError(ex.Message);
                }
            });

            _timers.Add(30, (s, e) => _timelinesModel.UpdateTimeStamps());

            if (Settings.Default.UseStreamingApi)
            {
                TwitterStream.User(_timelinesModel.CancellationToken);
            }
        }
Example #2
0
 public void StartTimelines()
 {
     if (_timers == null)
     {
         _timers = new Timers();
     }
     if (_timers.IsIntialized())
     {
         return;
     }
     Trace.TraceInformation("{ StartTimelines }");
     _timers.Add(Settings.Default.UseStreamingApi ? 180 : 70, (s, e) =>
     {
         try
         {
             _timelinesModel.UpdateHome();
             _timelinesModel.UpdateMentions();
             _timelinesModel.UpdateDirectMessages();
             _timelinesModel.UpdateFavorites();
         }
         catch (WebException ex)
         {
             Trace.TraceError(ex.Message);
         }
     });
     _timers.Add(30, (s, e) => _timelinesModel.UpdateTimeStamps());
     StartStreamingApi();
 }