Esempio n. 1
0
        public void ControlKeySignalEmit()
        {
            tlog.Debug(tag, $"ControlKeySignalEmit 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 ControlKeySignal();

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

            try
            {
                using (View view = new View())
                {
                    using (Key key = new Key(view.SwigCPtr.Handle, false))
                    {
                        testingTarget.Emit(view, key);
                    }
                }
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception: Failed!");
            }

            testingTarget.Dispose();

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

            var testingTarget = new ControlKeySignal();

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

            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, $"ControlKeySignalConnect END (OK)");
        }
Esempio n. 3
0
        internal ControlKeySignal KeyEventSignal()
        {
            ControlKeySignal ret = new ControlKeySignal(Interop.ViewSignal.KeyEventSignal(SwigCPtr), false);

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

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

                testingTarget.Dispose();
            }

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

            var testingTarget = new ControlKeySignal();

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

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

            testingTarget.Dispose();

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