Exemplo n.º 1
0
        }                                  // for JSON

        public void SetObjectData(IJsonReadData data)
        {
            center = data.GetProperty <GeoPoint>("Center");
            xAxis  = data.GetProperty <GeoVector>("XAxis");
            yAxis  = data.GetProperty <GeoVector>("YAxis");
            zAxis  = data.GetProperty <GeoVector>("ZAxis");
        }
Exemplo n.º 2
0
        }                                    // for JSON

        public void SetObjectData(IJsonReadData data)
        {
            location = data.GetProperty <GeoPoint>("Location");
            xAxis    = data.GetProperty <GeoVector>("XAxis");
            yAxis    = data.GetProperty <GeoVector>("YAxis");
            zAxis    = data.GetProperty <GeoVector>("ZAxis");
        }
Exemplo n.º 3
0
 new public void SetObjectData(IJsonReadData data)
 {
     base.SetObjectData(data);
     compoundShape = data.GetProperty <CompoundShape>("CompoundShape");
     hatchStyle    = data.GetProperty <HatchStyle>("HatchStyle");
     plane         = data.GetProperty <Plane>("Plane");
 }
Exemplo n.º 4
0
 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);
 }
Exemplo n.º 5
0
        }                               // 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);
        }
Exemplo n.º 6
0
 public override void SetObjectData(IJsonReadData data)
 {
     base.SetObjectData(data);
     startPoint  = data.GetProperty <GeoPoint>("StartPoint");
     endPoint    = data.GetProperty <GeoPoint>("EndPoint");
     colorDef    = data.GetPropertyOrDefault <ColorDef>("ColorDef");
     lineWidth   = data.GetPropertyOrDefault <LineWidth>("LineWidth");
     linePattern = data.GetPropertyOrDefault <LinePattern>("LinePattern");
 }
Exemplo n.º 7
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);
 }
Exemplo n.º 8
0
      public void SetObjectData(IJsonReadData data)
      {
          ApplicationName = data.GetStringProperty("ApplicationName");
          List <object> keys   = data.GetProperty <List <object> >("Keys");
          List <object> values = data.GetProperty <List <object> >("Values");

          for (int i = 0; i < keys.Count; i++)
          {
              Data.Add(new KeyValuePair <XDataCode, object>((XDataCode)(keys[i]), values[i]));
          }
      }
Exemplo n.º 9
0
        public void SetObjectData(IJsonReadData data)
        {
            selected    = data.GetProperty <int>("Selected");
            resourceId  = data.GetProperty <string>("ResourceId");
            settingName = data.GetProperty <string>("SettingName");

            base.propertyLabelText = StringTable.GetString(this.resourceId);
            base.choices           = StringTable.GetSplittedStrings(resourceId + ".Values");
            if (selected >= 0 && selected < base.choices.Length)
            {
                base.selectedText = base.choices[selected];
            }
        }
Exemplo n.º 10
0
 public void SetObjectData(IJsonReadData data)
 {
     string[] strings = data.GetProperty <string[]>("Strings");
     for (int i = 0; i < strings.Length; i++)
     {
         Add(strings[i]);
     }
 }
Exemplo n.º 11
0
 public void SetObjectData(IJsonReadData data)
 {
     name      = data.GetProperty <string>("Name");
     driveList = data.GetProperty <DriveList>("DriveList");
     object[] l = data.GetProperty <object[]>("Steps");
     steps = new Dictionary <IDrive, SortedList <double, double> >();
     for (int i = 0; i < l.Length; i = i + 3)
     {
         if (l[i + 1] is string)
         {   // why is this a string and not a double?
             AddPosition(l[i] as IDrive, double.Parse((string)l[i + 1]), double.Parse((string)l[i + 2]));
         }
         else
         {
             AddPosition(l[i] as IDrive, (double)l[i + 1], (double)l[i + 2]);
         }
     }
 }
Exemplo n.º 12
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);
 }
Exemplo n.º 13
0
 public void SetObjectData(IJsonReadData dict)
 {
     name   = dict.GetProperty("Name") as string;
     source = dict.GetProperty <ColorSource>("Source");
     color  = Color.FromArgb(dict.GetIntProperty("Color"));
 }
Exemplo n.º 14
0
 public void SetObjectData(IJsonReadData data)
 {
     periodicSurface = data.GetProperty <ISurface>("PeriodicSurface");
     periodicBounds  = data.GetProperty <BoundingRect>("PeriodicBounds");
     data.RegisterForSerializationDoneCallback(this);
 }
Exemplo n.º 15
0
 public void SetObjectData(IJsonReadData data)
 {
     startPoint = data.GetProperty <GeoPoint2D>("StartPoint");
     endPoint   = data.GetProperty <GeoPoint2D>("EndPoint");
 }
Exemplo n.º 16
0
 public void SetObjectData(IJsonReadData data)
 {
     name    = data.GetStringProperty("Name");
     pattern = data.GetProperty <double[]>("Pattern");
     scale   = data.GetProperty <Scaling>("Scale");
 }
Exemplo n.º 17
0
 public void SetObjectData(IJsonReadData data)
 {
     position = data.GetProperty <GeoPoint>("Position");
     edges    = new HashSet <Edge>((data.GetProperty <Edge[]>("Edges")));
 }
Exemplo n.º 18
0
 public void SetObjectData(IJsonReadData data)
 {
     list     = data.GetProperty <List <IGeoObject> >("List");
     userData = data.GetProperty <UserData>("UserData");
 }
Exemplo n.º 19
0
 public void SetObjectData(IJsonReadData data)
 {
     name         = data.GetProperty <string>("Name");
     displayOrder = data.GetProperty <int>("DisplayOrder");
     transparency = data.GetProperty <int>("Transparency");
 }
Exemplo n.º 20
0
 public void SetObjectData(IJsonReadData data)
 {
     name  = data.GetStringProperty("Name");
     width = data.GetProperty <double>("Width");
     scale = data.GetProperty <Scaling>("Scale");
 }
Exemplo n.º 21
0
 public void SetObjectData(IJsonReadData data)
 {
     schedules = new List <Schedule>(data.GetProperty <Schedule[]>("Schedules"));
 }