public void AnimatedVectorImageViewStopAsStopFinal()
        {
            tlog.Debug(tag, $"AnimatedVectorImageViewStopAsStopFinal START");

            var testingTarget = new AnimatedVectorImageView();

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

            testingTarget.ResourceUrl = url;

            testingTarget.Play();

            try
            {
                testingTarget.Stop(AnimatedVectorImageView.EndActions.StopFinal);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception: Failed!");
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"AnimatedVectorImageViewStopAsStopFinal END (OK)");
        }
        public void AnimatedVectorImageViewResourceUrl()
        {
            tlog.Debug(tag, $"AnimatedVectorImageViewResourceUrl START");

            var testingTarget = new AnimatedVectorImageView();

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

            testingTarget.ResourceUrl = url;
            Assert.AreEqual(url, testingTarget.ResourceUrl, "Should be equal");

            /** Set same url */
            try
            {
                testingTarget.ResourceUrl = url;
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception: Failed!");
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"AnimatedVectorImageViewResourceUrl END (OK)");
        }
        public void AnimatedVectorImageViewSetMinAndMaxFrame()
        {
            tlog.Debug(tag, $"AnimatedVectorImageViewSetMinAndMaxFrame START");

            var testingTarget = new AnimatedVectorImageView();

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

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

            /** minimumFrame > maximumFrame */
            try
            {
                testingTarget.SetMinAndMaxFrame(10, 1);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception: Failed!");
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"AnimatedVectorImageViewSetMinAndMaxFrame END (OK)");
        }
Beispiel #4
0
        public void AnimatedVectorImageViewCurrentFrame()
        {
            tlog.Debug(tag, $"AnimatedVectorImageViewCurrentFrame START");

            var testingTarget = new AnimatedVectorImageView();

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

            testingTarget.ResourceUrl = url;
            NUIApplication.GetDefaultWindow().GetDefaultLayer().Add(testingTarget);

            try
            {
                testingTarget.CurrentFrame = 200;
                var result = testingTarget.CurrentFrame;

                /** value < 0 */
                testingTarget.CurrentFrame = -3;
                Assert.AreEqual(0, testingTarget.CurrentFrame, "Should be equal!");
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception: Failed!");
            }

            NUIApplication.GetDefaultWindow().GetDefaultLayer().Remove(testingTarget);

            testingTarget.Dispose();
            tlog.Debug(tag, $"AnimatedVectorImageViewCurrentFrame END (OK)");
        }
        public void AnimatedVectorImageViewConstructorWithScale()
        {
            tlog.Debug(tag, $"AnimatedVectorImageViewConstructorWithScale START");

            var testingTarget = new AnimatedVectorImageView(0.3f);

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

            tlog.Debug(tag, $"AnimatedVectorImageViewConstructorWithScale END (OK)");
        }
        public void AnimatedVectorImageViewRepeatCount()
        {
            tlog.Debug(tag, $"AnimatedVectorImageViewRepeatCount START");

            var testingTarget = new AnimatedVectorImageView();

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

            Assert.AreEqual(0, testingTarget.RepeatCount, "Should be equal");

            testingTarget.RepeatCount = 2;
            Assert.AreEqual(2, testingTarget.RepeatCount, "Should be equal");

            tlog.Debug(tag, $"AnimatedVectorImageViewRepeatCount END (OK)");
        }
        public void AnimatedVectorImageViewRepeatMode()
        {
            tlog.Debug(tag, $"AnimatedVectorImageViewRepeatMode START");

            var testingTarget = new AnimatedVectorImageView();

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

            testingTarget.RepeatMode = AnimatedVectorImageView.RepeatModes.Reverse;
            Assert.AreEqual(AnimatedVectorImageView.RepeatModes.Reverse, testingTarget.RepeatMode, "Should be equal!");

            testingTarget.RepeatMode = AnimatedVectorImageView.RepeatModes.Restart;
            Assert.AreEqual(AnimatedVectorImageView.RepeatModes.Restart, testingTarget.RepeatMode, "Should be equal!");

            tlog.Debug(tag, $"AnimatedVectorImageViewRepeatMode END (OK)");
        }
        public void AnimatedVectorImageViewPlay()
        {
            tlog.Debug(tag, $"AnimatedVectorImageViewPlay START");

            var testingTarget = new AnimatedVectorImageView();

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

            try
            {
                testingTarget.Play();
            }
            catch (InvalidOperationException e)
            {
                tlog.Debug(tag, e.Message.ToString());
                tlog.Debug(tag, $"AnimatedVectorImageViewPlay END (OK)");
                Assert.Pass("Caught InvalidOperationException: Passed!");
            }
        }
        public void AnimatedVectorImageViewTotalFrame()
        {
            tlog.Debug(tag, $"AnimatedVectorImageViewTotalFrame START");

            var testingTarget = new AnimatedVectorImageView();

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

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

            tlog.Debug(tag, $"AnimatedVectorImageViewTotalFrame END (OK)");
        }
        public void AnimatedVectorImageViewSetMinMaxFrameByMarker()
        {
            tlog.Debug(tag, $"AnimatedVectorImageViewSetMinMaxFrameByMarker START");

            var testingTarget = new AnimatedVectorImageView();

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

            string maker = "startframe: 1; endframe: 10";

            try
            {
                testingTarget.SetMinMaxFrameByMarker(maker, null);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception: Failed!");
            }

            tlog.Debug(tag, $"AnimatedVectorImageViewSetMinMaxFrameByMarker END (OK)");
        }
        public void AnimatedVectorImageViewCurrentFrame()
        {
            tlog.Debug(tag, $"AnimatedVectorImageViewCurrentFrame START");

            var testingTarget = new AnimatedVectorImageView()
            {
                PositionUsesPivotPoint = true,
                ParentOrigin           = ParentOrigin.CenterRight,
                PivotPoint             = PivotPoint.CenterRight,
                BackgroundColor        = Color.Azure,
                Focusable = true,
            };

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

            testingTarget.ResourceUrl = url;

            try
            {
                testingTarget.CurrentFrame = 200;
                var result = testingTarget.CurrentFrame;

                /** value < 0 */
                testingTarget.CurrentFrame = -3;
                Assert.AreEqual(0, testingTarget.CurrentFrame, "Should be equal!");
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception: Failed!");
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"AnimatedVectorImageViewCurrentFrame END (OK)");
        }
