コード例 #1
0
        /// <summary>
        /// opens the AviSynth preview for a given AviSynth script
        /// gets the properties of the video, registers the callbacks, updates the video bitrate (we know the lenght of the video now) and updates the commandline
        /// with the scriptname
        /// </summary>
        /// <param name="fileName">the AviSynth script to be opened</param>
        private void openAvisynthScript(string fileName)
        {
            if (this.player != null) // make sure only one preview window is open at all times
            {
                player.Close();
            }
            player   = new VideoPlayer();
            info.DAR = null; // to be sure to initialize DAR values
            bool videoLoaded = player.loadVideo(mainForm, fileName, PREVIEWTYPE.CREDITS, true);

            if (videoLoaded)
            {
                info.DAR   = info.DAR ?? player.File.Info.DAR;
                player.DAR = info.DAR;


                player.IntroCreditsFrameSet += new IntroCreditsFrameSetCallback(player_IntroCreditsFrameSet);
                player.Closed += new EventHandler(player_Closed);
                player.Show();
                if (mainForm.Settings.AlwaysOnTop)
                {
                    player.TopMost = true;
                }
            }
        }
コード例 #2
0
ファイル: ZonesControl.cs プロジェクト: huannguyenfit/MeGUI
 public void closePlayer()
 {
     if (player != null)
     {
         player.Close();
     }
 }
コード例 #3
0
 protected override void OnClosing(CancelEventArgs e)
 {
     if (player != null)
     {
         player.Close();
     }
     base.OnClosing(e);
 }
コード例 #4
0
 protected override void OnClosing(CancelEventArgs e)
 {
     MainForm.Instance.Settings.ChapterCreatorMinimumLength = (int)minimumTitleLength.Value;
     if (player != null)
     {
         player.Close();
     }
     base.OnClosing(e);
 }
コード例 #5
0
        /// <summary>
        /// opens the AviSynth preview for a given AviSynth script
        /// gets the properties of the video, registers the callbacks, updates the video bitrate (we know the lenght of the video now) and updates the commandline
        /// with the scriptname
        /// </summary>
        /// <param name="fileName">the AviSynth scrip to be opened</param>
        private void openAvisynthScript(string fileName)
        {
            if (this.player != null) // make sure only one preview window is open at all times
            {
                player.Close();
            }
            player = new VideoPlayer();
            bool videoLoaded = player.loadVideo(mainForm, fileName, PREVIEWTYPE.CREDITS, true);

            if (videoLoaded)
            {
                if (info.DARX < 1 || info.DARY < 1)
                {
                    info.DARX = player.File.DARX;
                    info.DARY = player.File.DARY;
                }
                player.PARX = info.DARX;
                player.PARY = info.DARY;
                player.IntroCreditsFrameSet += new IntroCreditsFrameSetCallback(player_IntroCreditsFrameSet);
                player.Closed += new EventHandler(player_Closed);
                player.Show();
            }
        }