Exemplo n.º 1
0
        public void TransitionDataConstructorWithPropertyArray()
        {
            tlog.Debug(tag, $"TransitionDataConstructorWithPropertyArray START");

            var strAlpha = AlphaFunction.BuiltinFunctions.Default.GetDescription();
            var animator = new PropertyMap();

            using (PropertyValue myAlpha = new PropertyValue(strAlpha))
            {
                animator.Add("alphaFunction", myAlpha);
            }
            var transition = new PropertyMap();

            using (PropertyValue myAnimator = new PropertyValue(animator))
            {
                transition.Add("animator", myAnimator);
            }
            var animateArray = new PropertyArray();

            using (PropertyValue pvTransition = new PropertyValue(transition))
            {
                animateArray.Add(pvTransition);
            }

            var testingTarget = new TransitionData(animateArray);

            Assert.IsNotNull(testingTarget, "should be not null");
            Assert.IsInstanceOf <TransitionData>(testingTarget, "should be an instance of TransitionData class!");

            testingTarget.Dispose();
            tlog.Debug(tag, $"TransitionDataConstructorWithPropertyArray END (OK)");
        }
Exemplo n.º 2
0
        public void PathGetPointCount()
        {
            tlog.Debug(tag, $"PathGetPointCount START");

            var testingTarget = new Path();

            Assert.IsNotNull(testingTarget, "should be not null");
            Assert.IsInstanceOf <Path>(testingTarget, "should be an instance of Path class!");

            Vector2 stageSize = Window.Instance.WindowSize;

            var points = new PropertyArray();

            Assert.IsNotNull(points, "should be not null");
            Assert.IsInstanceOf <PropertyArray>(points, "should be an instance of PropertyArray class!");
            points.PushBack(new PropertyValue(new Vector3(stageSize.X * 0.5f, 0.0f, stageSize.X * 0.5f)));
            points.PushBack(new PropertyValue(new Vector3(0.0f, 0.0f, 0.0f)));
            points.PushBack(new PropertyValue(new Vector3(-stageSize.X * 0.5f, 0.0f, stageSize.X * 0.5f)));
            testingTarget.Points = points;

            var result = testingTarget.GetPointCount();

            Assert.IsTrue(3 == result);

            points.Dispose();
            testingTarget.Dispose();
            tlog.Debug(tag, $"PathGetPointCount END (OK)");
        }
Exemplo n.º 3
0
        public void PathPointsSet()
        {
            tlog.Debug(tag, $"PathPointsSet START");

            var testingTarget = new Path();

            Assert.IsNotNull(testingTarget, "should be not null");
            Assert.IsInstanceOf <Path>(testingTarget, "should be an instance of Path class!");

            PropertyArray dummy = new PropertyArray();

            dummy.Add(new PropertyValue(new Vector3(0.5f, 0.0f, 0.8f)));

            testingTarget.Points = dummy;   //Set
            Vector3 vec    = new Vector3(0, 0, 0);
            var     result = testingTarget.Points[0].Get(vec);

            Assert.IsTrue(0.5f == vec.X);
            Assert.IsTrue(0.0f == vec.Y);
            Assert.IsTrue(0.8f == vec.Z);

            dummy.Dispose();
            vec.Dispose();
            testingTarget.Dispose();
            tlog.Debug(tag, $"PathPointsSet END (OK)");
        }
Exemplo n.º 4
0
        public void PathGetControlPoint()
        {
            tlog.Debug(tag, $"PathGetControlPoint START");

            var testingTarget = new Path();

            Assert.IsNotNull(testingTarget, "should be not null");
            Assert.IsInstanceOf <Path>(testingTarget, "should be an instance of Path class!");

            using (PropertyArray points = new PropertyArray())
            {
                Assert.IsNotNull(points, "should be not null");
                Assert.IsInstanceOf <PropertyArray>(points, "should be an instance of PropertyArray class!");
                points.PushBack(new PropertyValue(new Vector3(1920 * 0.5f, 0.0f, 1920 * 0.5f)));
                points.PushBack(new PropertyValue(new Vector3(0.0f, 0.0f, 0.0f)));
                points.PushBack(new PropertyValue(new Vector3(-1920 * 0.5f, 0.0f, 1920 * 0.5f)));
                testingTarget.Points = points;

                testingTarget.GenerateControlPoints(0.5f);

                try
                {
                    var result = testingTarget.GetControlPoint(1);
                }
                catch (Exception e)
                {
                    tlog.Debug(tag, e.Message.ToString());
                    Assert.Fail("Caught Exception: Failed!");
                }
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"PathGetControlPoint END (OK)");
        }
