Exemplo n.º 1
0
        /// <summary>
        /// Processes the pipeline.
        /// </summary>
        protected override void ProcessRecord()
        {
            //if (this.InputObject == null ||
            // !(this.InputObject is AutomationElement)) {
            bool save = GetType().Name == "SaveUiaScreenshotCommand";

            /*
             * bool save = false;
             * if (this.GetType().Name == "SaveUiaScreenshotCommand") {
             *  save = true;
             * }
             */

            UiaHelper.GetScreenshotOfCmdletInput(
                this,
                Description,
                save,
                new ScreenshotRect {
                Left   = Left,
                Top    = Top,
                Height = Height,
                Width  = Width
            },
                Path + @"\" + Name,
                As);
        }