Exemplo n.º 1
0
        public ICommand SetQuantityDisplayValue(IQuantity quantity, double valueInDisplayUnit, IMoBiSimulation simulation)
        {
            var valueInBaseUnit = quantity.ConvertToBaseUnit(valueInDisplayUnit);

            return(SetQuantityBaseValue(quantity, valueInBaseUnit, simulation));
        }
Exemplo n.º 2
0
        public ICommand SetQuantityDisplayValue(IQuantity quantity, double valueInDisplayUnit, IBuildingBlock buildingBlock)
        {
            var valueInBaseUnit = quantity.ConvertToBaseUnit(valueInDisplayUnit);

            return(withUpdatedDefaultStateAndValueOrigin(new SetQuantityValueInBuildingBlockCommand(quantity, valueInBaseUnit, buildingBlock).Run(_context), quantity, buildingBlock));
        }