public MaterialFlatButton() { AnimationManager.AnimationProgress progress = null; AnimationManager.AnimationProgress progress2 = null; this.Primary = false; AnimationManager manager = new AnimationManager(false) { Increment = 0.03, AnimationType = AnimationType.EaseOut }; this.animationManager = manager; AnimationManager manager2 = new AnimationManager(true) { Increment = 0.07, AnimationType = AnimationType.Linear }; this.hoverAnimationManager = manager2; if (progress == null) { progress = sender => base.Invalidate(); } this.hoverAnimationManager.OnAnimationProgress += progress; if (progress2 == null) { progress2 = sender => base.Invalidate(); } this.animationManager.OnAnimationProgress += progress2; base.AutoSizeMode = AutoSizeMode.GrowAndShrink; this.AutoSize = true; base.Margin = new Padding(4, 6, 4, 6); base.Padding = new Padding(0); }
public MaterialSingleLineTextField() { AnimationManager.AnimationProgress progress = null; EventHandler handler = null; EventHandler handler2 = null; EventHandler handler3 = null; base.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.DoubleBuffer, true); AnimationManager manager = new AnimationManager(true) { Increment = 0.06, AnimationType = AnimationType.EaseInOut, InterruptAnimation = false }; this.animationManager = manager; if (progress == null) { progress = sender => base.Invalidate(); } this.animationManager.OnAnimationProgress += progress; BaseTextBox box = new BaseTextBox { BorderStyle = BorderStyle.None, Font = this.SkinManager.ROBOTO_REGULAR_11, ForeColor = this.SkinManager.GetMainTextColor(), Location = new Point(0, 0), Width = base.Width, Height = base.Height - 5 }; this.baseTextBox = box; if (!(base.Controls.Contains(this.baseTextBox) || base.DesignMode)) { base.Controls.Add(this.baseTextBox); } if (handler == null) { handler = (sender, args) => this.animationManager.StartNewAnimation(AnimationDirection.In, null); } this.baseTextBox.GotFocus += handler; if (handler2 == null) { handler2 = (sender, args) => this.animationManager.StartNewAnimation(AnimationDirection.Out, null); } this.baseTextBox.LostFocus += handler2; if (handler3 == null) { handler3 = delegate(object sender, EventArgs args) { this.baseTextBox.BackColor = this.BackColor; this.baseTextBox.ForeColor = this.SkinManager.GetMainTextColor(); }; } base.BackColorChanged += handler3; }
public MaterialRaisedButton() { AnimationManager.AnimationProgress progress = null; this.Primary = true; AnimationManager manager = new AnimationManager(false) { Increment = 0.03, AnimationType = AnimationType.EaseOut }; this.animationManager = manager; if (progress == null) { progress = sender => base.Invalidate(); } this.animationManager.OnAnimationProgress += progress; }
public MaterialTabSelector() { AnimationManager.AnimationProgress progress = null; base.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.DoubleBuffer, true); base.Height = 0x30; AnimationManager manager = new AnimationManager(true) { AnimationType = AnimationType.EaseOut, Increment = 0.04 }; this.animationManager = manager; if (progress == null) { progress = sender => base.Invalidate(); } this.animationManager.OnAnimationProgress += progress; }
public MaterialRadioButton() { AnimationManager.AnimationProgress progress = null; AnimationManager.AnimationProgress progress2 = null; EventHandler handler = null; base.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.DoubleBuffer, true); AnimationManager manager = new AnimationManager(true) { AnimationType = AnimationType.EaseInOut, Increment = 0.06 }; this.animationManager = manager; AnimationManager manager2 = new AnimationManager(false) { AnimationType = AnimationType.Linear, Increment = 0.1, SecondaryIncrement = 0.08 }; this.rippleAnimationManager = manager2; if (progress == null) { progress = sender => base.Invalidate(); } this.animationManager.OnAnimationProgress += progress; if (progress2 == null) { progress2 = sender => base.Invalidate(); } this.rippleAnimationManager.OnAnimationProgress += progress2; if (handler == null) { handler = (sender, args) => this.animationManager.StartNewAnimation(base.Checked ? AnimationDirection.In : AnimationDirection.Out, null); } base.CheckedChanged += handler; base.SizeChanged += new EventHandler(this.OnSizeChanged); this.Ripple = true; this.MouseLocation = new Point(-1, -1); }
public MaterialCheckBox() { AnimationManager.AnimationProgress progress = null; AnimationManager.AnimationProgress progress2 = null; EventHandler handler = null; AnimationManager manager = new AnimationManager(true) { AnimationType = AnimationType.EaseInOut, Increment = 0.05 }; this.animationManager = manager; AnimationManager manager2 = new AnimationManager(false) { AnimationType = AnimationType.Linear, Increment = 0.1, SecondaryIncrement = 0.08 }; this.rippleAnimationManager = manager2; if (progress == null) { progress = sender => base.Invalidate(); } this.animationManager.OnAnimationProgress += progress; if (progress2 == null) { progress2 = sender => base.Invalidate(); } this.rippleAnimationManager.OnAnimationProgress += progress2; if (handler == null) { handler = (sender, args) => this.animationManager.StartNewAnimation(base.Checked ? AnimationDirection.In : AnimationDirection.Out, null); } base.CheckedChanged += handler; this.Ripple = true; this.MouseLocation = new Point(-1, -1); }
public MaterialContextMenuStrip() { AnimationManager.AnimationProgress progress = null; AnimationManager.AnimationFinished finished = null; base.Renderer = new MaterialToolStripRender(); AnimationManager manager = new AnimationManager(false) { Increment = 0.07, AnimationType = AnimationType.Linear }; this.animationManager = manager; if (progress == null) { progress = sender => base.Invalidate(); } this.animationManager.OnAnimationProgress += progress; if (finished == null) { finished = sender => this.OnItemClicked(this.delayesArgs); } this.animationManager.OnAnimationFinished += finished; base.BackColor = this.SkinManager.GetApplicationBackgroundColor(); }