Пример #1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            FlurryWP8SDK.Api.LogPageView();

            string target;

            if (!NavigationContext.QueryString.TryGetValue("navtgt", out target))
            {
                throw new InvalidOperationException("Navigation dead end");
            }

            string id;

            if (!NavigationContext.QueryString.TryGetValue("id", out id))
            {
                NavigationManager.GoBack();
            }
            else
            {
                DataContext = _viewModel = GetDataContext(target, long.Parse(id));
                UpdateAppMenu();
            }
        }
Пример #2
0
 private ExecutePageVM GetDataContext(string target, long id)
 {
     ExecutePageVM.InitializeResources(Resources["SetHistoryTemplate"], Resources["ResultHistoryTemplate"]);
     return(new ExecutePageVM(id));
 }