Exemplo n.º 5
0
        public void PathGetPoint()
        {
            tlog.Debug(tag, $"PathGetPoint START");

            var testingTarget = new Path();

            Assert.IsNotNull(testingTarget, "should be not null");
            Assert.IsInstanceOf <Path>(testingTarget, "should be an instance of Path class!");

            var points = new PropertyArray();

            Assert.IsNotNull(points, "should be not null");
            Assert.IsInstanceOf <PropertyArray>(points, "should be an instance of PropertyArray class!");
            points.PushBack(new PropertyValue(new Vector3(1920 * 0.5f, 0.0f, 1920 * 0.5f)));
            points.PushBack(new PropertyValue(new Vector3(0.0f, 0.0f, 0.0f)));
            points.PushBack(new PropertyValue(new Vector3(-1920 * 0.5f, 0.0f, 1920 * 0.5f)));
            testingTarget.Points = points;

            var result = testingTarget.GetPoint(2);

            Assert.IsTrue(-960 == result.X);
            Assert.IsTrue(0 == result.Y);
            Assert.IsTrue(960 == result.Z);

            points.Dispose();
            testingTarget.Dispose();
            tlog.Debug(tag, $"PathGetPoint END (OK)");
        }
Exemplo n.º 6
0
        public void PathGenerateControlPoints()
        {
            tlog.Debug(tag, $"PathGenerateControlPoints START");

            var testingTarget = new Path();

            Assert.IsNotNull(testingTarget, "should be not null");
            Assert.IsInstanceOf <Path>(testingTarget, "should be an instance of Path class!");

            var points = new PropertyArray();

            Assert.IsNotNull(points, "should be not null");
            Assert.IsInstanceOf <PropertyArray>(points, "should be an instance of PropertyArray class!");
            points.PushBack(new PropertyValue(new Vector3(1920 * 0.5f, 0.0f, 1920 * 0.5f)));
            points.PushBack(new PropertyValue(new Vector3(0.0f, 0.0f, 0.0f)));
            points.PushBack(new PropertyValue(new Vector3(-1920 * 0.5f, 0.0f, 1920 * 0.5f)));
            testingTarget.Points = points;

            testingTarget.GenerateControlPoints(0.5f);
            Vector3 vec    = new Vector3(0, 0, 0);
            var     result = testingTarget.ControlPoints[0].Get(vec);

            Assert.IsTrue(480 == vec.X);
            Assert.IsTrue(0 == vec.Y);
            Assert.IsTrue(480 == vec.Z);

            points.Dispose();
            testingTarget.Dispose();
            tlog.Debug(tag, $"PathGenerateControlPoints END (OK)");
        }
Exemplo n.º 7
0
        public override void Init(ArkArchive archive, PropertyArray property)
        {
            int size = archive.ReadInt();

            ArkName structType = StructRegistry.MapArrayNameToTypeName(property.Name);

            if (structType == null)
            {
                if (size * 4 + 4 == property.DataSize)
                {
                    structType = color;
                }
                else if (size * 12 + 4 == property.DataSize)
                {
                    structType = vector;
                }
                else if (size * 16 + 4 == property.DataSize)
                {
                    structType = linearColor;
                }
            }

            for (int n = 0; n < size; n++)
            {
                Add(StructRegistry.ReadBinary(archive, structType));
            }
        }
