private static MessageBoxBlack createMsgBox(string message, string title, Buttons buttons, Icone icon, AnimateStyle style) { var _msgBox = new MessageBoxBlack(); _msgBox.lblMessage.Text = message; _msgBox.lblTitle.Text = title; _msgBox.Height = 0; if (title == null) { title = "Mensagem"; } MessageBoxBlack.InitButtons(_msgBox, buttons); MessageBoxBlack.InitIcon(_msgBox, icon); _msgBox._timer = new Timer(); Size formSize = MessageBoxBlack.MessageSize(message, _msgBox); switch (style) { case AnimateStyle.SlideDown: _msgBox.Size = new Size(formSize.Width, 0); _msgBox._timer.Interval = 1; _msgBox._timer.Tag = new AnimateMsgBox(formSize, style); break; case AnimateStyle.FadeIn: _msgBox.Size = formSize; _msgBox.Opacity = 0; _msgBox._timer.Interval = 20; _msgBox._timer.Tag = new AnimateMsgBox(formSize, style); break; case AnimateStyle.ZoomIn: _msgBox.Size = new Size(formSize.Width + 100, formSize.Height + 100); _msgBox._timer.Tag = new AnimateMsgBox(formSize, style); _msgBox._timer.Interval = 1; break; } _msgBox._timer.Tick += _msgBox.timer_Tick; _msgBox._timer.Start(); return(_msgBox); }
public void Setup(LiquidFloatingActionButton actionButton) { AnimateStyle = actionButton.AnimateStyle; ClipsToBounds = false; Layer.MasksToBounds = false; engine = new SimpleCircleLiquidEngine(); engine.Viscosity = viscosity; engine.Color = actionButton.Color; bigEngine = new SimpleCircleLiquidEngine(); bigEngine.Viscosity = viscosity; bigEngine.Color = actionButton.Color; baseLiquid = new LiquittableCircle(); baseLiquid.Color = actionButton.Color; baseLiquid.ClipsToBounds = false; baseLiquid.Layer.MasksToBounds = false; AddSubview(baseLiquid); }
public void Setup(LiquidFloatingActionButton actionButton) { AnimateStyle = actionButton.AnimateStyle; ClipsToBounds = false; Layer.MasksToBounds = false; _engine = new SimpleCircleLiquidEngine { Viscosity = _viscosity, Color = actionButton.Color }; _bigEngine = new SimpleCircleLiquidEngine { Viscosity = _viscosity, Color = actionButton.Color }; _baseLiquid = new LiquittableCircle { Color = actionButton.Color, ClipsToBounds = false }; _baseLiquid.Layer.MasksToBounds = false; // ISSUE: reference to a compiler-generated method AddSubview(_baseLiquid); }
public static DialogResult Show(string title, UserControl pContent, Buttons buttons, Icon icon, AnimateStyle style) { _msgBox = new MaterialDialog(MaterialSkinManager.Instance); pContent.Location = new Point(0, 0); _msgBox.pnl_Message.Controls.Add(pContent); _msgBox.Width = pContent.Width; _msgBox.pnl_Message.Location = new Point(0, _msgBox.pnl_Message.Location.Y); _msgBox.Height = _msgBox.pnl_Footer.Height + 5 + pContent.Height; _msgBox.lbl_Title.Text = title; _msgBox.pnl_Message.Size = pContent.Size; _msgBox.pnl_Top.Size = new Size(pContent.Size.Width, pContent.Size.Height + _msgBox.lbl_Title.Height); _msgBox.Size = new Size(pContent.Width, _msgBox.pnl_Top.Height + _msgBox.pnl_Footer.Height); MaterialDialog.InitButtons(buttons); MaterialDialog.InitIcon(icon); _timer = new Timer(); Size formSize = _msgBox.Size; switch (style) { case MaterialDialog.AnimateStyle.SlideDown: _msgBox.Size = new Size(formSize.Width, 0); _timer.Interval = 1; _timer.Tag = new AnimateMsgBox(formSize, style); break; case MaterialDialog.AnimateStyle.FadeIn: _msgBox.Size = formSize; _msgBox.Opacity = 0; _timer.Interval = 20; _timer.Tag = new AnimateMsgBox(formSize, style); break; case MaterialDialog.AnimateStyle.ZoomIn: _msgBox.Size = new Size(formSize.Width + 100, formSize.Height + 100); _timer.Tag = new AnimateMsgBox(formSize, style); _timer.Interval = 1; break; } _timer.Tick += timer_Tick; _timer.Start(); _msgBox.ShowDialog(); return(_buttonResult); }
public static DialogResult MessageBoxShow(this System.Windows.Window win, string message, string title, Buttons buttons, Icons icon, AnimateStyle style) { return(MsgBox.Show(message, title, buttons, icon, style, win)); }
public static DialogResult MessageBoxShow(this System.Windows.DependencyObject dependencyObject, string message, string title, Buttons buttons, Icons icon, AnimateStyle style) { return(MsgBox.Show(message, title, buttons, icon, style, System.Windows.Window.GetWindow(dependencyObject))); }
public static DialogResult Show(string message, string title, Buttons buttons, Icon icon, AnimateStyle style) { _msgBox = new MsgBox(); _msgBox._lblMessage.Text = message; _msgBox._lblTitle.Text = title; _msgBox.Height = 0; MsgBox.InitButtons(buttons); MsgBox.InitIcon(icon); _timer = new Timer(); Size formSize = MsgBox.MessageSize(message); switch (style) { case MsgBox.AnimateStyle.SlideDown: _msgBox.Size = new Size(formSize.Width, 0); _timer.Interval = 1; _timer.Tag = new AnimateMsgBox(formSize, style); break; case MsgBox.AnimateStyle.FadeIn: _msgBox.Size = formSize; _msgBox.Opacity = 0; _timer.Interval = 20; _timer.Tag = new AnimateMsgBox(formSize, style); break; case MsgBox.AnimateStyle.ZoomIn: _msgBox.Size = new Size(formSize.Width + 100, formSize.Height + 100); _timer.Tag = new AnimateMsgBox(formSize, style); _timer.Interval = 1; break; } _timer.Tick += timer_Tick; _timer.Start(); _msgBox.ShowDialog(); MessageBeep(0); return _buttonResult; }
public static DialogResult Show(IWin32Window owner, string message, string title, MessageBoxButtons buttons, MessageBoxIcon icon, AnimateStyle style) { _msgBox = new MsgBox(); _msgBox._lblMessage.Text = message; _msgBox.Text = title; _msgBox.Owner = (Form)owner; MsgBox.InitButtons(buttons); MsgBox.InitIcon(icon); _msgBox.Size = MsgBox.MessageSize(); _timer = new Timer(); Size formSize = MsgBox.MessageSize(); switch (style) { case MsgBox.AnimateStyle.SlideDown: _msgBox.Size = new Size(formSize.Width, 0); _timer.Interval = 1; _timer.Tag = new AnimateMsgBox(formSize, style); break; case MsgBox.AnimateStyle.FadeIn: _msgBox.Size = formSize; _msgBox.Opacity = 0; _timer.Interval = 20; _timer.Tag = new AnimateMsgBox(formSize, style); break; case MsgBox.AnimateStyle.ZoomIn: _msgBox.Size = new Size(formSize.Width + 100, formSize.Height + 100); _timer.Tag = new AnimateMsgBox(formSize, style); _timer.Interval = 1; break; } if (!(style == AnimateStyle.None)) { _timer.Tick += timer_Tick; _timer.Start(); } MessageBeep(0); _msgBox.ShowDialog(); return(_buttonResult); }
private static DialogResult ShowDoalog(string message, string title, Buttons buttons, Icons icon, AnimateStyle style, ColorTem colorTem) { var msgBox = new MsgBox(); msgBox.ColorTemelat = colorTem ?? msgBox.ColorTemelat; msgBox._lblMessage.Text = message; msgBox._lblTitle.Text = title; msgBox.BackColor = colorTem.BackColor; msgBox.ForeColor = colorTem.ForeColor; msgBox._lblTitle.ForeColor = colorTem.ForeColor; msgBox._lblMessage.ForeColor = colorTem.ForeColor; msgBox._plFooter.BackColor = colorTem.FootBackColor; msgBox.BorderColor = colorTem.BorderColor; Size formSize = msgBox.MessageSize(message, title); msgBox.Size = formSize; msgBox.InitButtons(buttons); foreach (Button btn in msgBox._buttonCollection) { btn.ForeColor = colorTem.ButtonForeColor; btn.FlatAppearance.BorderColor = colorTem.ButtonBorderColor; btn.BackColor = colorTem.ButtonBackColor; } if (icon == Icons.None) { msgBox._plIcon.Hide(); } else { msgBox.InitIcon(icon); } if (style != AnimateStyle.None) { msgBox._timer = new Timer(); switch (style) { case AnimateStyle.SlideDown: msgBox.Size = new Size(formSize.Width, 0); msgBox._timer.Interval = 1; msgBox._timer.Tag = new AnimateMsgBox(formSize, style); break; case AnimateStyle.FadeIn: msgBox.Size = formSize; msgBox.Opacity = 0; msgBox._timer.Interval = 20; msgBox._timer.Tag = new AnimateMsgBox(formSize, style); break; case AnimateStyle.ZoomIn: msgBox.Size = new Size(formSize.Width + 100, formSize.Height + 100); msgBox._timer.Tag = new AnimateMsgBox(formSize, style); msgBox._timer.Interval = 1; break; } msgBox.CenterToParent(formSize); msgBox._timer.Tick += msgBox.timer_Tick; msgBox._timer.Start(); } ShowForm(msgBox); MessageBeep(0); return(msgBox._buttonResult); }
public static DialogResult MessageBoxShow(this System.Windows.DependencyObject dependencyObject, string message, string title, Buttons buttons, Icons icon, AnimateStyle style) { return MsgBox.Show(message, title, buttons, icon, style, System.Windows.Window.GetWindow(dependencyObject)); }
public static DialogResult Show(string message, string title, Buttons buttons, Icons icon, AnimateStyle style, System.Windows.Window win) { win.ApplyEffect(); _msgBox = new MsgBox(); _msgBox._lblMessage.Text = message; _msgBox._lblTitle.Text = title; _msgBox.Height = 0; MsgBox.InitButtons(buttons); MsgBox.InitIcon(icon); _timer = new Timer(); Size formSize = MsgBox.MessageSize(message); switch (style) { case MsgBox.AnimateStyle.SlideDown: _msgBox.Size = new Size(formSize.Width, 0); _timer.Interval = 1; _timer.Tag = new AnimateMsgBox(formSize, style); break; case MsgBox.AnimateStyle.FadeIn: _msgBox.Size = formSize; _msgBox.Opacity = 0; _timer.Interval = 20; _timer.Tag = new AnimateMsgBox(formSize, style); break; case MsgBox.AnimateStyle.ZoomIn: _msgBox.Size = new Size(formSize.Width + 100, formSize.Height + 100); _timer.Tag = new AnimateMsgBox(formSize, style); _timer.Interval = 1; break; } _timer.Tick += timer_Tick; _timer.Start(); _msgBox.ShowDialog(); MessageBeep(0); win.ClearEffect(); return(_buttonResult); }
public static DialogResult Show(string message, string title, ButtonType buttons, Ico icon, AnimateStyle style) { AppUtils.ThrowArgNull(message); _msgBox = new MsgBox(); _msgBox._lblMessage.Text = message; _msgBox._lblTitle.Text = title; _msgBox.Height = 0; InitButtons(buttons); InitIcon(icon); _timer = new Timer(); Size formSize = MessageSize(message); switch (style) { case AnimateStyle.SlideDown: _msgBox.Size = new Size(formSize.Width, 0); _timer.Interval = 1; _timer.Tag = new AnimateMsgBox(formSize, style); break; case AnimateStyle.FadeIn: _msgBox.AutoSize = true; _msgBox.AutoSizeMode = AutoSizeMode.GrowOnly; _msgBox.Size = formSize; _msgBox.Opacity = 0; _timer.Interval = 20; _timer.Tag = new AnimateMsgBox(formSize, style); break; case AnimateStyle.FadeInHelp: _msgBox.Size = new Size(500, 360); _msgBox.Opacity = 0; _timer.Interval = 20; _timer.Tag = new AnimateMsgBox(formSize, style); break; case AnimateStyle.ZoomIn: _msgBox.Size = new Size(formSize.Width + 100, formSize.Height + 100); _timer.Tag = new AnimateMsgBox(formSize, style); _timer.Interval = 1; break; } _timer.Tick += Timer_Tick; _timer.Start(); _msgBox.ShowDialog(); NativeMethods.MessageBeepNative(0); return(_buttonResult); }
public void OnRightButtonClicked() { animateStyle = AnimateStyle.Counterwise; Animate(); }
public static DialogResult Show(string message, string title, Buttons buttons, Icon icon, AnimateStyle style) { _msgBox = new MaterialDialog(MaterialSkinManager.Instance); _msgBox.lbl_Message.Text = message; _msgBox.lbl_Title.Text = title; _msgBox.Height = 0; MaterialDialog.InitButtons(buttons); MaterialDialog.InitIcon(icon); _timer = new Timer(); Size formSize = _msgBox.Size; switch (style) { case MaterialDialog.AnimateStyle.SlideDown: _msgBox.Size = new Size(formSize.Width, 0); _timer.Interval = 1; _timer.Tag = new AnimateMsgBox(formSize, style); break; case MaterialDialog.AnimateStyle.FadeIn: _msgBox.Size = formSize; _msgBox.Opacity = 0; _timer.Interval = 20; _timer.Tag = new AnimateMsgBox(formSize, style); break; case MaterialDialog.AnimateStyle.ZoomIn: _msgBox.Size = new Size(formSize.Width + 100, formSize.Height + 100); _timer.Tag = new AnimateMsgBox(formSize, style); _timer.Interval = 1; break; } _timer.Tick += timer_Tick; _timer.Start(); _msgBox.ShowDialog(); return(_buttonResult); }
public void OnLeftButtonClicked() { animateStyle = AnimateStyle.Inverse; Animate(); }
public static DialogResult Show(string message, string title, Buttons buttons, Icons icon, AnimateStyle style, System.Windows.Window win) { win.ApplyEffect(); var msgBox = new MsgBox { _lblMessage = { Text = message }, _lblTitle = { Text = title } }; Size formSize = msgBox.MessageSize(message, title); msgBox.Size = formSize; msgBox.StartPosition = FormStartPosition.CenterParent; msgBox.Height = 0; msgBox.InitButtons(buttons); msgBox.InitIcon(icon); msgBox._timer = new Timer(); switch (style) { case AnimateStyle.SlideDown: msgBox.Size = new Size(formSize.Width, 0); msgBox._timer.Interval = 1; msgBox._timer.Tag = new AnimateMsgBox(formSize, style); break; case AnimateStyle.FadeIn: msgBox.Size = formSize; msgBox.Opacity = 0; msgBox._timer.Interval = 20; msgBox._timer.Tag = new AnimateMsgBox(formSize, style); break; case AnimateStyle.ZoomIn: msgBox.Size = new Size(formSize.Width + 100, formSize.Height + 100); msgBox._timer.Tag = new AnimateMsgBox(formSize, style); msgBox._timer.Interval = 1; break; } msgBox._timer.Tick += msgBox.timer_Tick; msgBox._timer.Start(); MessageBeep(0); ShowForm(msgBox); win.ClearEffect(); return(msgBox._buttonResult); }
public AnimateMsgBox(Size formSize, AnimateStyle style) { this.FormSize = formSize; this.Style = style; }
public static DialogResult Show(string message, string title, Buttons buttons, Icone icon, AnimateStyle style) { TimerCursorOverButtonContructor(); _msgBox = new MsgBox(); _msgBox._lblMessage.Text = message; _msgBox._lblTitle.Text = title; _msgBox.Height = 0; MsgBox.InitButtons(buttons); MsgBox.InitIcon(icon); _timer = new Timer(); Size formSize = MsgBox.MessageSize(message, title, hasIcon: true); switch (style) { case MsgBox.AnimateStyle.SlideDown: // _msgBox.Size = new Size(formSize.Width, 0); _msgBox.Size = new Size(formSize.Width , 0); _timer.Interval = 15; _timer.Tag = new AnimateMsgBox(formSize, style); break; case MsgBox.AnimateStyle.FadeIn: tempBorderColor = _msgBox.BackColor; //to animated effect do work more smoth (without blinking) _msgBox.Size = formSize; _msgBox.Opacity = 0; _timer.Interval = 50; _timer.Tag = new AnimateMsgBox(formSize, style); break; case MsgBox.AnimateStyle.ZoomIn: _msgBox.Size = new Size(formSize.Width + 100, formSize.Height + 100); _timer.Tag = new AnimateMsgBox(formSize, style); _timer.Interval = 15; break; } _timer.Tick += timer_Tick; _timer.Start(); _timer.Disposed += timer_Disposed; //to initiate contdown to cursoroverbutton timer _msgBox.ShowDialog(); _msgBox.Focus(); MessageBeep(0); _timer_CursorOverButton.Dispose(); return _buttonResult; }
public static DialogResult Show(string message, string title, Buttons buttons, Icone icon, AnimateStyle style) { MessageBoxBlack _msgBox = createMsgBox(message, title, buttons, icon, style); _msgBox.ShowDialog(); return(_msgBox._buttonResult); }
public static DialogResult Show(Control parent, string message, string title, Buttons buttons, Icon icon, AnimateStyle style) { _msgBox = new MessageBox(); //_msgBox.Socket = parent.Socket; _msgBox._lblMessage.Text = message; _msgBox.Text = title; _msgBox.Height = 0; MessageBox.InitButtons(buttons); MessageBox.InitIcon(icon); _timer = new Timer(); Size formSize = _msgBox.MessageSize(message); switch (style) { case MessageBox.AnimateStyle.SlideDown: _msgBox.Size = new Size(formSize.Width, 0); _timer.Interval = 1; _timer.Tag = new AnimateMsgBox(formSize, style); break; case MessageBox.AnimateStyle.FadeIn: _msgBox.Size = formSize; _msgBox.Opacity = 0; _timer.Interval = 20; _timer.Tag = new AnimateMsgBox(formSize, style); break; case MessageBox.AnimateStyle.ZoomIn: _msgBox.Size = new Size(formSize.Width + 100, formSize.Height + 100); _timer.Tag = new AnimateMsgBox(formSize, style); _timer.Interval = 1; break; } _timer.Tick += timer_Tick; _timer.Start(); _msgBox.ShowDialog(); return(_buttonResult); }
public static DialogResult Show(string message, string title, Buttons buttons, Icons icon, AnimateStyle style, System.Windows.Window win) { win.ApplyEffect(); var msgBox = new MsgBox { _lblMessage = { Text = message }, _lblTitle = { Text = title } }; Size formSize = msgBox.MessageSize(message, title); msgBox.Size = formSize; msgBox.StartPosition = FormStartPosition.CenterParent; msgBox.Height = 0; msgBox.InitButtons(buttons); msgBox.InitIcon(icon); msgBox._timer = new Timer(); switch (style) { case AnimateStyle.SlideDown: msgBox.Size = new Size(formSize.Width, 0); msgBox._timer.Interval = 1; msgBox._timer.Tag = new AnimateMsgBox(formSize, style); break; case AnimateStyle.FadeIn: msgBox.Size = formSize; msgBox.Opacity = 0; msgBox._timer.Interval = 20; msgBox._timer.Tag = new AnimateMsgBox(formSize, style); break; case AnimateStyle.ZoomIn: msgBox.Size = new Size(formSize.Width + 100, formSize.Height + 100); msgBox._timer.Tag = new AnimateMsgBox(formSize, style); msgBox._timer.Interval = 1; break; } msgBox._timer.Tick += msgBox.timer_Tick; msgBox._timer.Start(); ShowForm(msgBox); MessageBeep(0); win.ClearEffect(); return msgBox._buttonResult; }
public static DialogResult Show(string message, string title, Buttons buttons, Icon icon, AnimateStyle style, bool beep) { _msgBox = new MsgBox(); _msgBox._lblMessage.Text = message; _msgBox._lblTitle.Text = title; _msgBox.Height = 0; InitButtons(buttons); InitIcon(icon); _timer = new Timer(); Size formSize = MessageSize(message); switch (style) { case AnimateStyle.SlideDown: _msgBox.Size = new Size(formSize.Width, 0); _timer.Interval = 1; _timer.Tag = new AnimateMsgBox(formSize, style); break; case AnimateStyle.FadeIn: _msgBox.Size = formSize; _msgBox.Opacity = 0; _timer.Interval = 20; _timer.Tag = new AnimateMsgBox(formSize, style); break; case AnimateStyle.ZoomIn: _msgBox.Size = new Size(formSize.Width + 100, formSize.Height + 100); _timer.Tag = new AnimateMsgBox(formSize, style); _timer.Interval = 1; break; } _timer.Tick += Timer_Tick; _timer.Start(); if (beep) { MessageBeep(0); } _msgBox.ShowDialog(); return(_buttonResult); }
public static DialogResult MessageBoxShow(this System.Windows.Window win, string message, string title, Buttons buttons, Icons icon, AnimateStyle style) { return MsgBox.Show(message, title, buttons, icon, style, win); }
public static DialogResult Show(string message, string title, Buttons buttons, Icons icon, AnimateStyle style, ColorTem colorTem) { return(ShowDoalog(message, title, buttons, icon, style, colorTem)); }