public static void Show(Point location, string text, Action onYes, string caption = "Are you sure?") { var strSize = _font.MeasureString(text); Modals.Add(new ConfirmationBox( new Rectangle( location.X, location.Y, Math.Max((int)strSize.X + Margin * 2, 150), Math.Max((int)strSize.Y + Ui.CaptionHeight + ButtonHeight + 8 + Margin, Ui.CaptionHeight + ButtonHeight + Margin * 2)), caption, text, onYes)); }
public static void Show(Point location, string text, string caption = "Information") { var strSize = _font.MeasureString(text); Modals.Add(new MessageBox( new Rectangle( location.X, location.Y, Math.Max((int)strSize.X + Margin * 2, 100), Math.Max((int)strSize.Y + Ui.CaptionHeight + ButtonHeight + 8 + Margin, Ui.CaptionHeight + ButtonHeight + Margin * 2)), caption, text)); }
internal void PushModal(View view) { try { Modals.Add(view); Content = view; OnContentChanged(); } catch (System.Exception ex) { string title = this.GetType().Name + " - " + System.Reflection.MethodBase.GetCurrentMethod().Name; BalizaFacil.App.Instance.UnhandledException(title, ex); } }
public void Show(Point position) { SetRect(new Rectangle(position.X, position.Y, _cleanRect.Width, _cleanRect.Height)); IsDirty = true; Modals.Add(this); }