private void btnPlayVideo_Click(object sender, RoutedEventArgs e)
 {
     var win = new AddPlayVideoActionWindow();
     if (win.ShowDialog() != true) return;
     Video vid = win.Video;
     var pv = new PlayVideo(_defaultEventType, _sourceObjectId, vid.ObjectId);
     Act = pv;
     DialogResult = true;
     Close();
 }
Esempio n. 2
0
        public static void AddToElement(IInteractive element, EventType eventType)
        {
            var win = new AddPlayVideoActionWindow();
            if (win.ShowDialog() != true) return;

            Video vid = win.Video;
            var action = new PlayVideo(eventType, element.ObjectId, vid.ObjectId);
            element.AddAction(action);

            DesignerMainWindow mainWin = DesignerMainWindow.GetInstance();
            int currentSlideNr = mainWin.GetCurrentSlideNr();
            mainWin.canMainCanvas.SaveAllSlideData(Practice.GetInstance().GetSlideByPosition(currentSlideNr));
        }