Example #1
0
        public void Edit()
        {
            var w = new AddListenVideoWindow
                {
                    VideoWin = {Title = "Uređivanje videa"},
                    MediaEL = {Source = Source, ScrubbingEnabled = true}
                };

            w.MediaEL.Play();
            w.MediaEL.Pause();
            w.btnPlay.IsEnabled = true;

            if (w.ShowDialog() != true) return;

            Source = w.TheElem.Source;
            ObjectName = Utilities.GiveUniqueName(Source);
            ObjectPath = w.ObjectPath;
            Width = w.TheElem.Width;
            Height = w.TheElem.Height;
            
            LoadedBehavior = MediaState.Manual;
            ScrubbingEnabled = true;
            StartPlaying();
            Pause();

            var mainWin = DesignerMainWindow.GetInstance();
            int currentSlideNr = mainWin.GetCurrentSlideNr();
            mainWin.canMainCanvas.SaveAllSlideData(Practice.GetInstance().GetSlideByPosition(currentSlideNr));
        }
Example #2
0
        public static Video NewVideo(bool autoplay)
        {
            var video = new Video(autoplay);
            var w = new AddListenVideoWindow();

            if (w.ShowDialog() != true) return null;

            var mainWin = DesignerMainWindow.GetInstance();
            Point currentMousePosition = mainWin.GetCurrentMousePosition();

            video.Source = w.TheElem.Source;
            video.Width = w.TheElem.Width;
            video.Height = w.TheElem.Height;
            video.ObjectName = Utilities.GiveUniqueName(video.Source);
            video.ObjectPath = w.ObjectPath;

            video.LoadedBehavior = MediaState.Manual;
            video.ScrubbingEnabled = true;
            video.StartPlaying();
            video.Pause();

            InkCanvas.SetTop(video, currentMousePosition.Y);
            InkCanvas.SetLeft(video, currentMousePosition.X);
            Panel.SetZIndex(video, Practice.GetInstance().GetSlideByPosition(mainWin.GetCurrentSlideNr()).SlideObjects.Count);

            return video;
        }