示例#1
0
 public static Rectangle ToRectangle(this WndScreenRect value)
 {
     return(new Rectangle(
                value.UpperLeft.X,
                value.UpperLeft.Y,
                value.BottomRight.X - value.UpperLeft.X,
                value.BottomRight.Y - value.UpperLeft.Y));
 }
示例#2
0
        private WndScreenRect ParseScreenRectValue()
        {
            var result = new WndScreenRect();

            ParseAttributes(new Dictionary <string, Action>
            {
                { "UPPERLEFT", () => result.UpperLeft = ParsePoint() },
                { "BOTTOMRIGHT", () => result.BottomRight = ParsePoint() },
                { "CREATIONRESOLUTION", () => result.CreationResolution = ParseSize() },
            });

            return(result);
        }