private void learningButton_Click(object sender, EventArgs e) { if (batchDataList.Count < 1) { MessageBox.Show("At least, there has to be a batch data."); } else { BatchLearningForm batchLearningForm = new BatchLearningForm(); batchLearningForm.Owner = this.Owner; batchLearningForm.Show(); this.FormClosed -= BatchForm_FormClosed; this.Close(); } }