コード例 #1
0
ファイル: PlayerWindow.cs プロジェクト: jober2014/MyCodes
        public void FormPlay(string path)
        {
            if (vlc_player_ == null)
            {
                vlc_player_ = new VlcPlayer(pluginPath);
            }

            if (!string.IsNullOrEmpty(path))
            {
                vlc_player_.PlayFile(path);
                trackBar1.SetRange(0, (int)vlc_player_.Duration());
                trackBar1.Value = 0;
                timer1.Start();
                is_playinig_ = true;
                this.Activate();
                button2.Text = "暂停";
            }
        }
コード例 #2
0
ファイル: PlayerWindow.cs プロジェクト: jober2014/MyCodes
        public PlayerWindow(String path)
        {
            InitializeComponent();
            vlc_player_ = new VlcPlayer(pluginPath);
            IntPtr render_wnd = this.panel1.Handle;

            vlc_player_.SetRenderWindow((int)render_wnd);
            is_playinig_           = false;
            this.trackBar2.Maximum = vlc_player_.GetVolume();
            int vol = vlc_player_.GetVolume();

            this.trackBar2.Value = vol / 2;
            vlc_player_.SetVolume(vol / 2);
            if (!string.IsNullOrEmpty(path))
            {
                FormPlay(path);
            }
            this.AllowDrop   = true;
            tbVideoTime.Text = "00:00:00/00:00:00";
        }