Пример #1
0
 public MotionUpdater(ClockViewModel model)
 {
     if (!Gyroscope.IsSupported)
     {
         return;
     }
     _model                  = model;
     _gyroscope              = new Gyroscope();
     _gyroscope.DataUpdated += DataUpdated;
 }
Пример #2
0
        protected override void OnCreate()
        {
            base.OnCreate();
            var watchfaceApp = new PhotoWatchApp();
            var model        = new ClockViewModel();

            model.LoadFromPreference();
            model.UpdateBackgroundImage();
            _viewModel = model;
            watchfaceApp.BindingContext = _viewModel;
            LoadWatchface(watchfaceApp);
        }
Пример #3
0
        protected override void OnCreate()
        {
            base.OnCreate();
            var watchfaceApp = new PhotoWatchApp();
            var model        = new ClockViewModel();

            model.LoadFromPreference();
            model.UpdateBackgroundImage();
            _viewModel = model;
            watchfaceApp.BindingContext = _viewModel;

            if (Tizen.Sensor.Gyroscope.IsSupported)
            {
                _motion = new MotionUpdater(model);
            }


            LoadWatchface(watchfaceApp);
        }