private void botonNuevoPuntoBarra_Click(object sender, System.EventArgs e) { Plaza p = new Plaza(); p.Cod = GestorPlazas.NewCod++; p.isBarra = true; p.X = 0; p.Y = 0; GestorPlazas.AddPlaza(p); int i = GestorPlazas.getNumPlazas() - 1; this.panelDiseño.Controls.Add(GestorPlazas.getBotonDiseño(i)); GestorPlazas.getBotonDiseño(i).MouseDown += new System.Windows.Forms.MouseEventHandler(botonesDiseño_MouseDown); GestorPlazas.getBotonDiseño(i).MouseMove += new System.Windows.Forms.MouseEventHandler(botonesDiseño_MouseMove); GestorPlazas.getBotonDiseño(i).Click += new System.EventHandler(botonesDiseño_Click); }