Beispiel #1
0
        public static DialogResult Show(string title, ref string text, string banner = "", string confirm = "OK")
        {
            var form   = new InputForm(title, text, banner, confirm);
            var result = form.ShowDialog();

            text = form.NameInput.Text;
            return(result);
        }
Beispiel #2
0
        private void FileSaveAs_Click(object sender, EventArgs e)
        {
            var    clientForm = AccountTabs.SelectedTab.Controls["ClientForm"] as ClientForm;
            var    account    = clientForm?.GetAccount();
            string filename   = account?.Username ?? "";
            var    result     = InputForm.Show("Save Account", ref filename, "Profile Name", "Save");

            if (result == DialogResult.OK)
            {
                SaveAccount(filename, account);
            }
        }