Пример #1
0
        public string GetNameInfo()
        {
            NameInputForm aNameForm = new NameInputForm();

            bool aNameFormOK = false;

            itsFormClient?.Invoke(new MethodInvoker(delegate
            {
                aNameFormOK = aNameForm.ShowDialog(itsFormClient) == DialogResult.OK;
            }));

            if (aNameFormOK)
            {
                return(aNameForm.NameChoice);
            }
            else // If we closed the name form, close the client form
            {
                Application.Exit();
                return(null);
            }
        }