Пример #1
0
        public static string ShowInputDialog(string title, string desc, string def = null)
        {
            InputDialog input = new InputDialog();

            input.TBTitle.Text   = title;
            input.TBDesc.Text    = desc;
            input.InputValue     = def;
            input.TBContent.Text = input.InputValue;
            input.TBContent.Focus();
            input.TBContent.SelectAll();
            if (input.ShowDialog() == true)
            {
                return(input.InputValue);
            }
            else
            {
                return(def);
            }
        }
Пример #2
0
        public static string ShowInputDialog(string title, string desc, string def = null, bool eng = false)
        {
            InputDialog input = new InputDialog();

            input.TBTitle.Text   = title;
            input.TBDesc.Text    = desc;
            input.InputValue     = def;
            input.TBContent.Text = input.InputValue;
            input.TBContent.Focus();
            input.TBContent.SelectAll();
            if (eng)
            {
                input.BtnOK.Content     = "Ok";
                input.BtnCancel.Content = "Cancel";
            }
            if (input.ShowDialog() == true)
            {
                return(input.InputValue);
            }
            else
            {
                return(def);
            }
        }