Exemplo n.º 1
0
        protected override async void OnStart()
        {
            QueryManager manager = new QueryManager();

            manager.Stadiums();
            var locator    = CrossGeolocator.Current;
            var isAllowed  = locator.IsGeolocationAvailable;
            var isEnabled  = locator.IsGeolocationEnabled;
            var position   = locator.GetPositionAsync();
            var myPosition = await position;

            Microsoft.Azure.Documents.Spatial.Point myPoint = new Microsoft.Azure.Documents.Spatial.Point(myPosition.Latitude, myPosition.Longitude);
            var stadium = manager.GetClosestStadium(myPoint);
            //CurrentStadium = stadium;
            // Handle when your app starts
        }
        public override void Init(object initData)
        {
            if (initData != null)
            {
                CurrentJob = (Job)initData;
                Name       = CurrentJob.Name;
                Details    = CurrentJob.Details;
                DueDate    = DateTime.Now.Humanize();

                Age     = CurrentJob.CreatedAt.Humanize();
                Details = string.IsNullOrEmpty(CurrentJob.Details) ? "Not Supplied" : CurrentJob.Details;
                Point   = CurrentJob?.Address?.GeoPosition;
            }
            else
            {
                CurrentJob = new Job();
            }
        }