private void timer1_Tick(object sender, EventArgs e) { this.ancho = Int32.Parse(rellenarnum.Text); this.penheight = Int32.Parse(contornonum.Text); if (dibujar.Checked == true) { Rectangulo a = new Rectangulo(X, Y, this.pen, this.ancho, this.ancho, this.ancho, this.brush); a.Draw(this); rectangulos.Add(a); } }
private void click(object sender, MouseEventArgs e) { this.ancho = Int32.Parse(rellenarnum.Text); this.penheight = Int32.Parse(contornonum.Text); if (rectangulo.Checked == true) { Rectangulo a = new Rectangulo(e.X, e.Y, this.pen, this.penheight, this.ancho, this.ancho, this.brush); a.Draw(this); rectangulos.Add(a); } if (circulo.Checked == true) { Circulo b = new Circulo(e.X, e.Y, this.pen, this.penheight, this.ancho, this.ancho, this.brush); b.Draw(this); rectangulos.Add(b); } if (recta.Checked == true) { Recta c = new Recta(e.X, e.Y, this.pen, this.penheight, 0, 0, this.brush); c.Draw(this); rectangulos.Add(c); } }