Esempio n. 1
0
        private void CopyToClipboardInternal()
        {
            if (this.HasValidationErrors)
            {
                base.ShowValidation(true);
            }
            else
            {
                IImageSelectionStrategy strategy;

                if (CopyRange)
                {
                    int interval = 1;
                    if (CopyRangeAtInterval)
                    {
                        interval = CopyRangeInterval;
                    }

                    strategy = new RangeImageSelectionStrategy(CopyRangeStart, CopyRangeEnd, interval, UseInstanceNumber);
                }
                else
                {
                    strategy = new CustomImageSelectionStrategy(CustomRange, RangeMinimum, RangeMaximum, UseInstanceNumber);
                }

                Clipboard.Add(CurrentDisplaySet, strategy);
                this.Host.Exit();
            }
        }
Esempio n. 2
0
        private ValidationResult ValidateCustomRange()
        {
            List <Range> ranges;

            if (CopyCustom && !CustomImageSelectionStrategy.Parse(CustomRange, RangeMinimum, RangeMaximum, out ranges))
            {
                return(new ValidationResult(false, SR.MessageCustomRangeInvalid));
            }

            return(new ValidationResult(true, ""));
        }