Class for drawing screen rectangle.
상속: IDisposable
예제 #1
0
        public ScreenBoundingRectangle()
        {
            //initialize instance
            this._width = 3;

            this._leftRectangle   = new ScreenRectangle();
            this._topRectangle    = new ScreenRectangle();
            this._rightRectangle  = new ScreenRectangle();
            this._bottomRectangle = new ScreenRectangle();

            this._rectangles = new ScreenRectangle[] { this._leftRectangle, this._topRectangle, this._rightRectangle, this._bottomRectangle };
        }
        public ScreenBoundingRectangle()
        {
            //initialize instance
            this._width = 3;

            this._leftRectangle = new ScreenRectangle();
            this._topRectangle = new ScreenRectangle();
            this._rightRectangle = new ScreenRectangle();
            this._bottomRectangle = new ScreenRectangle();

            this._rectangles = new ScreenRectangle[] { this._leftRectangle, this._topRectangle, this._rightRectangle, this._bottomRectangle };
        }
예제 #3
0
        public RaysAndBoundingRectangleElementHighlighter(AutomationElementTreeControl treeControl) : base(treeControl)
        {
            _topLeftVerticalRay = new ScreenRectangle();
            _topLeftHorizontalRay = new ScreenRectangle();
            _topRightVerticalRay = new ScreenRectangle();
            _topRightHorizontalRay = new ScreenRectangle();
            _bottomLeftVerticalRay = new ScreenRectangle();
            _bottomLeftHorizontalRay = new ScreenRectangle();
            _bottomRightVerticalRay = new ScreenRectangle();
            _bottomRightHorizontalRay = new ScreenRectangle();

            this._rays = new ScreenRectangle[] { _topLeftVerticalRay , _topLeftHorizontalRay ,
                _topRightVerticalRay , _topRightHorizontalRay ,
                _bottomLeftVerticalRay , _bottomLeftHorizontalRay ,
                _bottomRightVerticalRay , _bottomRightHorizontalRay };

            double boundingRectOpacity = base._rectangle.Opacity;

            foreach (ScreenRectangle ray in this._rays)
            {
                ray.Color = Drawing.Color.Blue;
                ray.Opacity = boundingRectOpacity;
            }
        }