Пример #1
0
        public static IBrowserCameraLens Create(RemoteWebDriver webDriver, LensType type)
        {
            switch (type)
            {
            case LensType.Auto:
                return(CreateLensForAutoMode(webDriver));

            case LensType.Regular:
                return(new RegularLens(webDriver));

            case LensType.Scrollable:
                return(new ScrollableLens(webDriver));

            case LensType.Resizeable:
                return(new ResizeableLens(webDriver));

            case LensType.Zoomable:
                return(new ZoomableLens(webDriver));

            case LensType.ChromeFullPage:
                return(new ChromeFullPageLens(webDriver));

            default:
                throw new ArgumentOutOfRangeException(nameof(type), type, null);
            }
        }
Пример #2
0
 public void Deconstruct(
     out ArisSystemType systemType,
     out int beamCount,
     out LensType lensType)
 {
     systemType = SystemType;
     beamCount  = BeamCount;
     lensType   = LensType;
 }
Пример #3
0
 public BeamConfig(
     ArisSystemType systemType,
     int beamCount,
     LensType lensType)
 {
     SystemType = systemType;
     BeamCount  = beamCount;
     LensType   = lensType;
 }
Пример #4
0
        /// <summary>
        /// Отрисовка стрелок на линзе (тип лизны, ширина, высота)
        /// </summary>
        public void DrawArrows(LensType type, int w, int h)
        {
            graphics.TranslateTransform(size.Width / 2, size.Height / h);
            graphics.RotateTransform(-45 - 180 * (int)type);
            graphics.TranslateTransform(-size.Width / 2, -size.Height / h);
            graphics.DrawLine(greenPen, new Point(size.Width / 2, size.Height / h), new Point(size.Width / 2, size.Height / h - 15));
            graphics.DrawLine(greenPen, new Point(size.Width / 2, size.Height / h), new Point(size.Width / 2 + 15, size.Height / h));
            graphics.ResetTransform();

            graphics.TranslateTransform(size.Width / 2, (h - 1) * size.Height / h);
            graphics.RotateTransform(45 - 180 * (int)type);
            graphics.TranslateTransform(-size.Width / 2, -(h - 1) * size.Height / h);
            graphics.DrawLine(greenPen, new Point(size.Width / 2, (h - 1) * size.Height / h), new Point(size.Width / 2, (h - 1) * size.Height / h + 15));
            graphics.DrawLine(greenPen, new Point(size.Width / 2, (h - 1) * size.Height / h), new Point(size.Width / 2 + 15, (h - 1) * size.Height / h));
            graphics.ResetTransform();
        }
Пример #5
0
        public Lens(Size form, Graphics graphics, LensType type, int focus)
        {
            this.graphics = graphics;

            size = form;

            this.type = type;

            this.focus = focus;

            //коэффициенты для растяжения по экрану
            int width = 90;
            int high = 7;

            greenPen = new Pen(Color.DarkGreen, 1);
            blackPen = new Pen(Color.Black, 1);

            graphics.DrawLine(greenPen, new Point(size.Width / width, size.Height / 2), new Point((width - 1) * size.Width / width, size.Height / 2));//ГОО
            graphics.DrawLine(greenPen, new Point(size.Width / 2, size.Height / high), new Point(size.Width / 2, (high - 1) * size.Height / high));//линза

            DrawFocus();
            DrawArrows(type, width, high);
        }
Пример #6
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id.Length != 0)
            {
                hash ^= Id.GetHashCode();
            }
            hash ^= unlockConditions_.GetHashCode();
            if (AssetScriptName.Length != 0)
            {
                hash ^= AssetScriptName.GetHashCode();
            }
            if (Icon.Length != 0)
            {
                hash ^= Icon.GetHashCode();
            }
            if (AssetType != 0)
            {
                hash ^= AssetType.GetHashCode();
            }
            if (LensType != 0)
            {
                hash ^= LensType.GetHashCode();
            }
            if (Visible != false)
            {
                hash ^= Visible.GetHashCode();
            }
            if (MediaSupportedType != 0)
            {
                hash ^= MediaSupportedType.GetHashCode();
            }
            if (Animated != false)
            {
                hash ^= Animated.GetHashCode();
            }
            if (StorePackId.Length != 0)
            {
                hash ^= StorePackId.GetHashCode();
            }
            if (OrderId != 0)
            {
                hash ^= OrderId.GetHashCode();
            }
            if (IsFullBodyLens != false)
            {
                hash ^= IsFullBodyLens.GetHashCode();
            }
            if (IsEmptyAsset != false)
            {
                hash ^= IsEmptyAsset.GetHashCode();
            }
            if (ShowBadge != false)
            {
                hash ^= ShowBadge.GetHashCode();
            }
            if (visibilityConditions_ != null)
            {
                hash ^= VisibilityConditions.GetHashCode();
            }
            if (StockAssetName.Length != 0)
            {
                hash ^= StockAssetName.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }