private void __welcomeTimer_Tick(object sender, object e) { try { if (fvWelcome.SelectedIndex < fvWelcome.Items.Count - 1) { fvWelcome.SelectedIndex++; FlpVOpacity.Seek(TimeSpan.Zero); } else { //_welcomeFade.Stop(); _welcomeTimer.Stop(); StartVideos(); } } catch (Exception ex) { WelcomeTextException2.Text = "I am at __welcomeTimer_Tick"; WelcomeTextException2.Text = ex.StackTrace.Substring(0) + "\n "; WelcomeTextException2.Text = "HResult :" + ex.HResult.ToString() + "\n "; WelcomeTextException2.Text += "InnerException :" + ex.InnerException + " \n "; WelcomeTextException2.Text += "Source :" + ex.Source + " \n "; WelcomeTextException2.Text += " linenum :" + ex.ToString() + " \n "; WelcomeTextException2.Text += "Message :" + ex.Message; } }
private void StartWelcomeGuest() { if (ListName.Count == 0) { VideoWithNoGuest(); } else { fv.Visibility = Visibility.Collapsed; mediaPlayer.Visibility = Visibility.Collapsed; WelcomeRelativePanelUserControl.Visibility = Visibility.Visible; fvWelcome.Visibility = Visibility.Visible; if (App.AddedGuest.Count > 0) { foreach (var item2 in App.AddedGuest) { if (item2 == "") { ListName.Remove(item2); } } ; } App.GuestFromService = App.GuestFromService.Distinct().ToList(); fvWelcome.ItemsSource = ListName.Distinct().ToList();; FlpVOpacity.Seek(TimeSpan.Zero); fvWelcome.SelectedIndex = 0; _welcomeTimer = new DispatcherTimer() { Interval = TimeSpan.FromSeconds(9) }; _welcomeTimer.Tick += __welcomeTimer_Tick; _welcomeTimer.Start(); } }