Exemplo n.º 8
0
        public BrushImageTestPage()
        {
            InitializeComponent();

            ButtonSolid.Clicked          += OnClickedSolid;
            ButtonGradientLinear.Clicked += OnClickedLinear;
            ButtonGradientRadial.Clicked += OnClickedRadial;

            Image1.SetImage(ResourcePath + "tizen.png");
            Image2.SetImage(ResourcePath + "xamarin_logo.png");

            PropertyArray stopColor = new PropertyArray();

            stopColor.Add(new PropertyValue(new Vector4(255.0f, 0.0f, 0.0f, 255.0f) / 255.0f));
            stopColor.Add(new PropertyValue(new Vector4(0.0f, 255.0f, 0.0f, 255.0f) / 255.0f));

            LinearGradient               = new GradientVisual();
            LinearGradient.StopColor     = stopColor;
            LinearGradient.StartPosition = new Vector2(0.0f, 0.0f);
            LinearGradient.EndPosition   = new Vector2(0.3f, 0.3f);
            LinearGradient.Origin        = Visual.AlignType.TopBegin;

            RadialGradient           = new GradientVisual();
            RadialGradient.Center    = new Vector2(0.0f, 0.0f);
            RadialGradient.Radius    = 0.5f;
            RadialGradient.StopColor = stopColor;
            RadialGradient.Origin    = Visual.AlignType.TopBegin;
        }
Exemplo n.º 9
0
 /// <summary>
 /// Overrides the parent method.
 /// </summary>
 /// <since_tizen> 3 </since_tizen>
 public override void OnInitialize()
 {
     //Initialize empty
     visualDictionary   = new Dictionary <int, VisualBase>();
     tranformDictionary = new Dictionary <int, PropertyMap>();
     animateArray       = new PropertyArray();
 }
Exemplo n.º 10
0
        public void GradientVisualStopColor()
        {
            tlog.Debug(tag, $"GradientVisualStopColor START");

            var testingTarget = new GradientVisual();

            Assert.IsNotNull(testingTarget, "Can't create success object GradientVisual");
            Assert.IsInstanceOf <GradientVisual>(testingTarget, "Should be an instance of GradientVisual type.");

            PropertyArray array = new PropertyArray();

            for (float i = 0; i < 5; i += 1.0f)
            {
                array.Add(new PropertyValue(i));
            }
            testingTarget.StopColor = array;

            PropertyArray result = testingTarget.StopColor;

            Assert.IsNotNull(result, "Should not be null");
            Assert.AreEqual(array.Count(), result.Count(), "Should be equals to the set count");

            float set_value = 0.0f;
            float get_value = 0.0f;

            for (uint i = 0; i < array.Count(); i++)
            {
                array[i].Get(out set_value);
                result[i].Get(out get_value);
                Assert.AreEqual(set_value, get_value, "index" + i + " should be equals to set value");
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"GradientVisualStopColor END (OK)");
        }
Exemplo n.º 11
0
        private void SetupInnerPageCubeEffect()
        {
            Vector2 stageSize = Window.Instance.WindowSize;

            Path          path   = new Path();
            PropertyArray points = new PropertyArray();

            points.PushBack(new PropertyValue(new Vector3(stageSize.X * 0.5f, 0.0f, stageSize.X * 0.5f)));
            points.PushBack(new PropertyValue(new Vector3(0.0f, 0.0f, 0.0f)));
            points.PushBack(new PropertyValue(new Vector3(-stageSize.X * 0.5f, 0.0f, stageSize.X * 0.5f)));
            path.Points = points;

            PropertyArray controlPoints = new PropertyArray();

            controlPoints.PushBack(new PropertyValue(new Vector3(stageSize.X * 0.5f, 0.0f, stageSize.X * 0.3f)));
            controlPoints.PushBack(new PropertyValue(new Vector3(stageSize.X * 0.3f, 0.0f, 0.0f)));
            controlPoints.PushBack(new PropertyValue(new Vector3(-stageSize.X * 0.3f, 0.0f, 0.0f)));
            controlPoints.PushBack(new PropertyValue(new Vector3(-stageSize.X * 0.5f, 0.0f, stageSize.X * 0.3f)));
            path.ControlPoints = controlPoints;

            mScrollViewEffect = new ScrollViewPagePathEffect(path,
                                                             new Vector3(-1.0f, 0.0f, 0.0f),
                                                             ScrollView.Property.SCROLL_FINAL_X,
                                                             new Vector3(stageSize.X * TABLE_RELATIVE_SIZE.X, stageSize.Y * TABLE_RELATIVE_SIZE.Y, 0.0f), mTotalPages);
        }
