private void SettingsUDP() { using (var form = new FormUDP(this)) { if (form.ShowDialog(this) == DialogResult.OK) { //Clicked Save Application.Restart(); Environment.Exit(0); } } }
private void SettingsUDP() { using (var form = new FormUDP(this)) { var result = form.ShowDialog(this); if (result == DialogResult.OK) { //Clicked Save Application.Restart(); Environment.Exit(0); } else { //Clicked X - No Save } } }