Example #1
0
        /*public override void DidEnterBackground (UIApplication application)
         * {
         *      Console.WriteLine ("App entering background state.");
         * }
         *
         * public override void WillEnterForeground (UIApplication application)
         * {
         *      Console.WriteLine ("App will enter foreground");
         * }*/

        public void StoreGPSLocation(CLLocation location)
        {
            if (location != null)
            {
                GPSLocationData locationData = new GPSLocationData();
                locationData.Altitude  = location.Altitude;
                locationData.Course    = location.Course;
                locationData.Speed     = location.Speed;
                locationData.Latitude  = location.Coordinate.Latitude;
                locationData.Longitude = location.Coordinate.Longitude;
                this.userGPSLocationData.Add(locationData);
            }
        }
Example #2
0
        public override void PrepareForSegue(UIStoryboardSegue segue, NSObject sender)
        {
            base.PrepareForSegue(segue, sender);

            var detailViewController = segue.DestinationViewController as ResultsViewController;

            if (detailViewController != null)
            {
                if (!this.timerEnabled)
                {
                    detailViewController.RecordValue = this.RecordValue;
                }
                else
                {
                    detailViewController.TimerSeconds = this.timerSeconds;
                    this.timerEnabled = false;
                    if (this.userGPSLocationData.Count <= 0)
                    {
                        var newGPsLocation = new GPSLocationData();
                        newGPsLocation.Latitude  = 60.212929;
                        newGPsLocation.Longitude = 24.843615;
                        this.userGPSLocationData.Add(newGPsLocation);

                        newGPsLocation           = new GPSLocationData();
                        newGPsLocation.Latitude  = 60.219690;
                        newGPsLocation.Longitude = 24.865895;
                        this.userGPSLocationData.Add(newGPsLocation);

                        newGPsLocation           = new GPSLocationData();
                        newGPsLocation.Latitude  = 60.216988;
                        newGPsLocation.Longitude = 24.844384;
                        this.userGPSLocationData.Add(newGPsLocation);
                    }
                    detailViewController.userGPSLocationData = this.userGPSLocationData;
                    this.timerSeconds = 0;
                }
            }
        }