Exemple #1
0
        private void DecimalConvert_Click(object sender, RoutedEventArgs e)
        {
            int    o1 = Convert.ToInt16(DecimalDecimal.Text);
            string s1 = DecimalDecimal.Text;

            Binary.ToBinary(o1);
            DecimalBinary.Text = Binary.returnBinary;
            Octal.ToOctal(o1);
            DecimalOctal.Text = Octal.returnOctal;
            Hexadecimal.ToHexadecimal(o1);
            DecimalHexadecimal.Text = Hexadecimal.returnHex;
        }
Exemple #2
0
        private void BinaryConvert_Click(object sender, RoutedEventArgs e)
        {
            string o1 = Convert.ToString(BinaryBinary.Text);

            Decimal.BinaryToDecimal(o1);
            int b1 = Convert.ToInt32(Decimal.returnDecimal);

            Octal.ToOctal(b1);
            BinaryOctal.Text = Octal.returnOctal;
            Decimal.ToDecimal(b1);
            BinaryDecimal.Text = Decimal.returnDecimal;
            Hexadecimal.ToHexadecimal(b1);
            BinaryHexadecimal.Text = Hexadecimal.returnHex;
        }
Exemple #3
0
        private void OctalConvert_Click(object sender, RoutedEventArgs e)
        {
            int o1 = Convert.ToInt16(OctalOctal.Text);

            Octal.DecimaltoOctal(o1);
            o1 = Convert.ToInt32(Octal.returnDecOct);
            if (o1 == 8)
            {
                OctalOctal.Text += "    ERROR!!!!   The number you typed is not an octal number.";
            }
            else
            {
                Binary.ToBinary(o1);
                OctalBinary.Text = Binary.returnBinary;
                Decimal.ToDecimal(o1);
                OctalDecimal.Text = Decimal.returnDecimal;
                Hexadecimal.ToHexadecimal(o1);
                OctalHexadecimal.Text = Hexadecimal.returnHex;
            }
            //OctalDebug.Text = Convert.ToString(o1);
        }