示例#1
0
        public static bool operator ==(Farenheit f, Kelvin k)
        {
            Farenheit far = new Farenheit(0);

            far = (Farenheit)k;
            return(far.getCantidad() == (float)f.getCantidad());
        }
示例#2
0
        public static bool operator ==(Farenheit f, Celsius c)
        {
            Farenheit far = new Farenheit(0);

            far = (Farenheit)c;
            return(far.getCantidad() == (float)f.getCantidad());
        }
示例#3
0
        public static bool operator ==(Kelvin k, Farenheit f)
        {
            Farenheit far = new Farenheit(0);

            far = (Farenheit)k;
            float aux = (float)far.getCantidad();

            return(aux == (float)f.getCantidad());
        }
示例#4
0
        private void button3_Click(object sender, EventArgs e)
        {
            Farenheit far = new Farenheit(0);
            Kelvin    aux = new Kelvin(0);
            Celsius   cel = new Celsius(0);
            Kelvin    kel = new Kelvin(double.Parse(textBox3.Text));

            aux            = kel;
            far            = (Farenheit)kel;
            cel            = (Celsius)kel;
            textBox4.Text  = (far.getCantidad().ToString());
            textBox7.Text  = (cel.getCantidad().ToString());
            textBox10.Text = (aux.getCantidad().ToString());
        }
示例#5
0
        private void button2_Click(object sender, EventArgs e)
        {
            Farenheit far = new Farenheit(0);
            Celsius   aux = new Celsius(0);
            Celsius   cel = new Celsius(double.Parse(textBox2.Text));
            Kelvin    kel = new Kelvin(0);

            aux            = cel;
            far            = (Farenheit)cel;
            kel            = (Kelvin)far;
            textBox5.Text  = (far.getCantidad().ToString());
            textBox8.Text  = (aux.getCantidad().ToString());
            textBox11.Text = (kel.getCantidad().ToString());
        }
示例#6
0
        private void button1_Click(object sender, EventArgs e)
        {
            Farenheit far = new Farenheit(double.Parse(textBox1.Text));
            Farenheit aux = new Farenheit(0);
            Celsius   cel = new Celsius(0);
            Kelvin    kel = new Kelvin(0);

            aux            = far;
            cel            = (Celsius)far;
            kel            = (Kelvin)far;
            textBox6.Text  = (aux.getCantidad().ToString());
            textBox9.Text  = (cel.getCantidad().ToString());
            textBox12.Text = (kel.getCantidad().ToString());
        }