Esempio 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);
        }
Esempio 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);
        }
Esempio n. 3
0
 private void OnTeachPositionChanged(MDouble.Millimeters property)
 {
     _position.Val = property.Val;
 }