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