Exemplo n.º 12
0
        public void PropertyValueConstructorWithPropertyArray()
        {
            tlog.Debug(tag, $"PropertyValueConstructorWithPropertyArray START");

            PropertyArray dummy_array = new PropertyArray();

            Assert.IsNotNull(dummy_array, "Should be not null!");
            Assert.IsInstanceOf <PropertyArray>(dummy_array, "Should return PropertyArray instance.");

            PropertyValue dummy_value1 = new PropertyValue(14.0f);

            Assert.IsNotNull(dummy_value1, "Should be not null!");
            Assert.IsInstanceOf <PropertyValue>(dummy_value1, "Should return PropertyValue instance.");

            PropertyValue dummy_value2 = new PropertyValue(15.0f);

            Assert.IsNotNull(dummy_value2, "Should be not null!");
            Assert.IsInstanceOf <PropertyValue>(dummy_value2, "Should return PropertyValue instance.");

            dummy_array.Add(dummy_value1);
            dummy_array.Add(dummy_value2);

            var testingTarget = new PropertyValue(dummy_array);

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <PropertyValue>(testingTarget, "Should return PropertyValue instance.");

            testingTarget.Dispose();
            dummy_value2.Dispose();
            dummy_value1.Dispose();
            dummy_array.Dispose();

            tlog.Debug(tag, $"PropertyValueConstructorWithPropertyArray END (OK)");
        }
Exemplo n.º 13
0
        public void PropertyValueGetPropertyArrayValue()
        {
            tlog.Debug(tag, $"PropertyValueGetPropertyArrayValue START");

            PropertyArray propertyArray = new PropertyArray();

            propertyArray.Add(new PropertyValue(3.0f));

            PropertyValue propertyValue = new PropertyValue(propertyArray);

            var testingTarget = new PropertyArray();

            Assert.IsNotNull(testingTarget, "Should be not null!");
            Assert.IsInstanceOf <PropertyArray>(testingTarget, "Should be an Instance of PropertyArray class!");

            var result = propertyValue.Get(testingTarget);

            Assert.IsTrue(result);

            float temp = 0.0f;

            testingTarget[0].Get(out temp);
            Assert.AreEqual(3.0f, temp, "should be equal.");

            testingTarget.Dispose();
            propertyValue.Dispose();
            propertyArray.Dispose();
            tlog.Debug(tag, $"PropertyValueGetPropertyArrayValue END (OK)");
        }
Exemplo n.º 14
0
 /// <summary>
 /// Create an instance of TransitionData.
 /// </summary>
 /// <param name="transition">The transition data to store (an array of maps of animators).</param>
 /// <since_tizen> 3 </since_tizen>
 public TransitionData(PropertyArray transition) : this(NDalicPINVOKE.TransitionData_New__SWIG_1(PropertyArray.getCPtr(transition)), true)
 {
     if (NDalicPINVOKE.SWIGPendingException.Pending)
     {
         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     }
 }
        public static ArkContainer GetCryopodCreature(this GameObject gameObject)
        {
            StructPropertyList customData      = gameObject.GetPropertyValue <IArkArray, ArkArrayStruct>("CustomItemDatas").FirstOrDefault() as StructPropertyList;
            PropertyStruct     customDataBytes = customData?.Properties.FirstOrDefault(p => p.NameString == "CustomDataBytes") as PropertyStruct;
            PropertyArray      byteArrays      = (customDataBytes?.Value as StructPropertyList)?.Properties.FirstOrDefault(property => property.NameString == "ByteArrays") as PropertyArray;
            ArkArrayStruct     byteArraysValue = byteArrays?.Value as ArkArrayStruct;

            if (!(((byteArraysValue?[0] as StructPropertyList)?.Properties.FirstOrDefault(p => p.NameString == "Bytes") as PropertyArray)?.Value is ArkArrayUInt8 creatureBytes))
            {
                return(null);
            }
            ArkContainer creature = new ArkContainer(creatureBytes);

            /*
             * ArkArrayUInt8 saddleBytes = ((byteArraysValue?[1] as StructPropertyList)?.Properties.FirstOrDefault(p => p.NameString == "Bytes") as PropertyArray)?.Value as ArkArrayUInt8;
             *
             * using (MemoryStream stream = new MemoryStream(saddleBytes?.ToArray())) {
             *  using (ArkArchive archive = new ArkArchive(stream)) {
             *      int objectCount = archive.ReadInt();
             *
             *      //List<GameObject> objects = new List<GameObject>();
             *      //for (int i = 0; i < objectCount; i++) {
             *      //    //objects.Add(new GameObject(archive));
             *      //}
             *  }
             * }
             */
            return(creature);
        }
