private void button9_Click(object sender, EventArgs e) { if (contorArbore == 0) { MessageBox.Show("Nu există o schemă logică reprezentată!", "Eroare de stergere", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { for (int i = 0; i < globalContor; i++) { pbArray[i].Image = null; panel4.Controls.Remove(pbArray[i]); pbArray[i] = null; } for (int i = 0; i < contorArbore; i++) { arborePrincipal[i].ID = -2; arborePrincipal[i].ifInchis = false; arborePrincipal[i].whileInchis = false; arborePrincipal[i].DA = false; arborePrincipal[i].endifParentIndex = 0; arborePrincipal[i].coefAdancime = 0; arborePrincipal[i].X = 0; arborePrincipal[i].Y = 0; } J = 0; Initializare_Matrice_Principala(); contorArbore = 0; globalContor = 0; activareButoanePanou(start); dezactivareButoanePanou(citeste, scrie, prelucrare, interpretare, cat_timp, end, daca, stop); for (int i = 0; i < liniiInchidereContor; i++) { for (int j = 1; liniiInchidere[i, j] != null; j++) { liniiInchidere[i, j].Image = null; panel4.Controls.Remove(liniiInchidere[i, j]); liniiInchidere[i, j] = null; } } liniiInchidereContor = 0; button4Flag = false; button1Flag = false; button2Flag = false; button3Flag = false; button5Flag = false; button6Flag = false; button7Flag = false; button8Flag = false; winDeclVar.Dispose(); winDeclVar = new Form3(this); meniuDeclarareVariabile.Items.RemoveAt(0); panel4.Refresh(); } }
private void Form1_Load(object sender, EventArgs e) { Initializare_Matrice_Principala(); contorArbore = 0; activareButoanePanou(start); dezactivareButoanePanou(citeste, scrie, prelucrare, interpretare, cat_timp, end, daca, stop); winDeclVar = new Form3(this); }