예제 #1
0
        public void SetValue(double value, PressureTypes type)
        {
            switch (type)
            {
            case PressureTypes.KilogramsSquareCentimeter:
                _value = value;
                break;

            case PressureTypes.Atmospheres:
                _value = value * 1.0332274527999;
                break;

            case PressureTypes.Bars:
                _value = value * 1.0197162129779;
                break;

            case PressureTypes.InchesMercury:
                _value = value * 0.034531465893042;
                break;

            case PressureTypes.NewtonsSquareCentimeter:
                _value = value * 0.10197162129779;
                break;

            case PressureTypes.NewtonsSquareMeter:
                _value = value * 0.000010197162129779;
                break;

            case PressureTypes.PSI:
                _value = value * 0.070306957833135;
                break;

            case PressureTypes.Pascals:
                _value = value * 0.000010197162129779;
                break;
            }
        }
예제 #2
0
 public Pressure(double value, PressureTypes type)
 {
     SetValue(value, type);
 }