Exemple #1
0
        //Eventos
        private void btnMas_Click(object sender, EventArgs e)
        {
            frmTempera frmTemp = new frmTempera();

            frmTemp.ShowDialog();

            if (frmTemp.DialogResult == DialogResult.OK && this._miPaleta.Temperas.Count < this._miPaleta.CantidadMaxima)
            {
                this._miPaleta += frmTemp.MiTempera;
                this.despliegaItems();
            }
        }
Exemple #2
0
        private void lstLista_DoubleClick(object sender, EventArgs e)
        {
            int        indice  = this.lstLista.SelectedIndex;
            Tempera    temp    = this._miPaleta.Temperas[indice];
            frmTempera frmTemp = new frmTempera(temp, true);

            frmTemp.ShowDialog();

            if (frmTemp.DialogResult == DialogResult.OK)
            {
                this._miPaleta.Temperas[indice] = frmTemp.MiTempera;
                this.despliegaItems();
            }
        }
Exemple #3
0
        private void btnMenos_Click(object sender, EventArgs e)
        {
            int indice = this.lstLista.SelectedIndex;

            if (indice > -1)
            {
                Tempera temp = this._miPaleta.Temperas[indice];

                frmTempera frmTemp = new frmTempera(temp, false);
                frmTemp.ShowDialog();

                if (frmTemp.DialogResult == DialogResult.OK)
                {
                    this._miPaleta = this._miPaleta - frmTemp.MiTempera;
                    this.despliegaItems();
                }
            }
            else
            {
                MessageBox.Show("Selecccione un ítem");
            }
        }