private void handlePhotoLoadProgress(object sender, PhotoLoadEventArgs e) { _allImageData = e.finalList; _pullNewPhotos = false; // Dispatch the latest list up so the main app has a copy of it if (incomingPhotoList != null) { PhotoListStateEventArgs newArgs = new PhotoListStateEventArgs(false, e.finalList); incomingPhotoList(this, newArgs); } // Pick a random image to display first selectRandomImage(); // Transition the first set of images on starting the process loadNewImages(); // transition them on - events handle the rest showNewImages(); }
public void confirmDenyPhoto(bool _yesNo) { //7/28/2013 - There is a System.ArgumentException that can occurr here on a dependency property not 100% on what is causing it yet. // submission is not affected but it is related to a double animation. I expect from daHeight or daFHeight // It is also possible that this could be called immediately twice in a row with yes or no..so be careful...So a left and right hand // simultaniously activate or two players activate at the same time..so two of the same. if (_confirmDenyTransitioning == false) { try { // Hide the yes and no buttons DoubleAnimation daHeight = new DoubleAnimation(Canvas.GetTop(contentBorder) + contentBorder.ActualHeight + 50, (GlobalConfiguration.currentScreenH + btnStack.ActualHeight + 30), new Duration(TimeSpan.FromSeconds(0.3))); // Slide the background selection back in DoubleAnimation daFHeight = new DoubleAnimation((GlobalConfiguration.currentScreenW + 50), (GlobalConfiguration.currentScreenW / 2 - stackBGs.ActualWidth / 2), new Duration(TimeSpan.FromSeconds(0.3))); SineEase ease = new SineEase(); ease.EasingMode = EasingMode.EaseIn; daHeight.EasingFunction = ease; daFHeight.EasingFunction = ease; daFHeight.BeginTime = TimeSpan.FromSeconds(0.2); btnStack.BeginAnimation(Canvas.TopProperty, daHeight); stackBGs.BeginAnimation(Canvas.LeftProperty, daFHeight); //btnYes.BeginAnimation(Button.MarginProperty // Show take photo daOpacity.Completed += showTakePhotoCompleted; _confirmDenyTransitioning = true; txtTakePhoto.Text = "TAKE PHOTO"; txtTakePhoto.BeginAnimation(TextBlock.OpacityProperty, daOpacity); txtStartCountdown.BeginAnimation(TextBlock.OpacityProperty, daOpacity); takePhoto.BeginAnimation(Image.OpacityProperty, daOpacity); } catch (ArgumentException aEx) { System.Diagnostics.Debug.WriteLine("SectionPhoto - configmDenyPhoto argument exception: " + aEx.Message); } if (_yesNo == true) { // Captions requestNewCaption(ApplicationStates.STATE_PHOTO_SUBMITTED, false); saveImageFrame(); // Ensure the main knows it needs to update the photo list in attract next time if (requestNewPhotoList != null) { PhotoListStateEventArgs newArgs = new PhotoListStateEventArgs(true, null); requestNewPhotoList(this, newArgs); } } else { // Captions requestNewCaption(ApplicationStates.STATE_PHOTO_DESTROYED, false); } // Save photo or not, we can unfreese the video here. Saving is done in a background worker if (gsView != null) { gsView.freezePhotoOrNot(false); } } }
/// <summary> /// All main sections dispatch to this to update the state of the attracts photo list. /// If users submit a new photo in the photo section, this will update to let the /// attract section know it needs to pull new photos. /// /// Once the attract section pulls the latest photos, it then updates here to /// signify it has the most recent photos /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void handlePhotoListStateUpdate(object sender, PhotoListStateEventArgs e) { _triggerPhotoRefresh = e.newState; if (e.photoList != null) { _primaryPhotoReference = e.photoList; } }