Ejemplo n.º 1
0
        public void Cleanup()
        {
            _probe = null;

            _vp?.Dispose();
            _vp = null;
        }
Ejemplo n.º 2
0
        public void Cleanup()
        {
            _vp?.Dispose();
            _vp = null;

            _mediaInfo?.Dispose();
            _mediaInfo = null;

            _context = null;
        }
Ejemplo n.º 3
0
        public void View(string path, ContextObject context)
        {
            _vp = new ViewerPanel(context);

            context.ViewerContent = _vp;

            context.Title = $"{Path.GetFileName(path)}";

            _vp.LoadAndPlay(path, _mediaInfo);
        }
Ejemplo n.º 4
0
        public void Cleanup()
        {
            _vp?.Dispose();
            _vp = null;

            _det?.Dispose();
            _det = null;

            _context = null;
        }
Ejemplo n.º 5
0
        public void View(string path, ContextObject context)
        {
            _vp = new ViewerPanel(context, probe.HasVideo());

            context.ViewerContent = _vp;

            _vp.mediaElement.MediaOpened += MediaElement_MediaOpened;
            _vp.LoadAndPlay(path);

            context.Title = $"{Path.GetFileName(path)}";
        }
Ejemplo n.º 6
0
        public void Cleanup()
        {
            if (_vp != null)
            {
                _vp.mediaElement.VlcMediaPlayer.Opening -= MarkReady;
            }
            _vp?.Dispose();
            _vp = null;

            _context = null;
        }
Ejemplo n.º 7
0
        public void Cleanup()
        {
            if (_vp?.mediaElement != null)
            {
                _vp.mediaElement.MediaOpened -= MediaElement_MediaOpened;
            }

            _vp?.Dispose();
            _vp = null;

            _context = null;
        }
Ejemplo n.º 8
0
        public void View(string path, ContextObject context)
        {
            _vp = new ViewerPanel(context);

            context.ViewerContent = _vp;

            _vp.mediaElement.VlcMediaPlayer.Opening += MarkReady;

            _vp.LoadAndPlay(path);

            context.Title = $"{Path.GetFileName(path)}";
        }
Ejemplo n.º 9
0
        public void View(string path, ContextObject context)
        {
            _vp = new ViewerPanel(context);

            context.ViewerContent = _vp;

            _vp.LoadAndPlay(path);

            context.Title =
                $"{Path.GetFileName(path)} ({_vp.mediaElement.NaturalVideoWidth}×{_vp.mediaElement.NaturalVideoHeight})";
            context.IsBusy = false;
        }
Ejemplo n.º 10
0
        public void View(string path, ContextObject context)
        {
            _vp = new ViewerPanel(context);

            context.ViewerContent = _vp;

            _vp.mediaElement.VlcMediaPlayer.Opening += (sender, e) => context.IsBusy = false;

            _vp.LoadAndPlay(path);

            var info = _mediaSize == Size.Empty ? "Audio" : $"{_mediaSize.Width}×{_mediaSize.Height}";

            context.Title =
                $"{Path.GetFileName(path)} ({info})";
        }