/// <summary>
        /// Adds one or more layout regions.
        /// </summary>
        /// <param name="region">A region to match using the Layout method.</param>
        /// <param name="regions">One or more regions to match using the Layout method.</param>
        /// <returns>An updated clone of this settings object.</returns>
        public ICheckSettings Layout(Rectangle region, params Rectangle[] regions)
        {
            CheckSettings clone = Clone();

            clone.Layout_(new SimpleRegionByRectangle(region));
            foreach (Rectangle r in regions)
            {
                clone.Layout_(new SimpleRegionByRectangle(r));
            }
            return(clone);
        }
Exemple #2
0
        /// <summary>
        /// Adds one or more layout regions.
        /// </summary>
        /// <param name="region">A region to match using the Layout method.</param>
        /// <param name="regions">One or more regions to match using the Layout method.</param>
        /// <returns>An updated clone of this settings object.</returns>
        public ICheckSettings Layout(Rectangle region, params Rectangle[] regions)
        {
            CheckSettings clone = Clone();

            clone.Layout_(new SimpleRegionByRectangle(region));
            clone.fluentCode_.Append($".{nameof(Layout)}(new Rectangle({region.X},{region.Y},{region.Width},{region.Height})");
            foreach (Rectangle r in regions)
            {
                clone.Layout_(new SimpleRegionByRectangle(r));
                clone.fluentCode_.Append($", new Rectangle({r.X},{r.Y},{r.Width},{r.Height})");
            }
            clone.fluentCode_.Append(")");
            return(clone);
        }
        /// <summary>
        /// Adds one or more layout regions.
        /// </summary>
        /// <param name="regions">An enumerbale of regions to match using the Layout method.</param>
        /// <returns>An updated clone of this settings object.</returns>
        public ICheckSettings Layout(IEnumerable <Rectangle> regions)
        {
            CheckSettings clone = Clone();

            foreach (Rectangle r in regions)
            {
                clone.Layout_(new SimpleRegionByRectangle(r));
            }
            return(clone);
        }