public void ProgrammerSettings_Click(ProgrammerCalcState mode)
 {
     if (mode == ProgrammerCalcState.Hexidecimal)
     {
         // Buttons
         HexSpecificButtons(true);
         DecimalSpecificButtons(true);
         OctalSpecificButtons(true);
     }
     else if (mode == ProgrammerCalcState.Decimal)
     {
         // Buttons
         HexSpecificButtons(false);
         DecimalSpecificButtons(true);
         OctalSpecificButtons(true);
     }
     else if (mode == ProgrammerCalcState.Octal)
     {
         // Buttons
         HexSpecificButtons(false);
         DecimalSpecificButtons(false);
         OctalSpecificButtons(true);
     }
     else if (mode == ProgrammerCalcState.Binary)
     {
         // Buttons
         HexSpecificButtons(false);
         DecimalSpecificButtons(false);
         OctalSpecificButtons(false);
     }
 }
        public string toDec(ProgrammerCalcState type, string exp)
        {
            if (type == ProgrammerCalcState.Binary)
            {
                return(bin2Dec(exp));
            }
            else if (type == ProgrammerCalcState.Hexidecimal)
            {
                return(hex2Dec(exp));
            }
            else if (type == ProgrammerCalcState.Octal)
            {
                return(oct2Dec(exp));
            }

            return(exp);
        }