コード例 #1
0
ファイル: IntegerProperty.cs プロジェクト: SOFAgh/CADability
 public void SetObjectData(IJsonReadData data)
 {
     internalValue = data.GetProperty <int>("InternalValue");
     resourceId    = data.GetProperty <string>("resourceId");
     settingName   = data.GetPropertyOrDefault <string>("SettingName");
     specialValues = data.GetPropertyOrDefault <Dictionary <int, string> >("SpecialValues");
     data.RegisterForSerializationDoneCallback(this);
 }
コード例 #2
0
ファイル: BooleanProperty.cs プロジェクト: SOFAgh/CADability
        }                               // empty constructor for Json

        public void SetObjectData(IJsonReadData data)
        {
            internalValue    = data.GetProperty <bool>("InternalValue");
            resourceId       = data.GetProperty <string>("ResourceIdLabel");
            resourceIdValues = data.GetProperty <string>("ResourceIdValues");
            settingName      = data.GetProperty <string>("SettingName");
            data.RegisterForSerializationDoneCallback(this);
        }
コード例 #3
0
 public override void SetObjectData(IJsonReadData data)
 {
     base.SetObjectData(data);
     refPoint         = data.GetProperty <GeoPoint>("RefPoint");
     containedObjects = data.GetProperty <GeoObjectList>("ContainedObjects");
     colorDef         = data.GetPropertyOrDefault <ColorDef>("ColorDef");
     name             = data.GetPropertyOrDefault <string>("Name");
     data.RegisterForSerializationDoneCallback(this);
 }
コード例 #4
0
 public override void SetObjectData(IJsonReadData data)
 {
     base.SetObjectData(data);
     facesToMove     = data.GetProperty <List <Face> >("FacesToMove");
     facesToKeep     = data.GetProperty <List <Face> >("FacesToKeep");
     affectedObjects = data.GetPropertyOrDefault <List <object> >("AffectedObjects");
     mode            = data.GetProperty <Mode>("Mode");
     fromHere        = data.GetProperty("FromHere");
     toHere          = data.GetProperty("ToHere");
     // there is a problem with objects been serialized as "JsonVersion.serializeAsStruct". fromHere and toHere should always be GeoPoints in future versions
     if (fromHere is double[])
     {
         fromHere = data.GetProperty <GeoPoint>("FromHere");
     }
     if (toHere is double[])
     {
         toHere = data.GetProperty <GeoPoint>("ToHere");
     }
     data.RegisterForSerializationDoneCallback(this);
 }
コード例 #5
0
 public void SetObjectData(IJsonReadData data)
 {
     periodicSurface = data.GetProperty <ISurface>("PeriodicSurface");
     periodicBounds  = data.GetProperty <BoundingRect>("PeriodicBounds");
     data.RegisterForSerializationDoneCallback(this);
 }