Beispiel #12
0
        public void Activate()
        {
            Tizen.Log.Fatal("NUITEST", $"###Activate()");
            win = NUIApplication.GetDefaultWindow();
            win.BackgroundColor = Color.Green;
            win.KeyEvent       += Win_KeyEvent;

            avi                 = new AnimatedVectorImageView();
            avi.ResourceURL     = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/marker.json";
            avi.RepeatCount     = -1;
            avi.BackgroundColor = Color.White;
            avi.Position2D      = new Position2D(50, 10);
            avi.Size2D          = new Size2D(500, 500);
            win.GetDefaultLayer().Add(avi);
            avi.Play();

            avi2                 = new AnimatedVectorImageView();
            avi2.ResourceURL     = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/marker.json";
            avi2.RepeatCount     = -1;
            avi2.BackgroundColor = Color.White;
            avi2.Position2D      = new Position2D(600, 10);
            avi2.Size2D          = new Size2D(500, 500);
            avi2.SetMinMaxFrameByMarker("first");
            win.GetDefaultLayer().Add(avi2);
            avi2.Play();

            avi3                 = new AnimatedVectorImageView();
            avi3.ResourceURL     = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/marker.json";
            avi3.RepeatCount     = -1;
            avi3.BackgroundColor = Color.White;
            avi3.Position2D      = new Position2D(1150, 10);
            avi3.Size2D          = new Size2D(500, 500);
            avi3.SetMinMaxFrameByMarker("second", "third");
            win.GetDefaultLayer().Add(avi3);
            avi3.Play();

            avi4                 = new AnimatedVectorImageView();
            avi4.ResourceURL     = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/marker.json";
            avi4.RepeatCount     = -1;
            avi4.BackgroundColor = Color.White;
            avi4.Position2D      = new Position2D(50, 550);
            avi4.Size2D          = new Size2D(500, 500);
            avi4.SetMinMaxFrameByMarker("second");
            win.GetDefaultLayer().Add(avi4);
            avi4.Play();

            avi5                 = new AnimatedVectorImageView();
            avi5.ResourceURL     = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/marker.json";
            avi5.RepeatCount     = -1;
            avi5.BackgroundColor = Color.White;
            avi5.Position2D      = new Position2D(600, 550);
            avi5.Size2D          = new Size2D(500, 500);
            avi5.SetMinMaxFrameByMarker("third");
            win.GetDefaultLayer().Add(avi5);
            avi5.Play();

            avi6                 = new AnimatedVectorImageView();
            avi6.ResourceURL     = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/marker.json";
            avi6.RepeatCount     = -1;
            avi6.BackgroundColor = Color.White;
            avi6.Position2D      = new Position2D(1150, 550);
            avi6.Size2D          = new Size2D(500, 500);
            avi6.SetMinMaxFrameByMarker("third", "first");
            win.GetDefaultLayer().Add(avi6);
            avi6.Play();
        }