private static void AddToElement(IInteractive element, EventType eventType) { var w = new JumpToSlideWindow(); if (w.ShowDialog() != true) return; var slideId = Practice.GetInstance().GetSlideByPosition(w.SelectedSlideIndex).SlideId; var action = new ChangeSlide(eventType, slideId, element.ObjectId); element.AddAction(action); var mainWin = DesignerMainWindow.GetInstance(); var currentSlideNr = mainWin.GetCurrentSlideNr(); mainWin.canMainCanvas.SaveAllSlideData(Practice.GetInstance().GetSlideByPosition(currentSlideNr)); }
private void btnChangeSlide_Click(object sender, RoutedEventArgs e) { var w = new JumpToSlideWindow(); if (w.ShowDialog() != true) return; int slideId = Practice.GetInstance().GetSlideByPosition(w.SelectedSlideIndex).SlideId; var cs = new ChangeSlide(_defaultEventType, slideId, _sourceObjectId); Act = cs; DialogResult = true; Close(); }
public static void CopyChosenSlide(this InkCanvas canvas, object sender, RoutedEventArgs e) { var win = new JumpToSlideWindow(); if (win.ShowDialog() == false) return; var mainWin = DesignerMainWindow.GetInstance(); Practice practice = Practice.GetInstance(); Slide originalSlide = practice.GetSlideByPosition(mainWin.GetCurrentSlideNr()); Slide chosenSlide = practice.GetSlideById(win.SelectedSlideId); chosenSlide.CopyInto(originalSlide); mainWin.canMainCanvas.ShowSlideContent(originalSlide); mainWin.RefreshCurrentThumbnail(); }
private void btnSuperAction_Click(object sender, RoutedEventArgs e) { var w = new JumpToSlideWindow(); if (w.ShowDialog() != true) return; var mainWin = DesignerMainWindow.GetInstance(); // int slideId = Practice.GetInstance().GetSlideByPosition(mainWin.GetCurrentSlideNr()).SlideId; int slideId = Practice.GetInstance().GetSlideByPosition(w.SelectedSlideIndex).SlideId; var act = new ChangeSlide(EventType.conditionSatisfied, slideId, w.SelectedSlideIndex); SuperAction = new SuperAction(slideId, act.ActionId, act); }