//Same principle as above method private void listTopic_SelectedIndexChanged(object sender, EventArgs e) { currentTopic = (Topic)listTopic.SelectedValue; if (currentTopic != null) { listFormula.DataSource = currentTopic.formulas; statusSay.Text = "Selected " + currentTopic.ToString(); } else if (currentTopic == null) { listFormula.DataSource = null; statusSay.Text = "No topic to be selected"; } }
//Same principle as above method private void listTopic_SelectedIndexChanged(object sender, EventArgs e) { currentTopic = (Topic)listTopic.SelectedValue; if (currentTopic != null) { listFormula.DataSource = currentTopic.formulas; statusSay.Text = "Selected " + currentTopic.ToString(); } else if(currentTopic == null) { listFormula.DataSource = null; statusSay.Text = "No topic to be selected"; } }