Exemplo n.º 1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            //UserInfo user=App.Current.Resources["user"] as UserInfo;
            // List<CalendarDetail> calendarDeails=null;
            //var localSettings = IsolatedStorageSettings.ApplicationSettings;
            //var result = localSettings.Where(a => a.Key == "calendar_detail");
            //if (result.Any())
            //{
            //    calendarDeails = localSettings["calendar_detail"] as List<CalendarDetail>;
            //}


            //List<CalendarDetail> calendarDeails = DataManager.LoadPostSettings("calendar_detail") as List<CalendarDetail>;
            //if (!string.IsNullOrEmpty(task))
            //{
            //    ResultTask(task);
            //}

            cId = NavigationContext.QueryString["cid"];
            string calendarOld = DataManager.LoadPostSettings(cId);

            if (!string.IsNullOrEmpty(calendarOld))
            {
                ResultTask(calendarOld);
            }

            UserInfo user = UserDataManager.LoadUserSettings();

            if (user != null && string.IsNullOrEmpty(user.Token))
            {
                NavigationService.Navigate(new Uri("/Login.xaml", UriKind.Relative));
            }

            CalendarViewModel.CalendarDetail(user.Token, cId, ResultTask);

            base.OnNavigatedTo(e);
        }