private void OnWidgetContentUpdatedCB(object sender, WidgetView.WidgetViewEventArgs e)
        {
            String encodedBundle = e.WidgetView.ContentInfo;
            Bundle bundle        = Bundle.Decode(encodedBundle);
            string outString;

            if (bundle.TryGetItem("COUNT", out outString))
            {
                Tizen.Log.Info("NUI", "OnWidgetContentUpdatedCB : " + outString + "\n");
            }
        }
Beispiel #2
0
        public void WidgetViewWidgetViewEventArgsWidgetView()
        {
            tlog.Debug(tag, $"WidgetViewWidgetViewEventArgsWidgetView START");

            var testingTarget = new WidgetView.WidgetViewEventArgs();

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

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

            tlog.Debug(tag, $"WidgetViewWidgetViewEventArgsWidgetView END (OK)");
        }
Beispiel #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)");
        }
Beispiel #4
0
 private void OnWidgetContentUpdated(object sender, WidgetView.WidgetViewEventArgs e)
 {
     Tizen.Log.Fatal("NUIWidget", "Widget view content updated triggered");
 }