示例#1
0
文件: Plugin.cs 项目: zyhh/QuickLook
        public void Cleanup()
        {
            _probe = null;

            _vp?.Dispose();
            _vp = null;
        }
示例#2
0
        public void Cleanup()
        {
            _vp?.Dispose();
            _vp = null;

            _mediaInfo?.Dispose();
            _mediaInfo = null;

            _context = null;
        }
示例#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);
        }
示例#4
0
        public void Cleanup()
        {
            _vp?.Dispose();
            _vp = null;

            _det?.Dispose();
            _det = null;

            _context = null;
        }
示例#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)}";
        }
示例#6
0
        public void Cleanup()
        {
            if (_vp != null)
            {
                _vp.mediaElement.VlcMediaPlayer.Opening -= MarkReady;
            }
            _vp?.Dispose();
            _vp = null;

            _context = null;
        }
示例#7
0
        public void Cleanup()
        {
            if (_vp?.mediaElement != null)
            {
                _vp.mediaElement.MediaOpened -= MediaElement_MediaOpened;
            }

            _vp?.Dispose();
            _vp = null;

            _context = null;
        }
示例#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)}";
        }
示例#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;
        }
示例#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})";
        }