Ejemplo n.º 1
0
        /// <summary>
        /// Preserves state associated with this page in case the application is suspended or the
        /// page is discarded from the navigation cache.  Values must conform to the serialization
        /// requirements of <see cref="SuspensionManager.SessionState"/>.
        /// </summary>
        /// <param name="sender">The source of the event; typically <see cref="NavigationHelper"/></param>
        /// <param name="e">Event data that provides an empty dictionary to be populated with
        /// serializable state.</param>
        private void NavigationHelper_SaveState(object sender, SaveStateEventArgs e)
        {
            HardwareButtons.BackPressed -= HardwareButtons_BackPressed;

            e.PageState.Add("avg_start_position_lat", avg_start_position.Latitude);
            e.PageState.Add("avg_start_position_lon", avg_start_position.Longitude);
            e.PageState.Add("avg_start_position_alt", avg_start_position.Altitude);
            e.PageState.Add("avg_start_position_accuracy", avg_start_point_accuracy);
            e.PageState.Add("result_m", result_m);
            e.PageState.Add("result_ft", result_ft);
            e.PageState.Add("start_position_timestamp", start_position_timestamp.ToString());

            //Debug.WriteLine("SaveState - result_m: " + result_m + " result_ft: " + result_ft);

            detachGeolocator();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Preserves state associated with this page in case the application is suspended or the
 /// page is discarded from the navigation cache.  Values must conform to the serialization
 /// requirements of <see cref="SuspensionManager.SessionState"/>.
 /// </summary>
 /// <param name="sender">The source of the event; typically <see cref="NavigationHelper"/></param>
 /// <param name="e">Event data that provides an empty dictionary to be populated with
 /// serializable state.</param>
 private void NavigationHelper_SaveState(object sender, SaveStateEventArgs e)
 {
 }