Exemplo n.º 16
0
        public void AnimationAnimatePathWithStartTimeAndEndTime()
        {
            tlog.Debug(tag, $"AnimationAnimatePathWithStartTimeAndEndTime START");

            View view = new View()
            {
                Size = new Size(200, 300)
            };

            Path          path   = new Path();
            PropertyArray points = new PropertyArray();

            points.PushBack(new PropertyValue(new Vector3(0.5f, 0.0f, 0.8f)));
            points.PushBack(new PropertyValue(new Vector3(0.9f, 0.3f, 0.0f)));
            path.Points = points;

            var testingTarget = new Animation(600);

            Assert.IsNotNull(testingTarget, "should be not null");
            Assert.IsInstanceOf <Animation>(testingTarget, "should be an instance of Animation class!");

            testingTarget.EndAction = Animation.EndActions.StopFinal;
            testingTarget.AnimatePath(view, path, new Vector3(0.0f, 0.6f, 1.2f), 0, 600);

            testingTarget.Dispose();
            points.Dispose();
            path.Dispose();
            view.Dispose();
            tlog.Debug(tag, $"AnimationAnimatePathWithStartTimeAndEndTime END (OK)");
        }
Exemplo n.º 17
0
        protected override void UpdateImage()
        {
            if (!imagePropertyUpdatedFlag)
            {
                return;
            }

            if (resourceURLs != null && resourceURLs.Count != 0)
            {
                using (PropertyArray indexPropertyArray = new PropertyArray())
                {
                    PropertyArray returnedArr = new PropertyArray();
                    foreach (var iter in resourceURLs)
                    {
                        using (PropertyValue index = new PropertyValue(iter))
                        {
                            returnedArr = indexPropertyArray.Add(index);
                        }
                    }
                    returnedArr.Dispose();
                    using PropertyValue arrayProperty = new PropertyValue(indexPropertyArray);

                    // Trigger the ImageView so that we have something update
                    UpdateImage(ImageVisualProperty.URL, arrayProperty);
                }
            }

            using PropertyValue animatiedImage = new PropertyValue((int)Visual.Type.AnimatedImage);
            UpdateImage(Visual.Property.Type, animatiedImage);

            base.UpdateImage();
        }
Exemplo n.º 18
0
        public void ItemViewLayout()
        {
            tlog.Debug(tag, $"ItemViewLayout START");

            using (ItemFactory factory = new ItemFactory())
            {
                var testingTarget = new ItemView(factory);
                Assert.IsNotNull(testingTarget, "Should be not null!");
                Assert.IsInstanceOf <ItemView>(testingTarget, "Should be an Instance of ItemView!");

                using (PropertyArray propertyArray = new PropertyArray())
                {
                    propertyArray.Add(new PropertyValue(new Size2D(100, 80)));
                    testingTarget.Layout = propertyArray;

                    try
                    {
                        testingTarget.Layout = propertyArray;
                        tlog.Debug(tag, "Layout : " + testingTarget.Layout);
                    }
                    catch (Exception e)
                    {
                        tlog.Debug(tag, e.Message.ToString());
                        Assert.Fail("Caught Exception: Failed!");
                    }
                }

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"ItemViewLayout END (OK)");
        }
Exemplo n.º 19
0
        public void SetValues()
        {
            if (mDirtyFlag == false)
            {
                return;
            }
            mDirtyFlag = false;

            PropertyMap tMap = new PropertyMap();

            tMap.Insert(Visual.Property.Type, new PropertyValue((int)Visual.Type.AnimatedImage));
            if (mResourceURLs?.Count != 0)
            {
                PropertyArray tArr = new PropertyArray();
                foreach (var iter in mResourceURLs)
                {
                    tArr.Add(new PropertyValue(iter));
                }
                tMap.Insert(ImageVisualProperty.URL, new PropertyValue(tArr));
                tMap.Insert(ImageVisualProperty.BatchSize, new PropertyValue(mBatchSize));
                tMap.Insert(ImageVisualProperty.CacheSize, new PropertyValue(mCacheSize));
                tMap.Insert(ImageVisualProperty.FrameDelay, new PropertyValue(mFrameDelay));
                tMap.Insert(ImageVisualProperty.LoopCount, new PropertyValue(mLoopCount));
            }
            else
            {
                tMap.Insert(ImageVisualProperty.URL, new PropertyValue(mUrl));
            }

            mMap = tMap;
            SetProperty(ImageView.Property.IMAGE, new PropertyValue(mMap));
        }
