コード例 #1
0
        private void StartInternalVLCRenderer()
        {
            if (m_VideoPlaybackWindow != null)
            {
                if (m_VideoPlaybackWindow.CurrentState == Vlc.DotNet.Core.Interops.Signatures.MediaStates.Playing)
                {
                    return;
                }
                else if (m_VideoPlaybackWindow.CurrentState == Vlc.DotNet.Core.Interops.Signatures.MediaStates.Paused)
                {
                    m_VideoPlaybackWindow.Play();

                    return;
                }
            }

            try
            {
                m_VideoPlaybackWindow           = new VLCVideoPlaybackWindow();
                m_VideoPlaybackWindow.VideoFile = VideoFile;
                m_VideoPlaybackWindow.Volume    = SoundVolume * 100;
                m_VideoPlaybackWindow.Show();
                if (ScreenHandler.AllScreens > 1)
                {
                    m_VideoPlaybackWindow.ShowOnMonitor(1);
                }
                m_VideoPlaybackWindow.WindowState = WindowState.Maximized;
                m_VideoPlaybackWindow.Play();

                m_VideoPlaybackWindow.Closing += VideoPlaybackWindow_Closing;
                m_VideoPlaybackWindow.OnVolumeValueChanged += VideoPlaybackWindow_OnVolumeValueChanged;
                m_VideoPlaybackWindow.MediaEnded           += Player_MediaEnded;
                m_DispatcherTimer.Start();
            }
            catch (Exception initException)
            {
                Core.CommandHelper.LogNotify(String.Format("initException {0}", initException.Message), "Error Initializing Video Output");
                return;
            }
        }
コード例 #2
0
        private void MenuItemVLCVideotWindow_Click(object sender, RoutedEventArgs e)
        {
            var m_VideoPlaybackWindow = new VLCVideoPlaybackWindow();

            m_VideoPlaybackWindow.Show();
        }