Example #1
0
        public void FocusChangedSignalEmit()
        {
            tlog.Debug(tag, $"FocusChangedSignalEmit 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 FocusChangedSignal();

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

            try
            {
                using (View current = new View())
                {
                    using (View goal = new View())
                    {
                        testingTarget.Emit(current, goal);
                    }
                }
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception: Failed!");
            }

            testingTarget.Dispose();

            tlog.Debug(tag, $"FocusChangedSignalEmit END (OK)");
        }
Example #2
0
        public void FocusChangedSignalConnect()
        {
            tlog.Debug(tag, $"FocusChangedSignalConnect START");

            var testingTarget = new FocusChangedSignal();

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

            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, $"FocusChangedSignalConnect END (OK)");
        }
Example #3
0
        // Signals - AccessibilityManagerEvent.cs
        internal FocusChangedSignal FocusChangedSignal()
        {
            FocusChangedSignal ret = new FocusChangedSignal(Interop.AccessibilityManager.FocusChangedSignal(SwigCPtr), false);

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

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

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"FocusChangedSignalConstructor END (OK)");
        }
Example #5
0
        public void FocusChangedSignalEmpty()
        {
            tlog.Debug(tag, $"FocusChangedSignalEmpty START");

            var testingTarget = new FocusChangedSignal();

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

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

            testingTarget.Dispose();

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