Exemplo n.º 1
0
        public void WidgetViewWidgetCreationAbortedSignal()
        {
            tlog.Debug(tag, $"WidgetViewWidgetCreationAbortedSignal START");

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

            tlog.Debug(tag, $"WidgetViewWidgetCreationAbortedSignal END (OK)");
        }
Exemplo n.º 2
0
        public void WidgetViewWidgetCreationAbortedSignal()
        {
            tlog.Debug(tag, $"WidgetViewWidgetCreationAbortedSignal START");

            var testingTarget = new WidgetView(widgetView);

            Assert.IsNotNull(testingTarget, "Can't create success object WidgetView");
            Assert.IsInstanceOf <WidgetView>(testingTarget, "Should be an instance of WidgetView type.");

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

            testingTarget.Dispose();
            tlog.Debug(tag, $"WidgetViewWidgetCreationAbortedSignal END (OK)");
        }
Exemplo n.º 3
0
        public void WidgetViewWidgetAddedSignal()
        {
            tlog.Debug(tag, $"WidgetViewWidgetAddedSignal START");

            var view = new View()
            {
                Size  = new Size(100, 200),
                Color = new Tizen.NUI.Color("#C3CAD5FF"),
            };

            var widgetView = new WidgetView(view.SwigCPtr.Handle, false);

            Assert.IsNotNull(widgetView, "Can't create success object WidgetView");
            Assert.IsInstanceOf <WidgetView>(widgetView, "Should be an instance of WidgetView type.");

            tlog.Debug(tag, " widgetView.ID : " + widgetView.ID);
            tlog.Debug(tag, "widgetView.InstanceID : " + widgetView.InstanceID);
            tlog.Debug(tag, "widgetView.ContentInfo : " + widgetView.ContentInfo);
            tlog.Debug(tag, "widgetView.Title : " + widgetView.Title);
            tlog.Debug(tag, "widgetView.UpdatePeriod : " + widgetView.UpdatePeriod);

            widgetView.Preview = true;
            tlog.Debug(tag, "widgetView.Preview : " + widgetView.Preview);

            widgetView.Preview = false;
            tlog.Debug(tag, "widgetView.Preview : " + widgetView.Preview);

            widgetView.LoadingText = true;
            tlog.Debug(tag, "widgetView.LoadingText : " + widgetView.LoadingText);

            widgetView.LoadingText = false;
            tlog.Debug(tag, "widgetView.LoadingText : " + widgetView.LoadingText);

            widgetView.WidgetStateFaulted = true;
            tlog.Debug(tag, "widgetView.WidgetStateFaulted : " + widgetView.WidgetStateFaulted);

            widgetView.PermanentDelete = false;
            tlog.Debug(tag, "widgetView.PermanentDelete : " + widgetView.PermanentDelete);

            using (PropertyMap retryText = new PropertyMap())
            {
                retryText.Add("stateText", new PropertyValue("RetryTextTest"));
                widgetView.RetryText = retryText;
                tlog.Debug(tag, "widget view retryText: " + widgetView.RetryText);

                using (PropertyMap effect = new PropertyMap())
                {
                    retryText.Add("shader", new PropertyValue("ShaderText"));
                    widgetView.Effect = effect;
                    tlog.Debug(tag, "widget view effect: " + widgetView.Effect);
                }
            }

            try
            {
                WidgetView.GetWidgetViewFromPtr(widgetView.SwigCPtr.Handle);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception: Failed!");
            }

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

            var args = new WidgetView.WidgetViewEventArgs();

            tlog.Debug(tag, "Default args.WidgetView is : " + args.WidgetView);

            args.WidgetView = widgetView;
            tlog.Debug(tag, "args.WidgetView is : " + args.WidgetView);

            try
            {
                widgetView.WidgetAddedSignal();
                widgetView.WidgetContentUpdatedSignal();
                widgetView.WidgetUpdatePeriodChangedSignal();
                widgetView.WidgetCreationAbortedSignal();
                widgetView.WidgetFaultedSignal();
                widgetView.WidgetDeletedSignal();

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

            view.Dispose();
            view = null;

            widgetView = null;
            tlog.Debug(tag, $"WidgetViewWidgetAddedSignal END (OK)");
        }