示例#1
0
        public void WatchApplicationTimeTickEventArgsWatchTimeSet()
        {
            tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsWatchTimeSet START");

            if (IsWearable())
            {
                var dummyWatchTime = new WatchTime();
                Assert.IsNotNull(dummyWatchTime, "should be not null");
                Assert.IsInstanceOf <WatchTime>(dummyWatchTime, "should be an instance of testing target class!");

                TimeTickEventArgs testingTarget = new TimeTickEventArgs();
                testingTarget.WatchTime = dummyWatchTime;

                var result = testingTarget.WatchTime;
                Assert.IsNotNull(result, "should be not null.");
                Assert.AreEqual(dummyWatchTime, result, "Retrieved result should be equal to dummyApplication. ");

                tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsWatchTimeSet END (OK)");
            }
            else
            {
                tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsWatchTimeSet END (OK)");
                Assert.Pass("Not Supported profile");
            }
        }
示例#2
0
        private void OnTimeTick(IntPtr application, IntPtr watchTime)
        {
            TimeTickEventArgs e = new TimeTickEventArgs();

            e.Application = this;
            e.WatchTime   = WatchTime.GetWatchTimeFromPtr(watchTime);

            _timeTickEventHandler?.Invoke(this, e);
        }
示例#3
0
        private void OnTimeTick(IntPtr application, IntPtr watchTime)
        {
            TimeTickEventArgs e = new TimeTickEventArgs();

            using (e.Application = Application.GetApplicationFromPtr(application))
            {
                using (e.WatchTime = WatchTime.GetWatchTimeFromPtr(watchTime))
                {
                    _timeTickEventHandler?.Invoke(this, e);
                }
            }
        }
示例#4
0
        private void OnTimeTick(IntPtr application, IntPtr watchTime)
        {
            TimeTickEventArgs e = new TimeTickEventArgs();

            if (application != null)
            {
                e.Application = Application.GetApplicationFromPtr(application);
            }
            if (watchTime != null)
            {
                e.WatchTime = WatchTime.GetWatchTimeFromPtr(watchTime);
            }

            _timeTickEventHandler?.Invoke(this, e);
        }
示例#5
0
        public void WatchApplicationTimeTickEventArgsApplication()
        {
            tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsApplication START");

            var testingTarget = new TimeTickEventArgs();

            Assert.IsNotNull(testingTarget, "should be not null");
            Assert.IsInstanceOf <TimeTickEventArgs>(testingTarget, "should be an instance of testing target class!");

            Widget widget      = new Widget();
            var    application = new WidgetApplication(widget.GetIntPtr(), false);

            testingTarget.Application = application;
            Assert.IsNotNull(testingTarget.Application, "should be not null.");

            widget.Dispose();
            widget = null;
            tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsApplication END (OK)");
        }
示例#6
0
        public void WatchApplicationTimeTickEventArgsWatchTimeGet()
        {
            tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsWatchTimeGet START");

            if (IsWearable())
            {
                TimeTickEventArgs dummy = new TimeTickEventArgs();
                var testingTarget       = dummy.WatchTime;
                Assert.IsNotNull(testingTarget, "should be not null");
                Assert.IsInstanceOf <WatchTime>(testingTarget, "should be an instance of testing target class!");

                testingTarget.Dispose();
                tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsWatchTimeGet END (OK)");
            }
            else
            {
                tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsWatchTimeGet END (OK)");
                Assert.Pass("Not Supported profile");
            }
        }
示例#7
0
        public void WatchApplicationTimeTickEventArgsWatchTime()
        {
            tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsWatchTime START");

            var testingTarget = new TimeTickEventArgs();

            Assert.IsNotNull(testingTarget, "should be not null");
            Assert.IsInstanceOf <TimeTickEventArgs>(testingTarget, "should be an instance of testing target class!");

            Widget widget = new Widget();

            using (WatchTime time = new WatchTime(widget.GetIntPtr(), false))
            {
                testingTarget.WatchTime = time;
                Assert.IsNotNull(testingTarget.WatchTime);
            }

            widget.Dispose();
            widget = null;
            tlog.Debug(tag, $"WatchApplicationTimeTickEventArgsWatchTime END (OK)");
        }
