private void Tick(object sender, EventArgs e) { if (cycle.Checked) { check++; if (check % 10 == 0) { if (DropdownYear.SelectedIndex == 4) { DropdownYear.SelectedIndex = 0; } else { DropdownYear.SelectedIndex++; } } } Debug.Write("memes"); chart1.Series.Clear(); if (comboBox2.SelectedItem == null || DropdownCrime.SelectedItem == null /* anderding == null */) { chart1.Series.Add(new Series()); } else { Series series = LineChartClass.CreateNewChart(comboBox2.SelectedItem.ToString(), DropdownCrime.SelectedItem.ToString() /*anderding*/); chart1.Series.Add(series); } Yearbox.Text = DropdownYear.SelectedItem.ToString(); }
//The chart which displays info for the currently selected area on a line chart. private void chart1_Click_1(object sender, EventArgs e) { chart1.Series.Clear(); if (comboBox2.SelectedItem == null || DropdownCrime.SelectedItem == null /* anderding == null */) { chart1.Series.Add(new Series()); } else { Series series = LineChartClass.CreateNewChart(comboBox2.SelectedItem.ToString(), DropdownCrime.SelectedItem.ToString() /*anderding*/); chart1.Series.Add(series); } }