using System.Windows;

namespace FLY.ControlLibrary
{
    /// <summary>
    /// 提示输入文本框
    /// </summary>
    public partial class Prompt : WindowBigClose
    {
        public Prompt()
        {
            InitializeComponent();

        }


        public static bool Show(string message, ref string input)
        {
            Prompt mb = new Prompt();
            mb.textblock_message.Text = message;
            mb.textbox_input.Text = input;
            mb.Owner = Application.Current.MainWindow;
            if (mb.ShowDialog() == true)
            {
                input = mb.textbox_input.Text;
                return true;
            }
            else
            {
                return false;
            }
        }

        private void button_ok_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
            this.Close();
        }
    }
}
