Esempio n. 1
0
        public void RulerSnapAndClampWithLength()
        {
            tlog.Debug(tag, $"RulerSnapAndClampWithLength START");

            using (DefaultRuler ruler = new DefaultRuler())
            {
                var testingTarget = new Ruler(ruler.SwigCPtr.Handle, false);
                Assert.IsNotNull(testingTarget, "Can't create success object Ruler.");
                Assert.IsInstanceOf <Ruler>(testingTarget, "Should return Ruler instance.");

                try
                {
                    var result = testingTarget.SnapAndClamp(10.0f, 50.0f, 100.0f);
                    tlog.Debug(tag, "SnapAndClamp : " + result);
                }
                catch (Exception e)
                {
                    tlog.Debug(tag, e.Message.ToString());
                    Assert.Fail("Caught Exception : Failed!");
                }

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"RulerSnapAndClampWithLength END (OK)");
        }
Esempio n. 2
0
        public void RulerSnapAndClampWithClampState()
        {
            tlog.Debug(tag, $"RulerSnapAndClampWithClampState START");

            DefaultRuler ruler         = new DefaultRuler();
            var          testingTarget = new Ruler(ruler.SwigCPtr.Handle, false);

            Assert.IsNotNull(testingTarget, "Can't create success object Ruler.");
            Assert.IsInstanceOf <Ruler>(testingTarget, "Should return Ruler instance.");

            try
            {
                var result = testingTarget.SnapAndClamp(10.0f, 50.0f, 100.0f, 200.0f, new SWIGTYPE_p_Dali__Toolkit__ClampState(ruler.SwigCPtr.Handle));
                tlog.Debug(tag, "SnapAndClamp : " + result);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            ruler.Disable();
            testingTarget.Dispose();
            tlog.Debug(tag, $"RulerSnapAndClampWithClampState END (OK)");
        }
Esempio n. 3
0
        public void RulerSnapWithBias()
        {
            tlog.Debug(tag, $"RulerSnapWithBias START");

            using (DefaultRuler ruler = new DefaultRuler())
            {
                var testingTarget = new Ruler(ruler.SwigCPtr.Handle, false);
                Assert.IsNotNull(testingTarget, "Can't create success object Ruler.");
                Assert.IsInstanceOf <Ruler>(testingTarget, "Should return Ruler instance.");

                try
                {
                    var result = testingTarget.Snap(15.0f, 2.0f);
                    tlog.Debug(tag, "Snap : " + result);
                }
                catch (Exception e)
                {
                    tlog.Debug(tag, e.Message.ToString());
                }

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"RulerSnapWithBias END (OK)");
        }
Esempio n. 4
0
        public void RulerDisableDomain()
        {
            tlog.Debug(tag, $"RulerDisableDomain START");

            using (DefaultRuler ruler = new DefaultRuler())
            {
                var testingTarget = new Ruler(ruler.SwigCPtr.Handle, false);
                Assert.IsNotNull(testingTarget, "Can't create success object Ruler.");
                Assert.IsInstanceOf <Ruler>(testingTarget, "Should return Ruler instance.");

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

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"RulerDisableDomain END (OK)");
        }
Esempio n. 5
0
        public void RulerConstructor()
        {
            tlog.Debug(tag, $"RulerConstructor START");

            using (DefaultRuler ruler = new DefaultRuler())
            {
                var testingTarget = new Ruler(ruler.SwigCPtr.Handle, false);
                Assert.IsNotNull(testingTarget, "Can't create success object Ruler.");
                Assert.IsInstanceOf <Ruler>(testingTarget, "Should return Ruler instance.");

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"RulerConstructor END (OK)");
        }
Esempio n. 6
0
        public void RulerClampWithClampState()
        {
            tlog.Debug(tag, $"RulerClampWithClampState START");

            DefaultRuler ruler         = new DefaultRuler();
            var          testingTarget = new Ruler(ruler.SwigCPtr.Handle, false);

            Assert.IsNotNull(testingTarget, "Can't create success object Ruler.");
            Assert.IsInstanceOf <Ruler>(testingTarget, "Should return Ruler instance.");

            var result = testingTarget.Clamp(10.0f, 50.0f, 40.0f, new SWIGTYPE_p_Dali__Toolkit__ClampState(ruler.SwigCPtr.Handle));

            tlog.Debug(tag, "Clamp : " + result);

            ruler.Disable();
            testingTarget.Dispose();
            tlog.Debug(tag, $"RulerClampWithClampState END (OK)");
        }
Esempio n. 7
0
        public void RulerGetTotalPages()
        {
            tlog.Debug(tag, $"RulerGetTotalPages START");

            using (DefaultRuler ruler = new DefaultRuler())
            {
                var testingTarget = new Ruler(ruler.SwigCPtr.Handle, false);
                Assert.IsNotNull(testingTarget, "Can't create success object Ruler.");
                Assert.IsInstanceOf <Ruler>(testingTarget, "Should return Ruler instance.");

                var result = testingTarget.GetTotalPages();
                tlog.Debug(tag, "Position : " + result);

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"RulerGetTotalPages END (OK)");
        }