public static async void Show(String text, String caption = null, EMessageBoxButtons buttons = EMessageBoxButtons.Ok, ResultHandler handler = null) { MessageBox.handler = handler; MessageDialog dialog; if (caption != null) { dialog = new MessageDialog(text, caption); } else { dialog = new MessageDialog(text); } // Add commands and set their callbacks; both buttons use the same callback function instead of inline event handlers dialog.Commands.Add(new UICommand("ok", new UICommandInvokedHandler(CommandInvokedHandler))); if (buttons == EMessageBoxButtons.OkCancel) { dialog.Commands.Add(new UICommand("cancel", new UICommandInvokedHandler(CommandInvokedHandler))); } // Show the message dialog await dialog.ShowAsync(); }
public MessageBox(string title, string message, EMessageBoxButtons buttons, Action <EDialogResult> callback) { WindowContent = new GUIContent(title); this.message = message; this.buttons = buttons; this.callback = callback; }
public override EDialogResult ShowMessageBox(string text, string caption, EMessageBoxButtons buttons = EMessageBoxButtons.OK) { //!!!!buttons, result Android.Util.Log.WriteLine(Android.Util.LogPriority.Debug, "MyApp", "MESSAGE:\r\n" + caption + ":" + text); return(EDialogResult.OK); }
/////////////////////////////////////////// public override EDialogResult ShowMessageBox(string text, string caption, EMessageBoxButtons buttons) { while (ShowCursor(1) < 0) { } IntPtr hwnd = IntPtr.Zero; if (EngineApp.ApplicationType == EngineApp.ApplicationTypeEnum.Simulation && EngineApp.CreatedInsideEngineWindow != null) { hwnd = EngineApp.CreatedInsideEngineWindow.Handle; } return((EDialogResult)MessageBox(hwnd, text, caption, (int)buttons | MB_ICONEXCLAMATION)); //MessageBox( hwnd, text, caption, MB_OK | MB_ICONEXCLAMATION ); }
public static ResultData Show(UIControl parent, string text, string caption, EMessageBoxButtons buttons) { var window = CreateWindow(parent, text, caption); if (window == null) { return(null); } EDialogResult[] results = null; switch (buttons) { case EMessageBoxButtons.OK: results = new EDialogResult[] { EDialogResult.OK }; break; case EMessageBoxButtons.OKCancel: results = new EDialogResult[] { EDialogResult.OK, EDialogResult.Cancel }; break; case EMessageBoxButtons.AbortRetryIgnore: results = new EDialogResult[] { EDialogResult.Abort, EDialogResult.Retry, EDialogResult.Ignore }; break; case EMessageBoxButtons.YesNoCancel: results = new EDialogResult[] { EDialogResult.Yes, EDialogResult.No, EDialogResult.Cancel }; break; case EMessageBoxButtons.YesNo: results = new EDialogResult[] { EDialogResult.Yes, EDialogResult.No }; break; case EMessageBoxButtons.RetryCancel: results = new EDialogResult[] { EDialogResult.Retry, EDialogResult.Cancel }; break; } var resultData = new ResultData(); ConfigureButtons(window, results, resultData); //add to parent and enable parent.AddComponent(window); return(resultData); }
public override EDialogResult ShowMessageBox(string text, string caption, EMessageBoxButtons buttons) { //!!!!buttons, result MacAppNativeWrapper.MessageBox(text, caption); return(EDialogResult.OK); }
public abstract EDialogResult ShowMessageBox(string text, string caption, EMessageBoxButtons buttons = EMessageBoxButtons.OK);
public static EDialogResult ShowQuestion(string text, EMessageBoxButtons buttons) { return((EDialogResult)KryptonMessageBox.Show(text, EngineInfo.OriginalName, (MessageBoxButtons)buttons, MessageBoxIcon.Question)); }
public MessageBox(string message, EMessageBoxButtons buttons, Action <EDialogResult> callback) { this.message = message; this.buttons = buttons; this.callback = callback; }
public MessageBox(string message, EMessageBoxButtons buttons) { this.message = message; this.buttons = buttons; }
public MessageBox(string title, string message, EMessageBoxButtons buttons) { WindowContent = new GUIContent(title); this.message = message; this.buttons = buttons; }