예제 #1
0
파일: MediaKit.cs 프로젝트: whuczp1234/nova
        public void OnMouseUp(object sender, MouseButtonEventArgs e)
        {
            Point  p           = e.GetPosition(VideoImage);
            double pixelWidth  = VideoImage.Source.Width;
            double pixelHeight = VideoImage.Source.Height;
            double x           = pixelWidth * p.X / VideoImage.ActualWidth;
            double y           = pixelHeight * p.Y / VideoImage.ActualHeight;

            OnMediaMouseUp?.Invoke(this, x, y);
        }
예제 #2
0
 public void OnMouseUp(object sender, MouseButtonEventArgs e)
 {
     if (this.HasVideo)
     {
         Point  p           = e.GetPosition(this);
         double pixelWidth  = this.Width;
         double pixelHeight = this.Height;
         double x           = pixelWidth * p.X / this.ActualWidth;
         double y           = pixelHeight * p.Y / this.ActualHeight;
         OnMediaMouseUp?.Invoke(this, x, y);
     }
 }