private void updateDivision(object sender, EventArgs e) { if (this.listBoxZonas.SelectedIndex != -1) { SubZona div = new SubZona(); div.Id = this.listBoxZonas.SelectedIndex; div.Nombre = this.textBoxDivName.Text; div.Filas = int.Parse(this.numericTextBoxFilas.Texto); div.Columnas = int.Parse(this.numericTextBoxCol.Texto); div.addCoordinates(new Point(int.Parse(this.numericTextBoxXinit.Texto), int.Parse(this.numericTextBoxYinit.Texto)), new Point(int.Parse(this.numericTextBoxXfin.Texto), int.Parse(this.numericTextBoxYfin.Texto))); camara.addDivision(div); } } //UPDATE DIVISION
} //NOMBRE ZONA CHANGED private void buttonAddZone_Click(object sender, EventArgs e) { unSuscribeEvents(); SubZona d = new SubZona(); d.Id = this.camara.SubZonas.Count; d.Nombre = "Division"; d.addCoordinates(new Point(0, 0), new Point(0, 0)); d.Filas = 0; d.Columnas = 0; this.selectedIndex = d.Id; this.camara.addDivision(d); suscribeEvents(); } //AÑADIR ZONA