Exemplo n.º 1
0
 /// <summary>
 /// Shows a popup with a YES/NO button and relative callbacks
 /// </summary>
 public static void ShowPrompt(bool _doShow, string _message = null, Action _onYesCallback = null, Action _onNoCallback = null)
 {
     if (_doShow)
     {
         Prompt.Show(_message, _onYesCallback, _onNoCallback);
     }
     else
     {
         Prompt.Close();
     }
 }
Exemplo n.º 2
0
 private void _ShowWaitForm()
 {
     try
     {
         waitForm = new Prompt();
         waitForm.ShowDialog();
     }
     catch (ThreadAbortException)
     {
         waitForm.Close();
         Thread.ResetAbort();
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// Display a popup with the message and an entry box. Data entered into the entry box will be passed back to Lua environment upon submission.
        /// </summary>
        /// <param name="message">A message to display on popup window.</param>
        /// <returns>A string value inserted into textbox.</returns>
        public static string ShowPrompt(string message)
        {
            string text = null;

            var prompt = new Prompt();

            prompt.PromptMessage.Text  = message;
            prompt.PromptSubmit.Click += (o, e) =>
            {
                text = prompt.PromptEntryBox.Text;

                prompt.Close();
                prompt.Dispose();
            };

            prompt.ShowDialog();

            return(text);
        }
Exemplo n.º 4
0
 public static void ClosePrompt()
 {
     Prompt.Close();
 }