private void btnPreview_Click(object sender, EventArgs e) { initData(); if (CharForm != null) { CharForm.Close(); } CharForm = new CowPriceChartForm(); CharForm.data1 = data1; CharForm.data2 = data2; CharForm.data3 = data3; CharForm.data4 = data4; CharForm.Show(); }
private void button1_Click(object sender, EventArgs e) { data1 = new Double?[12]; data2 = new Double?[12]; data3 = new Double?[12]; data4 = new Double?[12]; for (int i = 0; i < 12; i++) { if (random.Next(1000, 12000) % 12 != i) { data1[i] = random.Next(10000, 20000); } if (random.Next(1000, 12000) % 12 != i) { data2[i] = random.Next(10000, 20000); } if (random.Next(1000, 12000) % 12 != i) { data3[i] = random.Next(10000, 20000); } if (random.Next(1000, 12000) % 12 != i) { data4[i] = random.Next(10000, 20000); } } if (CharForm != null) { CharForm.Close(); } CharForm = new CowPriceChartForm(); CharForm.data1 = data1; CharForm.data2 = data2; CharForm.data3 = data3; CharForm.data4 = data4; CharForm.Show(); }