Example #1
0
        public object Clone()
        {
            var tmp = new measureSystemUnitEntry(unit, nameSingular, namePlural);

            tmp.setObjectBySource(this);
            return(tmp);
        }
Example #2
0
        /// <summary>
        /// Converts to optimal unit level.
        /// </summary>
        public void convertToOptimalUnitLevel()
        {
            if (!doUnitOptimization)
            {
                return;
            }
            measureSystemUnitEntry optimalUnit = info.system.GetOptimalUnit(info.unit, GetFormatedValue().Length);

            if (optimalUnit != info.unit)
            {
                convertToUnit(optimalUnit);
            }
        }
 internal void setup(measureSystemUnitEntry __unit, measureSystemRoleEntry __role, measureDecadeSystem __system)
 {
     system = __system;
     unit   = __unit;
     role   = __role;
 }
Example #4
0
 public abstract void convertToUnit(measureSystemUnitEntry targetUnit);
 public void Add(measureSystemUnitEntry unit)
 {
     items.Add(unit);
     byFactor.Add(unit, unit.factor);
 }
 public Int32 IndexOf(measureSystemUnitEntry item)
 {
     return(sortedByFactor.IndexOf(item));
 }