예제 #1
0
        static void Main(string[] args)
        {
            Paleta p = 8;

            Console.Write((string)p);
            Console.ReadKey();
        }
예제 #2
0
        static void Main(string[] args)
        {
            Paleta a = 3;

            Console.Write((string)a);

            Console.Read();
        }
예제 #3
0
        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;
        }
예제 #4
0
        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");
                    }
                }
            }
        }
예제 #5
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();
        }
예제 #6
0
        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]);
                    }
                }
            }
        }
예제 #7
0
 private void paletaToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     this.miPaleta      = 5;
     gboxPaleta.Visible = true;
     this.paletaToolStripMenuItem.Enabled = false;
 }