private void btnTake_Click(object sender, EventArgs e) { //MessageBox.Show("Take"); if (parent != null) { int value = 0; try { value = int.Parse(tbTake.Text); } catch (Exception ex) { MessageBox.Show(ex.ToString()); return; } parent.executeTake(TagID, value); } else { MessageBox.Show("System Failure!"); } }