Exemplo n.º 20
0
        public void LinearConstrainerProgress()
        {
            tlog.Debug(tag, $"LinearConstrainerProgress START");

            var testingTarget = new LinearConstrainer();

            Assert.IsNotNull(testingTarget, "should be not null");
            Assert.IsInstanceOf <LinearConstrainer>(testingTarget, "should be an instance of testing target class!");

            try
            {
                using (PropertyArray arr = new PropertyArray())
                {
                    arr.PushBack(new PropertyValue(0.3f));

                    testingTarget.Progress = arr;
                    tlog.Debug(tag, "Progress : " + testingTarget.Progress);
                }
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"LinearConstrainerProgress END (OK)");
        }
Exemplo n.º 21
0
        private void SetupInnerPageCubeEffect()
        {
            Vector2 stageSize = NUIApplication.GetDefaultWindow().WindowSize;

            Path          path   = new Path();
            PropertyArray points = new PropertyArray();

            points.PushBack(new PropertyValue(new Vector3(stageSize.X * 0.5f, 0.0f, stageSize.X * 0.5f)));
            points.PushBack(new PropertyValue(new Vector3(0.0f, 0.0f, 0.0f)));
            points.PushBack(new PropertyValue(new Vector3(-stageSize.X * 0.5f, 0.0f, stageSize.X * 0.5f)));
            path.Points = points;

            PropertyArray controlPoints = new PropertyArray();

            controlPoints.PushBack(new PropertyValue(new Vector3(stageSize.X * 0.5f, 0.0f, stageSize.X * 0.3f)));
            controlPoints.PushBack(new PropertyValue(new Vector3(stageSize.X * 0.3f, 0.0f, 0.0f)));
            controlPoints.PushBack(new PropertyValue(new Vector3(-stageSize.X * 0.3f, 0.0f, 0.0f)));
            controlPoints.PushBack(new PropertyValue(new Vector3(-stageSize.X * 0.5f, 0.0f, stageSize.X * 0.3f)));
            path.ControlPoints = controlPoints;

            mScrollViewEffect = new ScrollViewPagePathEffect(path,
                                                             new Vector3(-1.0f, 0.0f, 0.0f),
                                                             ScrollView.Property.ScrollFinalX,
                                                             new Vector3(stageSize.X * TABLE_RELATIVE_SIZE.X, stageSize.Y * TABLE_RELATIVE_SIZE.Y, 0.0f), mTotalPages);
        }
Exemplo n.º 22
0
        private void addSubProperties(ObjectBase obj, TreeNode node)
        {
            List <ClassPropertyInfo> cpList = new List <ClassPropertyInfo>();

            obj.getPropertyValues(cpList);

            foreach (ClassPropertyInfo cp in cpList)
            {
                //check to see if the property had a container...
                PropertyArray container = cp.mArray;
                if (container != null && container.getElementType() == ClassPropertyType.PropertyType_Object)
                {
                    System.Windows.Forms.TreeNode prop = new TreeNode(cp.mName);

                    PropertyClassSelection propSelection = new PropertyClassSelection();
                    propSelection.cp         = cp;
                    propSelection.obj        = obj;
                    propSelection.treeNode   = prop;
                    propSelection.parentNode = node;
                    prop.Tag = propSelection;
                    node.Nodes.Add(prop);

                    //tell treenode to allow new elements to be added
                    prop.ContextMenuStrip = objectListContextMenuStrip;

                    uint len = container.size();
                    for (uint i = 0; i < len; i++)
                    {
                        PropertyValue pv = container[i];
                        addSubObject(pv.getObject(), prop);
                    }
                }
            }
        }
