private FRotator AsRotator(RotatorType type) { _reader.Reset(); FRotator rotator = null; switch (type) { case RotatorType.Byte: rotator = _reader.ReadRotation(); break; case RotatorType.Short: rotator = _reader.ReadRotationShort(); break; } if (_reader.IsError || !_reader.AtEnd()) { return(null); } return(rotator); }
public void SetRotator(RotatorType rotatorType) { switch (rotatorType) { case RotatorType.Naive: _rotator = _rotators["Naive"]; break; case RotatorType.WithFiltering: _rotator = _rotators["WithFiltering"]; break; default: throw new ArgumentException("Bad rotator"); } }
public AnimatorCreator(FastBitmap image, BezierPolyline bezierPolyline, int canvasWidth, int canvasHeight) { _animatorType = AnimatorType.Spinning; _rotatorType = RotatorType.Naive; _image = image; //_grayImage = _GetGrayImage(_image); _bezierPolyline = bezierPolyline; _canvasWidth = canvasWidth; _canvasHeight = canvasHeight; }
private void ConfigureRadRotator(RotatorType rotatorType) { RadRotator1.RotatorType = rotatorType;// Change rotator's type if (rotatorType.Equals(RotatorType.CarouselButtons)) { RadRotator1.Width = Unit.Pixel(810 + RadRotatorSizeConfigurator.GetButtonsSize(RadRotator1)); } else { RadRotator1.Width = Unit.Pixel(810); } RadRotator1.DataSource = GetFilesInFolder(virtualPath);// Set datasource RadRotator1.DataBind(); }
private FRotator AsRotator(RotatorType type) { _reader.Reset(); FRotator rotator = type switch { RotatorType.Byte => _reader.ReadRotation(), RotatorType.Short => _reader.ReadRotationShort(), _ => null }; if (_reader.IsError || !_reader.AtEnd()) { return(null); } return(rotator); }
/// <summary> /// Initializes a new instance of the <see cref="Rotator"/> class. /// </summary> public Rotator() { _externalScript = string.Empty; //_scriptDirectory = "/aspnet_client/ActiveWebControls/" + StaticContainer.VersionString + "/"; #if (!FX1_1) _scriptDirectory = string.Empty; #else _scriptDirectory = Define.SCRIPT_DIRECTORY; #endif _speed = 3000; _pause = 1000; _frameRate = 50; _type = RotatorType.Html; _fadeChars = 5; _textColor = Color.Black; _fadeColor = Color.White; _contentFile = string.Empty; _transition = Transition.Slide; this.Width = Unit.Pixel(400); this.Height = Unit.Pixel(300); }
public void OnToggleModRotation(int index) { type = (RotatorType)index; }
public void SetRotator(RotatorType rotatorType) { _rotatorType = rotatorType; }