private void NewRouter(object sender, EventArgs e) { if (mtxtId.Text == "" || mtxtX.Text == "" || mtxtY.Text == "") { MessageBox.Show("Please enter all the required fields.", "Required Fields", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } bool didComplete = _controller.RouterCreate(mtxtId.Text, txtAddr.Text, txtLocation.Text, Int32.Parse(mtxtX.Text), Int32.Parse(mtxtY.Text), chkBlocked.Checked); if (didComplete) { ClearInputs(); lstRouters.Items.Clear(); LoadRouterIDs(); } }