Exemplo n.º 23
0
 internal PropertyArray(PropertyArray other) : this(Interop.Property.new_Property_Array__SWIG_1(PropertyArray.getCPtr(other)), true)
 {
     if (NDalicPINVOKE.SWIGPendingException.Pending)
     {
         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Exemplo n.º 24
0
        public PropertySet Copy()
        {
            PropertySet propertySet = new PropertySet();

            propertySet.PropertyArray = PropertyArray == null ? null : PropertyArray.Select(o => new PropertySetProperty(o.Key, o.Value)).ToArray();
            return(propertySet);
        }
Exemplo n.º 25
0
        public void SetValues()
        {
            if (mDirtyFlag == false)
            {
                return;
            }
            mDirtyFlag = false;

            PropertyMap   tMap           = new PropertyMap();
            PropertyValue animatiedImage = new PropertyValue((int)Visual.Type.AnimatedImage);

            tMap.Insert(Visual.Property.Type, animatiedImage);
            if (mResourceURLs?.Count != 0)
            {
                PropertyArray mArray      = new PropertyArray();
                PropertyArray returnedArr = new PropertyArray();
                PropertyValue index       = new PropertyValue();
                foreach (var iter in mResourceURLs)
                {
                    index       = new PropertyValue(iter);
                    returnedArr = mArray.Add(index);
                }
                index.Dispose();
                returnedArr.Dispose();
                PropertyValue array = new PropertyValue(mArray);
                tMap.Insert(ImageVisualProperty.URL, array);
                PropertyValue batchSize = new PropertyValue(mBatchSize);
                tMap.Insert(ImageVisualProperty.BatchSize, batchSize);
                PropertyValue cacheSize = new PropertyValue(mCacheSize);
                tMap.Insert(ImageVisualProperty.CacheSize, cacheSize);
                PropertyValue frameDelay = new PropertyValue(mFrameDelay);
                tMap.Insert(ImageVisualProperty.FrameDelay, frameDelay);
                PropertyValue loopCount = new PropertyValue(mLoopCount);
                tMap.Insert(ImageVisualProperty.LoopCount, loopCount);

                loopCount.Dispose();
                frameDelay.Dispose();
                cacheSize.Dispose();
                batchSize.Dispose();
                mArray.Dispose();
                array.Dispose();
            }
            else
            {
                PropertyValue url = new PropertyValue(mUrl);
                tMap.Insert(ImageVisualProperty.URL, url);
                url.Dispose();
            }

            mMap = tMap;
            PropertyValue map = new PropertyValue(mMap);

            SetProperty(ImageView.Property.IMAGE, map);
            map.Dispose();

            tMap.Dispose();
            animatiedImage.Dispose();
        }
        public static IArkArray ReadBinary(ArkArchive archive, ArkName arrayType, PropertyArray property)
        {
            if (arrayType != null && types.TryGetValue(arrayType, out ArkArrayConstructor constructor))
            {
                return(constructor.BinaryConstructor(archive, property));
            }

            throw new UnreadablePropertyException($"Unknown Array Type {arrayType} at {archive.Position:X4}");
        }
Exemplo n.º 27
0
        // PropertyArray list --> Remove
        private void removeToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            ObjectBase obj = mValue.mPropertySelection.obj;

            PropertyArray  vector = mValue.mPropertySelection.cp.mArray;
            PropertyObject po     = new PropertyObject(obj);

            vector.remove(po);
        }
Exemplo n.º 28
0
        //private static long serialVersionUID = 1L;

        public override void Init(ArkArchive archive, PropertyArray property)
        {
            int size = archive.ReadInt();

            for (int n = 0; n < size; n++)
            {
                Add(archive.ReadShort());
            }
        }
Exemplo n.º 29
0
        //private static long serialVersionUID = 1L;

        public override void Init(ArkArchive archive, PropertyArray property)
        {
            int size = archive.ReadInt();

            for (int n = 0; n < size; n++)
            {
                Add(new ObjectReference(archive, 8)); // Fixed size?
            }
        }
        public static IArkArray ReadJson(JArray node, ArkName arrayType, PropertyArray property)
        {
            if (arrayType != null && types.TryGetValue(arrayType, out ArkArrayConstructor constructor))
            {
                return(constructor.JsonConstructor(node, property));
            }

            throw new UnreadablePropertyException("Unknown Array Type " + arrayType);
        }