Esempio n. 1
0
        protected override void Dispose(DisposeTypes type)
        {
            if (disposed)
            {
                return;
            }

            //Release your own unmanaged resources here.
            //You should not access any managed member here except static instance.
            //because the execution order of Finalizes is non-deterministic.
            if (this != null)
            {
                if (_scrollBarScrollPositionIntervalReachedEventCallbackDelegate != null)
                {
                    FloatSignal scrollPositionIntervalReached = ScrollPositionIntervalReachedSignal();
                    scrollPositionIntervalReached?.Disconnect(_scrollBarScrollPositionIntervalReachedEventCallbackDelegate);
                    scrollPositionIntervalReached?.Dispose();
                }

                if (_scrollBarPanFinishedEventCallbackDelegate != null)
                {
                    VoidSignal panFinished = PanFinishedSignal();
                    panFinished?.Disconnect(_scrollBarPanFinishedEventCallbackDelegate);
                    panFinished?.Dispose();
                }
            }

            base.Dispose(type);
        }
Esempio n. 2
0
        public void FloatSignalEmit()
        {
            tlog.Debug(tag, $"FloatSignalEmit START");
            var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id;
            var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId;

            tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}");

            var testingTarget = new FloatSignal();

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

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

            testingTarget.Dispose();

            tlog.Debug(tag, $"FloatSignalEmit END (OK)");
        }
Esempio n. 3
0
        public void FloatSignalConnect()
        {
            tlog.Debug(tag, $"FloatSignalConnect START");

            var testingTarget = new FloatSignal();

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

            try
            {
                dummyCallback callback = OnDummyCallback;
                testingTarget.Connect(callback);
                testingTarget.Disconnect(callback);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception: Failed!");
            }

            testingTarget.Dispose();

            tlog.Debug(tag, $"FloatSignalConnect END (OK)");
        }
Esempio n. 4
0
        internal FloatSignal ScrollPositionIntervalReachedSignal()
        {
            FloatSignal ret = new FloatSignal(NDalicPINVOKE.ScrollBar_ScrollPositionIntervalReachedSignal(swigCPtr), false);

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

            using (View view = new View())
            {
                var testingTarget = new FloatSignal(view.SwigCPtr.Handle, false);
                Assert.IsNotNull(testingTarget, "Should be not null!");
                Assert.IsInstanceOf <FloatSignal>(testingTarget, "Should be an Instance of FloatSignal!");

                testingTarget.Dispose();
            }

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

            var testingTarget = new FloatSignal();

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

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

            testingTarget.Dispose();

            tlog.Debug(tag, $"FloatSignalGetConnectionCount END (OK)");
        }
Esempio n. 7
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FloatSignal obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }