/// <summary>
 /// Handler for if a child double changes
 /// </summary>
 /// <param name="elementID">Element Id</param>
 /// <param name="newValue">New Value</param>
 protected virtual void OnDoubleElementChanged(long elementID, double newValue)
 {
     if (primitiveMap.ContainsKey(elementID))
     {
         SyncPrimitive primitive = primitiveMap[elementID];
         primitive.UpdateFromRemote(newValue);
         NotifyPrimitiveChanged(primitive);
     }
     else
     {
         LogUnknownElement(elementID.ToString(), newValue.ToString(CultureInfo.InvariantCulture), typeof(double));
     }
 }
 /// <summary>
 /// Handler for if a child string changes
 /// </summary>
 /// <param name="elementID">Element Id</param>
 /// <param name="newValue">New Value</param>
 protected virtual void OnStringElementChanged(long elementID, XString newValue)
 {
     if (primitiveMap.ContainsKey(elementID))
     {
         SyncPrimitive primitive = primitiveMap[elementID];
         primitive.UpdateFromRemote(newValue);
         NotifyPrimitiveChanged(primitive);
     }
     else
     {
         LogUnknownElement(elementID.ToString(), newValue.GetString(), typeof(string));
     }
 }
Beispiel #3
0
 // Handler for if a child float changes
 protected virtual void OnFloatElementChanged(long elementID, float newValue)
 {
     if (this.primitiveMap.ContainsKey(elementID))
     {
         SyncPrimitive primitive = this.primitiveMap[elementID];
         primitive.UpdateFromRemote(newValue);
         NotifyPrimitiveChanged(primitive);
     }
     else
     {
         LogUnknownElement(elementID.ToString(), newValue.ToString(), typeof(float));
     }
 }