领胜LDS 键盘AOI检测项目
wells.liu
2020-07-06 99587d3c26f5b952cb7dc87a56be91b08c5d277b
src/Bro.UI.Model.Winform/UI/Canvas.cs
@@ -77,22 +77,26 @@
            set => stsStatus.Visible = value;
        }
        private void OnMouseLocationUpdated(Point screenPoint, Point imagePoint)
        private async void OnMouseLocationUpdated(Point screenPoint, Point imagePoint, string colorDesc)
        {
            MouseLocationUpdated(screenPoint, imagePoint);
            //await Task.Run(() => tsslLocation.Text = $"屏幕坐标X:{screenPoint.X},Y:{screenPoint.Y}    图片坐标X:{imagePoint.X},Y:{imagePoint.Y}   颜色:{colorDesc}");
            this.Invoke(new Action(() =>
            {
                tsslLocation.Text = $"屏幕坐标X:{screenPoint.X},Y:{screenPoint.Y}    图片坐标X:{imagePoint.X},Y:{imagePoint.Y}   颜色:{colorDesc}";
            }));
        }
        private void MouseLocationUpdated(Point screenPoint, Point imagePoint)
        {
            if (InvokeRequired)
            {
                Invoke(new Action<Point, Point>(MouseLocationUpdated), screenPoint, imagePoint);
            }
            else
            {
                tsslLocation.Text = $"屏幕坐标X:{screenPoint.X},Y:{screenPoint.Y}    图片坐标X:{imagePoint.X},Y:{imagePoint.Y}";
            }
        }
        //private void MouseLocationUpdated(Point screenPoint, Point imagePoint, string colorDesc)
        //{
        //    if (InvokeRequired)
        //    {
        //        Invoke(new Action<Point, Point, string>(MouseLocationUpdated), screenPoint, imagePoint);
        //    }
        //    else
        //    {
        //        tsslLocation.Text = $"屏幕坐标X:{screenPoint.X},Y:{screenPoint.Y}    图片坐标X:{imagePoint.X},Y:{imagePoint.Y}   颜色:{colorDesc}";
        //    }
        //}
        #endregion
        #region 属性