示例#1
0
文件: Form1.cs 项目: rutapon/vss
 void Events_PlayerPositionChanged(object sender, MediaPlayerPositionChanged e)
 {
     UISync.Execute(() => trackBar1.Value = (int)(e.NewPosition * 100));
 }
示例#2
0
 private void EventsPlayerPositionChanged(object sender, MediaPlayerPositionChanged e)
 {
     Size size = _player.GetVideoSize(0);
     if (!size.IsEmpty)
     {
         _player.Events.PlayerPositionChanged -= EventsPlayerPositionChanged;
         _player.Events.PlayerEncounteredError -= EventsPlayerEncounteredError;
         UISync.Execute(() => SetVideoSize(size));
         UISync.Execute(StopPlayer);
         UISync.Execute(() => btnGetStreamSize.Enabled = true);
     }
 }
示例#3
0
 void Events_PlayerPositionChanged(object sender, MediaPlayerPositionChanged e)
 {
     this.Dispatcher.BeginInvoke(new Action(delegate
     {
         if (!m_isDrag)
         {
             slider1.Value = (double)e.NewPosition;
         }
     }));
 }
示例#4
0
文件: PlayerForm.cs 项目: vmail/main
        void EventsPlayerPositionChanged(object sender, MediaPlayerPositionChanged e)
        {
            var newpos = (int) (e.NewPosition*100);
            if (newpos<0)
                newpos = 0;
            if (newpos>100)
                newpos = 100;
            UISync.Execute(() => vNav.Value = newpos);
            if (_needsSize)
            {
                Size sz = _mPlayer.GetVideoSize(0);
                if (sz.Width > 0)
                {
                    if (sz.Width < 320)
                        sz.Width = 320;
                    if (sz.Height < 240)
                        sz.Height = 240;

                    if (Width != sz.Width)
                        UISync.Execute(() => Width = sz.Width);
                    if (Height != sz.Height + tableLayoutPanel1.Height)
                        UISync.Execute(() => Height = sz.Height + tableLayoutPanel1.Height);
                    _needsSize = false;
                }
            }
        }
示例#5
0
 private void Events_PlayerPositionChanged(object sender, MediaPlayerPositionChanged e)
 {
     this.Dispatcher.BeginInvoke(new Action(delegate { process.Value = (double) e.NewPosition*100; }));
 }