private void SortingMv() { for (int i = 0; i < MVList.Count; i++) { MethodVariable mv = MVList[i]; mv.Location = new Point(AutoScrollPosition.X, AutoScrollPosition.Y + 40 * i); } }
private void Button4_Click(object sender, EventArgs e) { MethodVariable MV = new MethodVariable(); MV.Name = "MV" + IndexNumber.ToString(); this.panel1.Controls.Add(MV); MVList.Add(MV); SortingMv(); }
public void DelButton(MethodVariable MV) { //int X; //int Y; //StatementBlock SB = (StatementBlock)this.Parent; //X = SB.AutoScrollPosition.X; //Y = SB.AutoScrollPosition.Y; panel1.Controls.Remove(MV); MVList.Remove(MV); SortingMv(); //SB.AutoScrollPosition = new Point(X, Y); }