static void Main(string[] args) { Paleta p = 8; Console.Write((string)p); Console.ReadKey(); }
static void Main(string[] args) { Paleta a = 3; Console.Write((string)a); Console.Read(); }
private void temperaToolStripMenuItem_Click(object sender, EventArgs e) { string s; frmTempera tempera = new frmTempera(); tempera.MdiParent = this; //gboxPaleta.Show(); tempera.ShowDialog(); if (tempera.DialogResult == DialogResult.OK) { this.miPaleta += tempera.mitemperita; } //crearPaletaToolStripMenuItem.Enabled = false; }
private void btnMod_Click(object sender, EventArgs e) { Tempera AuxTempera = null; string s; if (this.lboxTempera.SelectedIndex >= 0) { AuxTempera = this.miPaleta[this.lboxTempera.SelectedIndex]; } if (AuxTempera != null) { frmTempera NewForm = new frmTempera(); NewForm.ShowDialog(); if (NewForm.DialogResult == DialogResult.OK) { if (NewForm.mitemperita.GetCantidad > 0) { this.lboxTempera.Items.Clear(); this.miPaleta -= AuxTempera; //if (this.MiPaleta == NewForm.MiTemperita) // { this.miPaleta += NewForm.mitemperita; // } // else // { // this.MiPaleta += NewForm.MiTemperita; // } for (int i = 0; i < 5; i++) { if (this.miPaleta[i] != null) { this.lboxTempera.Items.Add((string)this.miPaleta[i]); } } } else { MessageBox.Show("Error. Cantidad menor a 0"); } } } }
static void Main(string[] args) { //Tempera t = new Tempera(ConsoleColor.Black, "aaaa", 11); //Tempera t2 = new Tempera(ConsoleColor.Red, "ssss", int.MaxValue); //Console.WriteLine(t == t2); //Console.WriteLine((string)t); //Paleta a = new Paleta(11); Paleta a = 3; Tempera c = new Tempera(ConsoleColor.Red, "aaaa", 4); Tempera d = new Tempera(ConsoleColor.Green, "bbbb", 3); //a = 3; a = a + c; a += d; Console.WriteLine((string)a); Console.ReadKey(); }
private void btnPlus_Click(object sender, EventArgs e) { frmTempera NewForm = new frmTempera(); NewForm.ShowDialog(); if (NewForm.DialogResult == DialogResult.OK) { this.miPaleta += NewForm.mitemperita; this.lboxTempera.Items.Clear(); for (int i = 0; i < 5; i++) { if (this.miPaleta[i] != null) { this.lboxTempera.Items.Add((string)this.miPaleta[i]); } } } }
private void paletaToolStripMenuItem1_Click(object sender, EventArgs e) { this.miPaleta = 5; gboxPaleta.Visible = true; this.paletaToolStripMenuItem.Enabled = false; }