예제 #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);
        }
예제 #2
0
파일: Main.cs 프로젝트: myroot/PhotoWatch
        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);
        }
예제 #3
0
파일: Main.cs 프로젝트: myroot/PhotoWatch
 protected override void OnPause()
 {
     _viewModel.UpdateBackgroundImage();
     _motion?.Stop();
     base.OnPause();
 }