Esempio n. 1
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);
        }
Esempio n. 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;

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


            LoadWatchface(watchfaceApp);
        }
Esempio n. 3
0
 protected override void OnPause()
 {
     _viewModel.UpdateBackgroundImage();
     _motion?.Stop();
     base.OnPause();
 }