コード例 #1
0
        public LocationService(IMvxGeoLocationWatcher watcher, IMvxMessenger messenger)
        {
            _messenger = messenger;

            _watcher = watcher;
            _watcher.Start(new MvxGeoLocationOptions(), OnSuccess, OnError);
        }
コード例 #2
0
        public LocationService(IMvxGeoLocationWatcher watcher, IMvxMessenger messenger)
        {
            _messenger = messenger;

            _watcher = watcher;
            _watcher.Start(new MvxGeoLocationOptions(), OnSuccess, OnError);
        }
コード例 #3
0
ファイル: LocationActivity.cs プロジェクト: slodge/CrossLight
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // setup the application
            Setup.Instance.EnsureInitialized(ApplicationContext);

            // ensure location plugin is available
            Cirrious.MvvmCross.Plugins.Location.PluginLoader.Instance.EnsureLoaded();

            // get the location instance
            _geoLocationWatcher = Mvx.Resolve<IMvxGeoLocationWatcher>();

            // create the UI
            SetContentView(Resource.Layout.Main);

            // get the controls
             _latText = this.FindViewById<TextView>(Resource.Id.LatText);
             _lngText = this.FindViewById<TextView>(Resource.Id.LngText);
             _startedText = this.FindViewById<TextView>(Resource.Id.StartedText);
             _errorText = this.FindViewById<TextView>(Resource.Id.ErrorText);
             _button = this.FindViewById<Button>(Resource.Id.ToggleButton);

             // bind to click
            _button.Click += ButtonOnClick;

            // update all UI
            UpdateError(null);
            UpdateStarted();
            UpdateLocation(null);
        }
コード例 #4
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // setup the application
            Setup.Instance.EnsureInitialized(ApplicationContext);

            // ensure location plugin is available
            Cirrious.MvvmCross.Plugins.Location.PluginLoader.Instance.EnsureLoaded();

            // get the location instance
            _geoLocationWatcher = Mvx.Resolve <IMvxGeoLocationWatcher>();

            // create the UI
            SetContentView(Resource.Layout.Main);

            // get the controls
            _latText     = this.FindViewById <TextView>(Resource.Id.LatText);
            _lngText     = this.FindViewById <TextView>(Resource.Id.LngText);
            _startedText = this.FindViewById <TextView>(Resource.Id.StartedText);
            _errorText   = this.FindViewById <TextView>(Resource.Id.ErrorText);
            _button      = this.FindViewById <Button>(Resource.Id.ToggleButton);

            // bind to click
            _button.Click += ButtonOnClick;

            // update all UI
            UpdateError(null);
            UpdateStarted();
            UpdateLocation(null);
        }
コード例 #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LocationService"/> class.
        /// </summary>
        /// <param name="watcher">The watcher.</param>
        /// <param name="messenger">The messenger.</param>
        public LocationService(
            IMvxGeoLocationWatcher watcher, 
            IMvxMessenger messenger)
        {
            this.messenger = messenger;

            this.watcher = watcher;
            this.watcher.Start(new MvxGeoLocationOptions(), this.OnSuccess, this.OnError);
        }
コード例 #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LocationService"/> class.
        /// </summary>
        /// <param name="watcher">The watcher.</param>
        /// <param name="messenger">The messenger.</param>
        public LocationService(
            IMvxGeoLocationWatcher watcher,
            IMvxMessenger messenger)
        {
            this.messenger = messenger;

            this.watcher = watcher;
            this.watcher.Start(new MvxGeoLocationOptions(), this.OnSuccess, this.OnError);
        }
コード例 #7
0
 public LocationViewModel(ITopActivity topActivity, IMvxGeoLocationWatcher geoLocationWatcher)
 {
     _topActivity = topActivity;
     _geoLocationWatcher = geoLocationWatcher;
 }
コード例 #8
0
 public LocationViewModel(ITopActivity topActivity, IMvxGeoLocationWatcher geoLocationWatcher)
 {
     _topActivity        = topActivity;
     _geoLocationWatcher = geoLocationWatcher;
 }
コード例 #9
0
        public LocationViewModel()
        {
            PluginLoader.Instance.EnsureLoaded();
            _watcher = Mvx.Resolve<IMvxGeoLocationWatcher>();
#warning need IsStarted check here...
        }
コード例 #10
0
 protected BaseEditMarketViewModel(string id) : base(id)
 {
     _watcher          = this.GetService <IMvxGeoLocationWatcher>();
     ViewUnRegistered += OnViewUnRegistered;
     DoStartStop();
 }
コード例 #11
0
        public LocationViewModel()
        {
            PluginLoader.Instance.EnsureLoaded();
            _watcher = Mvx.Resolve <IMvxGeoLocationWatcher>();
#warning need IsStarted check here...
        }
コード例 #12
0
 public FirstViewModel(IMvxGeoLocationWatcher watcher)
 {
     _watcher = watcher;
     _watcher.Start(new MvxGeoLocationOptions(), OnLocation, OnError);
 }
コード例 #13
0
ファイル: LocationViewModel.cs プロジェクト: JoanMiro/MvxMod
 public LocationViewModel()
 {
     PluginLoader.Instance.EnsureLoaded();
     _watcher = this.GetService<IMvxGeoLocationWatcher>();
     ViewUnRegistered += OnViewUnRegistered;
 }
コード例 #14
0
 public FirstViewModel(IMvxGeoLocationWatcher watcher)
 {
     _watcher = watcher;
     _watcher.Start(new MvxGeoLocationOptions(), OnLocation, OnError);
 }