public Form1() { InitializeComponent(); caracter.Controls.Clear(); for (int i = 0; i < 12; i++) { for (int j = 0; j < 10; j++) { int idx = 10 * i + j; //tabindex int py = 20 * i + 20; //linha int px = 20 * j + 20; //coluna caracter.Controls.Add(getLabel(px, py, idx)); } } numeros = Casos.Carregar("numeros.xml"); listBox2.Items.Clear(); for (int i = 0; i < numeros.Count; i++) { listBox2.Items.Add("Numero " + numeros.lista_numero[i]); } thr = new Thread(new ThreadStart(treinar_rede)); update_buttons(true); Button.CheckForIllegalCrossThreadCalls = false; TextBox.CheckForIllegalCrossThreadCalls = false; ProgressBar.CheckForIllegalCrossThreadCalls = false; }
private void button4_Click(object sender, EventArgs e) { OpenFileDialog abrir = new OpenFileDialog(); abrir.Title = "Abrir Casos Gerados"; abrir.Filter = "Formato XML (.xml)|*.xml|All files (*.*)|*.*"; if (abrir.ShowDialog() != DialogResult.OK) { return; } casos = Casos.Carregar(abrir.FileName); listBox1.Items.Clear(); for (int i = 0; i < casos.Count; i++) { listBox1.Items.Add(string.Format("Caso {0}", i)); } }