private void SendAutomatedTweet() { string nextLocation = upcomingLocations.Items[0].ToString(); upcomingLocations.Items.RemoveAt(0); SendTweet(nextLocation); upcomingLocations.Items.Add(RandomPlaces.GetRandomLocation()); }
private void Window_Loaded(object sender, RoutedEventArgs e) { ResetTimeRemaining(); dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick); dispatcherTimer.Interval = TimerInterval; for (int i = 0; i < 10; i++) { upcomingLocations.Items.Add(RandomPlaces.GetRandomLocation()); } dispatcherTimer.Start(); }