Пример #1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            if (PhoneApplicationFrameEx.NavigatePendingStateRestore())
                return;

            if(vm == null)
                vm = new Vidyano.ViewModel.Pages.QueryPage(this, Client.CurrentClient.GetCachedObject<Query>(NavigationContext.QueryString["id"]));


            DataContext = vm;

            base.OnNavigatedTo(e);
        }
Пример #2
0
        protected override void OnRemovedFromJournal(JournalEntryRemovedEventArgs e)
        {
            if (vm != null)
            {
                vm.Dispose();
                vm = null;
            }

            base.OnRemovedFromJournal(e);

            if (Client.RootFrame.BackStack.Count() < 1 && Settings.Current.StartupPageType == Settings.StartupPageTypeEnum.QueryPage)
                Application.Current.Terminate();
        }
Пример #3
0
        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
        {
            if (vm != null)
            {
                vm.Dispose();
                vm = null;
            }

            if (e.NavigationMode == NavigationMode.Back && Service.Current.IsConnected && e.SourcePageType == typeof(SignInPage))
                e.Cancel = true;
            else if (Client.CurrentClient.HasSearch)
                SearchPane.GetForCurrentView().ShowOnKeyboardInput = false;

            base.OnNavigatingFrom(e);
        }
Пример #4
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     DataContext = vm = new Vidyano.ViewModel.Pages.QueryPage(this, Client.CurrentClient.GetCachedObject<StoreQuery>(e.Parameter as string));
     base.OnNavigatedTo(e);
 }