public static string ShowDialog(string title, string caption)
        {
            var prompt = new AddPersonDialog(caption)
            {
                FormBorderStyle = FormBorderStyle.FixedDialog,
                Text            = title,
                StartPosition   = FormStartPosition.CenterScreen
            };

            return(prompt.ShowDialog() == DialogResult.OK ? prompt.GetInputValue() : null);
        }
        private void AddPersonAction()
        {
            var personName = AddPersonDialog.ShowDialog(Resources.MainWindow_addPerson_Title, Resources.MainWindow_addPerson_Caption);

            if (personName == null)
            {
                return;
            }

            _model.AddPerson(personName);
            peopleBindingSource.ResetBindings(true);
        }