public async Task <CustomMessageBoxResult> ShowYesNoCancel(string messageBoxText, string caption, string yesButtonText, string noButtonText, string cancelButtonText, CustomMessageBoxImage icon) { await Task.Yield(); return(CustomMessageBoxResult.None); }
public async Task <CustomMessageBoxResult> Show(string messageBoxText, string caption, CustomMessageBoxButton button, CustomMessageBoxImage icon) { string text = null; switch (button) { case CustomMessageBoxButton.OK: text = "Ok"; break; } await Acr.UserDialogs.UserDialogs.Instance.AlertAsync(messageBoxText, caption, text); return(CustomMessageBoxResult.OK); }
public async Task <CustomMessageBoxResult> ShowOK(string messageBoxText, string caption, string okButtonText, CustomMessageBoxImage icon) { await Acr.UserDialogs.UserDialogs.Instance.AlertAsync(messageBoxText, caption, okButtonText); return(CustomMessageBoxResult.OK); }
/// <summary> /// Displays a message box that has a message, caption, Yes/No/Cancel buttons with custom System.String values for the buttons' text, and icon; /// and that returns a result. /// </summary> /// <param name="messageBoxText">A System.String that specifies the text to display.</param> /// <param name="caption">A System.String that specifies the title bar caption to display.</param> /// <param name="yesButtonText">A System.String that specifies the text to display within the Yes button.</param> /// <param name="noButtonText">A System.String that specifies the text to display within the No button.</param> /// <param name="cancelButtonText">A System.String that specifies the text to display within the Cancel button.</param> /// <param name="icon">A System.Windows.CustomMessageBoxImage value that specifies the icon to display.</param> /// <returns>A System.Windows.CustomMessageBoxResult value that specifies which message box button is clicked by the user.</returns> public static CustomMessageBoxResult ShowYesNoCancel(string messageBoxText, string caption, string yesButtonText, string noButtonText, string cancelButtonText, CustomMessageBoxImage icon) { CustomMessageBoxWindow msg = new CustomMessageBoxWindow(messageBoxText, caption, CustomMessageBoxButton.YesNoCancel, icon) { YesButtonText = yesButtonText, NoButtonText = noButtonText, CancelButtonText = cancelButtonText }; msg.ShowDialog(); return(msg.Result); }
/// <summary> /// Displays a message box that has a message, caption, OK/Cancel buttons with custom System.String values for the buttons' text, and icon; /// and that returns a result. /// </summary> /// <param name="messageBoxText">A System.String that specifies the text to display.</param> /// <param name="caption">A System.String that specifies the title bar caption to display.</param> /// <param name="okButtonText">A System.String that specifies the text to display within the OK button.</param> /// <param name="cancelButtonText">A System.String that specifies the text to display within the Cancel button.</param> /// <param name="icon">A System.Windows.CustomMessageBoxImage value that specifies the icon to display.</param> /// <returns>A System.Windows.CustomMessageBoxResult value that specifies which message box button is clicked by the user.</returns> public static CustomMessageBoxResult ShowOKCancel(string messageBoxText, string caption, string okButtonText, string cancelButtonText, CustomMessageBoxImage icon) { CustomMessageBoxWindow msg = new CustomMessageBoxWindow(messageBoxText, caption, CustomMessageBoxButton.OKCancel, icon) { OkButtonText = okButtonText, CancelButtonText = cancelButtonText }; msg.ShowDialog(); return(msg.Result); }
/// <summary> /// Displays a message box that has a message, title bar caption, button, and icon; and that returns a result. /// </summary> /// <param name="messageBoxText">A System.String that specifies the text to display.</param> /// <param name="caption">A System.String that specifies the title bar caption to display.</param> /// <param name="button">A System.Windows.CustomMessageBoxButton value that specifies which button or buttons to display.</param> /// <param name="icon">A System.Windows.CustomMessageBoxImage value that specifies the icon to display.</param> /// <returns>A System.Windows.CustomMessageBoxResult value that specifies which message box button is clicked by the user.</returns> public static CustomMessageBoxResult Show(string messageBoxText, string caption, CustomMessageBoxButton button, CustomMessageBoxImage icon) { Application.Current.Dispatcher.Invoke(delegate { try { CustomMessageBoxWindow msg = new CustomMessageBoxWindow(messageBoxText, caption, button, icon); msg.ShowDialog(); } catch (System.ComponentModel.Win32Exception ex) { Log.Logger.Error(ex, "Al mostar un mensaje personalizado"); } }); return(CustomMessageBoxResult.OK); }
/// <summary> /// Displays a message box that has a message, caption, Yes/No/Cancel buttons with custom System.String values for the buttons' text, and icon; /// and that returns a result. /// </summary> /// <param name="messageBoxText">A System.String that specifies the text to display.</param> /// <param name="caption">A System.String that specifies the title bar caption to display.</param> /// <param name="yesButtonText">A System.String that specifies the text to display within the Yes button.</param> /// <param name="noButtonText">A System.String that specifies the text to display within the No button.</param> /// <param name="cancelButtonText">A System.String that specifies the text to display within the Cancel button.</param> /// <param name="icon">A System.Windows.CustomMessageBoxImage value that specifies the icon to display.</param> /// <returns>A System.Windows.async Task<CustomMessageBoxResult> value that specifies which message box button is clicked by the user.</returns> public async Task <CustomMessageBoxResult> ShowYesNoCancel(string messageBoxText, string caption, string yesButtonText, string noButtonText, string cancelButtonText, CustomMessageBoxImage icon) { await Task.Yield(); CustomMessageBoxWindow msg = new CustomMessageBoxWindow(messageBoxText, caption, CustomMessageBoxButton.YesNoCancel, icon) { YesButtonText = yesButtonText, NoButtonText = noButtonText, CancelButtonText = cancelButtonText }; msg.ShowDialog(); return(msg.Result); }
/// <summary> /// Displays a message box that has a message, title bar caption, OK button with a custom System.String value for the button's text, and icon; and that returns a result. /// </summary> /// <param name="messageBoxText">A System.String that specifies the text to display.</param> /// <param name="caption">A System.String that specifies the title bar caption to display.</param> /// <param name="okButtonText">A System.String that specifies the text to display within the OK button.</param> /// <param name="icon">A System.Windows.CustomMessageBoxImage value that specifies the icon to display.</param> /// <returns>A System.Windows.async Task<CustomMessageBoxResult> value that specifies which message box button is clicked by the user.</returns> public async Task <CustomMessageBoxResult> ShowOK(string messageBoxText, string caption, string okButtonText, CustomMessageBoxImage icon) { await Task.Yield(); CustomMessageBoxWindow msg = new CustomMessageBoxWindow(messageBoxText, caption, CustomMessageBoxButton.OK, icon) { OkButtonText = okButtonText }; msg.ShowDialog(); return(msg.Result); }