Ejemplo n.º 1
0
 public void PHUnitsSet(PHSampleUnitsEnum ToUnits)
 {
     if (ToUnits != PHUnits && PH != null)
     {
         // convert the numbers
         if (ToUnits == PHSampleUnitsEnum.Water)
         {
             // pH in water = (pH in CaCl X 1.1045) - 0.1375
             PH = MathUtility.Subtract_Value(MathUtility.Multiply_Value(PH, 1.1045), 0.1375);
         }
         else
         {
             // pH in CaCl = (pH in water + 0.1375) / 1.1045
             PH = MathUtility.Divide_Value(MathUtility.Add_Value(PH, 0.1375), 1.1045);
         }
     }
     PHUnits = ToUnits;
 }