示例#1
0
 public void StopAll()
 {
     for (int i = 0; i < gridMain.Children.Count; i++)
     {
         VideoPanelItem item = gridMain.Children[i] as VideoPanelItem;
         item?.PlayVideo(null);
     }
 }
示例#2
0
        public void Drop(DropInfo info)
        {
            _mouseOn  = false;
            _accepted = false;
            ResetAdorner();
            if (_videoMode != null)
            {
                _videoMode.Opacity = 1;
                _videoMode         = null;
            }
            string videoId = info.Data as string;

            if (videoId == null)
            {
                videoId = info.GetDataFromJson <string>();
            }
            if (videoId != null)
            {
                VideoPanelItem vpi = info.Target as VideoPanelItem;
                if (vpi != null)
                {
                    VideoPanelItem srcVpi = info.Source as VideoPanelItem;
                    if (srcVpi != null && !srcVpi.Equals(vpi) &&
                        !info.KeyStates.HasFlag(DragDropKeyStates.ControlKey))
                    {
                        //没有交换则直接设置ID。
                        if (!Exchange(srcVpi, vpi))
                        {
                            vpi.PlayVideo(videoId);
                            info.Effects = DragDropEffects.Copy;
                        }
                        else
                        {
                            info.Effects = DragDropEffects.Move;
                        }
                    }
                    else
                    {
                        vpi.PlayVideo(videoId);
                        info.Effects = DragDropEffects.Move;
                    }
                }
            }
        }
示例#3
0
 private void destoryVideoPanel(VideoPanelItem vpi)
 {
     vpi.PreviewMouseDown         -= Panel_PreviewMouseDown;
     vpi.ViewModel.SplitScreenNode = null;
     vpi.PlayVideo(null);
 }