示例#8
0
 /// <summary>
 /// Overrides this method if want to handle behavior.
 /// </summary>
 protected virtual void OnTimeTick(TimeTickEventArgs e)
 {
     Log.Debug("NUI", "OnTimeTick() is called!");
     TimeTick?.Invoke(this, e);
 }
示例#9
0
        //[Test]
        //[Category("P1")]
        //[Description("WatchApplication.TimeTick.")]
        //[Property("SPEC", "Tizen.NUI.WatchApplication.TimeTick A")]
        //[Property("SPEC_URL", "-")]
        //[Property("CRITERIA", "PRW")]
        //[Property("AUTHOR", "*****@*****.**")]
        //public void WatchApplicationTimeTick()
        //{
        //    tlog.Debug(tag, $"WatchApplicationTimeTick START");

        //    using (ImageView imageView = new ImageView())
        //    {
        //        var testingTarget = new WatchApplication(imageView.SwigCPtr.Handle, false);
        //        Assert.IsNotNull(testingTarget, "should be not null");
        //        Assert.IsInstanceOf<WatchApplication>(testingTarget, "should be an instance of testing target class!");

        //        /** Unable to find an entry point named 'CSharp_Dali_WatchApplication_TimeTickSignal' in shared library 'libdali2-csharp-binder.so' */
        //        testingTarget.TimeTick += MyOnTimeTick;
        //        testingTarget.TimeTick -= MyOnTimeTick;

        //        testingTarget.Dispose();
        //    }

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

        //[Test]
        //[Category("P1")]
        //[Description("WatchApplication.TimeTickSignal.")]
        //[Property("SPEC", "Tizen.NUI.WatchApplication.TimeTickSignal A")]
        //[Property("SPEC_URL", "-")]
        //[Property("CRITERIA", "PRW")]
        //[Property("AUTHOR", "*****@*****.**")]
        //public void WatchApplicationTimeTickSignal()
        //{
        //    tlog.Debug(tag, $"WatchApplicationTimeTickSignal START");

        //    using (ImageView imageView = new ImageView())
        //    {
        //        var testingTarget = new WatchApplication(imageView.SwigCPtr.Handle, false);
        //        Assert.IsNotNull(testingTarget, "should be not null");
        //        Assert.IsInstanceOf<WatchApplication>(testingTarget, "should be an instance of testing target class!");

        //        try
        //        {
        //            testingTarget.TimeTickSignal();
        //        }
        //        catch (Exception e)
        //        {
        //            /** Unable to find an entry point named 'CSharp_Dali_WatchApplication_TimeTickSignal' in shared library 'libdali2-csharp-binder.so' */
        //            tlog.Debug(tag, e.Message.ToString());
        //            Assert.Fail("Caught Exception: Failed!");
        //        }
        //    }

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

        private void MyOnTimeTick(object sender, TimeTickEventArgs e)
        {
        }
示例#10
0
 protected override void OnTimeTick(TimeTickEventArgs e)
 {
     base.OnTimeTick(e);
     text.Text = "Hello NUI Watch \n" + e.WatchTime.Hour + ":" + e.WatchTime.Minute + ":" + e.WatchTime.Second + ":" + e.WatchTime.Millisecond;
     Tizen.Log.Error("NUI", "TimeTick " + e.WatchTime.TimeZone + "(" + e.WatchTime.DaylightSavingTimeStatus + ") | " + e.WatchTime.Year + "/" + e.WatchTime.Month + "/" + e.WatchTime.Day + "(" + e.WatchTime.DayOfWeek + ")  " + e.WatchTime.Hour + "(" + e.WatchTime.Hour24 + "):" + e.WatchTime.Minute + ":" + e.WatchTime.Second + ":" + e.WatchTime.Millisecond + "\n");
 }