private void B0_Click(object sender, EventArgs e) { TextBox t0x = FindControl(panel1, "t0x") as TextBox; TextBox t0y = FindControl(panel1, "t0y") as TextBox; int x; int y; int.TryParse(t0x.Text, out x); int.TryParse(t0y.Text, out y); f = Figure.Displacement(f, x, y); RedrawPolygon(f); }