Ejemplo n.º 1
0
        /// <summary>
        /// Subtraction
        /// </summary>
        /// <param name="val1"></param>
        /// <param name="val2"></param>
        /// <returns></returns>
        public static Millimeters operator -(Millimeters val1, MLength val2)
        {
            Millimeters newVal = new Millimeters();

            newVal._val = (val1.ToMicrons - val2.ToMicrons) / newVal.MicronsPerUnit;
            return(newVal);
        }
Ejemplo n.º 2
0
        public void RegisterProperty(Expression <Func <Millimeters> > property)
        {
            _property = property;
            CompBase comp = U.GetComponentFromPropExpression(_property);
            //object obj = (comp as AppProductRecipe).GetPropValue(property);
            object obj = comp.GetPropValue(_property);

            _position = (obj as MDouble.Millimeters);
            U.RegisterOnChanged(property, OnTeachPositionChanged);
        }
Ejemplo n.º 3
0
 private void OnTeachPositionChanged(MDouble.Millimeters property)
 {
     _position.Val = property.Val;
 }