private void btnmas_Click(object sender, EventArgs e) { FrmTempera nueva = new FrmTempera(); nueva.ShowDialog(); this.mipaleta += nueva.laTempera; for (int i = 0; i < this.mipaleta.maxima; i++) { if (!Object.Equals(this.mipaleta[i], null)) { this.lstPaleta.Items.Add((string)this.mipaleta[i]); } } }
private void btnmenos_Click(object sender, EventArgs e) { /*if(lstPaleta.SelectedIndex>=0) * { * this.lstPaleta.Items.RemoveAt(lstPaleta.SelectedIndex); * }*/ FrmTempera nueva = new FrmTempera(); nueva.ShowDialog(); Tempera tem = nueva.laTempera; if (this.mipaleta == tem) { this.lstPaleta.Items.RemoveAt(this.mipaleta | tem); this.mipaleta -= tem; } }
private void temperaToolStripMenuItem_Click(object sender, EventArgs e) { FrmTempera frm = new FrmTempera(); //frm.MdiParent = this; frm.ShowDialog(); this.mipaleta += frm.laTempera; //string aux = frm.MiTempera; for (int i = 0; i < this.mipaleta.maxima; i++) { if (!Object.Equals(this.mipaleta[i], null)) { this.lstPaleta.Items.Add((string)this.mipaleta[i]); } } this.crearPaletaToolStripMenuItem.Enabled = false; }
private void crearPaletaToolStripMenuItem_Click(object sender, EventArgs e) { this.mipaleta = 5; grpPaleta.Visible = true; }