/****************************************************************************/ public static string Symbol(bool bStandard, Fluid.Size eSize) { if (eSize == Size.Small) { return(bStandard ? Resource.Fluid_Ounces : Resource.Fluid_Milliliters); } return(bStandard ? Resource.Fluid_Gallons : Resource.Fluid_Liters); }
/****************************************************************************/ public string ToString(bool bStandard, int nDecimalPlaces, bool bLong, Fluid.Size eSize) { string strUOM = bLong ? (" " + Symbol(bStandard, eSize)) : ""; double dValue = 0.0; if (eSize == Size.Small) { dValue = bStandard ? this.Ounces : this.Milliliters; } else { dValue = bStandard ? this.Gallons : this.Liters; } return(string.Format("{0:f" + nDecimalPlaces.ToString() + "}{1}", dValue, strUOM)); }
/****************************************************************************/ public string ToString(bool bStandard, Fluid.Size eSize) { return(ToString(bStandard, 1, true, eSize)); }