예제 #1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            GoogleAnalytics.EasyTracker.GetTracker().SendView("SettingsPage");
            var index = int.Parse(_SerializationService.Deserialize(e.Parameter?.ToString()).ToString());

            MyPivot.SelectedIndex = index;
        }
예제 #2
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     if (e.Parameter != null)
     {
         var index = int.Parse(_SerializationService.Deserialize(e.Parameter.ToString())?.ToString() ?? "0");
         MyPivot.SelectedIndex = index;
     }
 }
예제 #3
0
        /// <summary>
        /// Invoked when the Page is loaded and becomes the current source of a parent Frame.
        /// </summary>
        /// <param name="e">Event data that can be examined by overriding code. The event data is representative of the pending navigation that will load the current Page. Usually the most relevant property to examine is Parameter.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            if (e == null)
            {
                return;
            }

            var index = int.Parse(_SerializationService.Deserialize(e.Parameter?.ToString()).ToString());

            MyPivot.SelectedIndex = index;
        }
예제 #4
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     try
     {
         var index = int.Parse(_SerializationService.Deserialize(e.Parameter?.ToString()).ToString());
         MyPivot.SelectedIndex = index;
         using (var db = new SensorContext())
         {
             Sensors.ItemsSource = db.Sensors.ToList();
         }
     }
     catch (Exception ex)
     {
         Debug.WriteLine(ex.Message);
     }
 }
예제 #5
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            var index = _SerializationService.Deserialize <int>(e.Parameter?.ToString());

            AppParameter.SelectedIndex = index;
            foreach (var cur in BackgroundTaskRegistration.AllTasks)
            {
                if (cur.Value.Name == BackgroundTaskName)
                {
                    _geolocTask = cur.Value;
                    break;
                }
            }

            if (_geolocTask != null)
            {
                _geolocTask.Completed += OnCompleted;

                try
                {
                    BackgroundAccessStatus backgroundAccessStatus = BackgroundExecutionManager.GetAccessStatus();

                    switch (backgroundAccessStatus)
                    {
                    case BackgroundAccessStatus.Unspecified:
                    case BackgroundAccessStatus.Denied:
                        Status.Text = "Impossible de fonctionner en arrière-plan. La demande doit être ajoutée à l'écran de verrouillage.";
                        break;

                    default:
                        Status.Text = "La tâche de fond est déjà enregistrée. Attendez la prochaine mise à jour ...";
                        break;
                    }
                }
                catch (Exception ex)
                {
                    Status.Text = ex.Message.ToString();
                }
            }
        }
예제 #6
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            var index = _SerializationService.Deserialize <int>(e.Parameter?.ToString());

            MyPivot.SelectedIndex = index;
        }
예제 #7
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            var index = int.Parse(_SerializationService.Deserialize(e.Parameter?.ToString()).ToString());//TODO: 把参数的获取封装起来

            MyPivot.SelectedIndex = index;
        }
예제 #8
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            var index = int.Parse(_SerializationService.Deserialize(e.Parameter?.ToString()).ToString());

            ViewModel._selectedPivotIndex = index;
        }