Ejemplo n.º 1
0
 private void CreatePrintingDemoObjects()
 {
     if (ObjectSpace.FindObject <TreeListDemoObject>(null) == null)
     {
         TreeListDemoObject obj1 = ObjectSpace.CreateObject <TreeListDemoObject>();
         obj1.Caption = "Root object 1";
         obj1.Save();
         TreeListDemoObject obj2 = ObjectSpace.CreateObject <TreeListDemoObject>();
         obj2.Caption = "Root object 2";
         obj2.Save();
         TreeListDemoObject obj3 = ObjectSpace.CreateObject <TreeListDemoObject>();
         obj3.ParentObject = obj1;
         obj3.Caption      = "Nested object 1";
         obj3.Save();
         TreeListDemoObject obj4 = ObjectSpace.CreateObject <TreeListDemoObject>();
         obj4.ParentObject = obj2;
         obj4.Caption      = "Nested object 2";
         obj4.Save();
     }
     if (ObjectSpace.FindObject <GridDemoObject>(null) == null)
     {
         GridDemoObject obj1 = ObjectSpace.CreateObject <GridDemoObject>();
         obj1.Name            = "Object 1";
         obj1.IntegerProperty = 1;
         obj1.Save();
         GridDemoObject obj2 = ObjectSpace.CreateObject <GridDemoObject>();
         obj2.Name            = "Object 2";
         obj2.IntegerProperty = 2;
         obj2.Save();
     }
     if (ObjectSpace.FindObject <LayoutDemoObject>(null) == null)
     {
         LayoutDemoObject obj1 = ObjectSpace.CreateObject <LayoutDemoObject>();
         obj1.Name            = "Object for the layout printing demo";
         obj1.Key             = 1;
         obj1.BooleanProperty = true;
         obj1.DecimalProperty = 125.23M;
         obj1.IntegerProperty = 16;
         obj1.FloatProperty   = 21.3456F;
         obj1.StringProperty  = "Simple string";
         NestedObject1 obj2 = ObjectSpace.CreateObject <NestedObject1>();
         obj2.Name            = "NestedObject1";
         obj2.IntegerProperty = 634;
         obj2.Save();
         obj1.NestedObjectWithIntegerProperty.Add(obj2);
         NestedObject2 obj3 = ObjectSpace.CreateObject <NestedObject2>();
         obj3.Name            = "NestedObject2";
         obj3.BooleanProperty = true;
         obj3.Save();
         obj1.NestedObjectWithBooleanProperty.Add(obj3);
         obj1.Save();
     }
 }
Ejemplo n.º 2
0
 public bool Equals(NestedObject2 other)
 {
     if (this.nested_arr.Length != other.nested_arr.Length)
     {
         Debug.LogWarning("NestedObject2 : Lengths of nested_arr does not match. Type NestedObject[]");
         return(false);
     }
     for (int i = 0; i < this.nested_arr.Length; i++)
     {
         if (!this.nested_arr[i].Equals(other.nested_arr[i]))
         {
             Debug.LogWarning(String.Format("NestedObject2 : Field nested_arr[{0}] does not match. Type NestedObject[]", i));
             return(false);
         }
     }
     ;
     if (!this.nested_test.Equals(other.nested_test))
     {
         Debug.LogWarning("NestedObject2 : Field nested_test does not match. Type TestObject5");
         return(false);
     }
     ;
     return(true);
 }
Ejemplo n.º 3
0
 public TestObject6(NestedObject2 nested)
 {
     this.nested = nested;
 }