public override void _presenter_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { //timeCount.Reset(); //timeCount.Start(); _inkCanvas.CaptureMouse(); _startPoint = e.GetPosition(_inkCanvas); _prePoint = _startPoint; //inkCanvasSpiralSummarizationMargin = ((InkCanvas)_inkCanvas.Children[0]).Margin; //_startPoint.X -= inkCanvasSpiralSummarizationMargin.Left; // _startPoint.Y -= inkCanvasSpiralSummarizationMargin.Top; //记录操作类型与持续时间 recordOperateTrace("DOWN..........................................Down"); downTime = System.DateTime.Now; //if (videoSummarization == null || videoSummarization != _inkCollector.VideoSummarization) //{ // this.videoSummarization = _inkCollector.VideoSummarization; //} startIndex = VideoSummarization.getSelectedKeyFrameIndex(_startPoint);//, videoSummarization); if (mouseGesture == null && _inkCollector.DefaultSummarizationNum == 0) { createGesture(); } if (_inkCollector.DefaultSummarizationNum == 0) { mouseGesture.StartCapture((int)_startPoint.X, (int)_startPoint.Y); } if (moveStroke != null) { _inkCanvas.Strokes.Remove(moveStroke); moveStroke = null; } }
public override void _presenter_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { _inkCanvas.CaptureMouse(); _startPoint = e.GetPosition(_inkCanvas); _prePoint = _startPoint; //记录操作类型与持续时间 recordOperateTrace("TapestryDOWN"); downTime = System.DateTime.Now; startIndex = VideoSummarization.getSelectedKeyFrameIndex(_startPoint); }
/// <summary> /// 单击超链接图片,视频进行跳转 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void hyperLinkPlayer_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { VideoSummarizationTool.locateMediaPlayer(VideoSummarizationControl.mediaPlayer, hyperLink); videoSummarization.hideSummarization(); hyperLinkSpiralSummarization.showSpiralSummarization(); _inkCollector.VideoSummarization = hyperLinkSpiralSummarization; videoSummarization = hyperLinkSpiralSummarization; //_inkCollector.KeyFrames = _inkCollector.VideoSummarization.KeyFrames; _inkCollector.VideoSummarization.InkCanvas.Margin = new Thickness(0, 0, 0, 0); videoSummarization = hyperLinkSpiralSummarization; VideoSummarizationControl.hyperLinkPlayer.Visibility = Visibility.Collapsed; }
//增加滚轴事件,为显示不同级别的聚类关键帧 void _inkCanvas_MouseWheel(object sender, MouseWheelEventArgs e) { if (GlobalValues.PartitionShowTypeNo == 0) { Point point = e.GetPosition(_inkCanvas); int currIndex = VideoSummarization.getSelectedKeyFrameIndex(point); List <int> distance1BunchNo = ((SpiralSummarization)videoSummarization).getDistanceBunchNo(currIndex); //处理滚轴事件 //int currBunchNo = videoSummarization.ShowKeyFrames[currIndex].BunchNo; if (e.Delta < 0)//向下滚动 { for (int i = 0; i < videoSummarization.ShowKeyFrames.Count; i++) { if (distance1BunchNo.IndexOf(videoSummarization.ShowKeyFrames[i].BunchNo) != -1) { videoSummarization.ShowKeyFrames[i].Image.Visibility = Visibility.Visible; videoSummarization.ShowKeyFrames[i].GrayImage.Visibility = Visibility.Hidden; } } } else { for (int i = 0; i < videoSummarization.ShowKeyFrames.Count; i++) { if (distance1BunchNo.IndexOf(videoSummarization.ShowKeyFrames[i].BunchNo) != -1) { videoSummarization.ShowKeyFrames[i].Image.Visibility = Visibility.Hidden; videoSummarization.ShowKeyFrames[i].GrayImage.Visibility = Visibility.Visible; } } } } else { if (e.Delta < 0)//向下滚动 { ((SpiralSummarization)videoSummarization).showDistance1(); } else { ((SpiralSummarization)videoSummarization).hiddenDistance1(); } } }
public override void _presenter_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { _inkCanvas.CaptureMouse(); _startPoint = e.GetPosition(_inkCanvas); _prePoint = _startPoint; //记录操作类型与持续时间 recordOperateTrace("DOWN"); downTime = System.DateTime.Now; startIndex = VideoSummarization.getSelectedKeyFrameIndex(_startPoint);//, videoSummarization); if (startIndex == int.MinValue && mouseGesture == null) { createGesture(); } if (startIndex == int.MinValue) { mouseGesture.StartCapture((int)_startPoint.X, (int)_startPoint.Y); } if (moveStroke != null) { _inkCanvas.Strokes.Remove(moveStroke); moveStroke = null; } }
public InkState_AddKeyFrameAnnotationDouble(InkCollector inkCollector) : base(inkCollector) { this._inkCollector = inkCollector; this.videoSummarization = inkCollector.VideoSummarization; }