Esempio n. 1
0
 /// <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));
     }
 }
Esempio n. 2
0
 /// <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));
     }
 }