Example #1
0
        public void RulerPtrSetDomain()
        {
            tlog.Debug(tag, $"RulerPtrSetDomain START");

            var testingTarget = new RulerPtr(new DefaultRuler());

            Assert.IsNotNull(testingTarget, "null handle");
            Assert.IsInstanceOf <RulerPtr>(testingTarget, "Should return RulerPtr instance.");

            try
            {
                using (RulerDomain domain = new RulerDomain(0.0f, 1.0f, false))
                {
                    testingTarget.SetDomain(domain);
                }
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            var result = testingTarget.GetDomain();

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

            testingTarget.Dispose();
            tlog.Debug(tag, $"RulerPtrSetDomain END (OK)");
        }
Example #2
0
        public void RulerSetDomain()
        {
            tlog.Debug(tag, $"RulerSetDomain 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
                {
                    using (RulerDomain domain = new RulerDomain(0, 100, true))
                    {
                        testingTarget.SetDomain(domain);
                        var result = testingTarget.GetDomain();
                        tlog.Debug(tag, "Domain : " + result);
                    }
                }
                catch (Exception e)
                {
                    tlog.Debug(tag, e.Message.ToString());
                    Assert.Fail("Caught Exception : Failed!");
                }

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"RulerSetDomain END (OK)");
        }
Example #3
0
 public void SetDomain(RulerDomain domain)
 {
     Interop.Ruler.Ruler_SetDomain(swigCPtr, RulerDomain.getCPtr(domain));
     if (NDalicPINVOKE.SWIGPendingException.Pending)
     {
         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Example #4
0
        public RulerDomain GetDomain()
        {
            RulerDomain ret = new RulerDomain(Interop.Ruler.Ruler_GetDomain(swigCPtr), false);

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Example #5
0
        public void RulerDomainConstructor()
        {
            tlog.Debug(tag, $"RulerDomainConstructor START");

            var testingTarget = new RulerDomain(0.0f, 100.0f);

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

            testingTarget.Dispose();
            tlog.Debug(tag, $"RulerDomainConstructor END (OK)");
        }
Example #6
0
        public void RulerDomainMaximize()
        {
            tlog.Debug(tag, $"RulerDomainMaximize START");

            var testingTarget = new RulerDomain(0.0f, 100.0f);

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

            testingTarget.max = 110.0f;
            Assert.AreEqual(110.0f, testingTarget.max, "Should be equal!");

            testingTarget.Dispose();
            tlog.Debug(tag, $"RulerDomainMaximize END (OK)");
        }
Example #7
0
        public void RulerDomainEnabled()
        {
            tlog.Debug(tag, $"RulerDomainEnabled START");

            var testingTarget = new RulerDomain(0.0f, 100.0f);

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

            testingTarget.enabled = true;
            Assert.AreEqual(true, testingTarget.enabled, "Should be equal!");

            testingTarget.Dispose();
            tlog.Debug(tag, $"RulerDomainEnabled END (OK)");
        }
Example #8
0
        public void RulerDomainGetSize()
        {
            tlog.Debug(tag, $"RulerDomainGetSize START");

            var testingTarget = new RulerDomain(0.0f, 100.0f);

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

            var result = testingTarget.GetSize();

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

            testingTarget.Dispose();
            tlog.Debug(tag, $"RulerDomainGetSize END (OK)");
        }
Example #9
0
        public void RulerDomainClampWithClampState()
        {
            tlog.Debug(tag, $"RulerDomainClampWithClampState START");

            var testingTarget = new RulerDomain(0.0f, 100.0f);

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

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

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

            testingTarget.Dispose();
            tlog.Debug(tag, $"RulerDomainClampWithClampState END (OK)");
        }
Example #10
0
        public void RulerDomainClampWithLength()
        {
            tlog.Debug(tag, $"RulerDomainClampWithLength START");

            var testingTarget = new RulerDomain(0.0f, 100.0f);

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

            var result = testingTarget.Clamp(10.0f, 50.0f);

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

            testingTarget.Dispose();
            tlog.Debug(tag, $"RulerDomainClampWithLength END (OK)");
        }
Example #11
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RulerDomain obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }