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();
 }
Exemplo 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));
        }
Exemplo n.º 3
0
        private ComAction LoadPlayVideo(IEnumerable<XAttribute> attributes)
        {
            var action = new PlayVideo();
            action.Type = ActionType.playVideo;

            foreach (var attr in attributes)
            {
                switch (attr.Name.ToString())
                {
                    case "targetObjectID":
                        action.TargetObjectId = Int32.Parse(attr.Value);
                        //(action.Video as IInteractive).Actions.Add(action); //TODO ne znam dal je ovo ok
                        break;
                }
            }

            return action;
        }