Exemplo n.º 1
0
 /// <summary>
 /// FileSettingsPage was selected in the menu.
 /// Navigate to File setting page.
 /// </summary>
 private void RadioButton1_Checked(object sender, RoutedEventArgs e)
 {
     _ = sender;
     _ = e;
     MainContentFrame.Navigate(typeof(FileSettingsPage));
     splitView.IsPaneOpen = false;
 }
 private void ToHistoryPage(object sender, RoutedEventArgs e)
 {
     if (MainContentFrame != null)
     {
         MainContentFrame.Navigate(typeof(Pages.HistoryPage));
     }
 }
Exemplo n.º 3
0
 private void Page_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     if (Config.IsPageSwitched(e.PreviousSize, e.NewSize) && !string.IsNullOrEmpty(ViewModelBase.CurrentStoryId))
     {
         MainContentFrame.Navigate(typeof(MainContentPage));
         CommentFrame.Navigate(typeof(CommentPage));
     }
 }
Exemplo n.º 4
0
        public MainPage()
        {
            InitializeComponent();

            _translator = new Translator("MainPage");

            UtilitiyListBox.SelectedIndex = 0;
            MainContentFrame.Navigate(typeof(TripPlannerWindow));
        }
        private void Settings_Tapped(object sender, TappedRoutedEventArgs e)
        {
            if (Current_VisualState.Visibility == Visibility.Visible)
            {
                SplitView.splitviewPage.MainNav.IsPaneOpen = false;
            }

            MainContentFrame.Navigate(typeof(Settings));
        }
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     base.OnNavigatedTo(e);
     if (UIViewSettings.GetForCurrentView().UserInteractionMode == UserInteractionMode.Touch)
     {
         Splitter.DisplayMode = SplitViewDisplayMode.Overlay;
     }
     MainContentFrame.Navigate(typeof(Pages.ItaListPage));
 }
Exemplo n.º 7
0
 public MainPage()
 {
     this.InitializeComponent();
     Application.Current.Suspending += (a, e) => (DataContext as MainPageViewModel)?.SerialManager.PortDispose();
     this.Loaded += async(a, e) =>
     {
         await((MainPageViewModel)DataContext).SerialManager.PortInitializeAsync();
         MainContentFrame.Navigate(typeof(QuizControl), this.DataContext);
     };
 }
        private void PublicRecipe_Checked(object sender, RoutedEventArgs e)
        {
            if (Current_VisualState.Visibility == Visibility.Visible)
            {
                SplitView.splitviewPage.MainNav.IsPaneOpen = false;
            }

            MainContentFrame.Navigate(typeof(LoadAnimation));
            PublicButton.IsChecked = true;
        }
        private void ShoppingList_Checked(object sender, RoutedEventArgs e)
        {
            if (Current_VisualState.Visibility == Visibility.Visible)
            {
                SplitView.splitviewPage.MainNav.IsPaneOpen = false;
            }

            MainContentFrame.Navigate(typeof(ShoppingList));
            ShoppingButton.IsChecked = true;
        }
Exemplo n.º 10
0
 private void DisplayStory(string storyId)
 {
     ViewModelBase.CurrentStoryId = storyId;
     if (Config.UIStatus == AppUIStatus.All || Config.UIStatus == AppUIStatus.ListAndContent)
     {
         MainContentFrame.Navigate(typeof(MainContentPage), storyId);
         CommentFrame.Navigate(typeof(CommentPage), storyId);
     }
     else
     {
         ((Frame)Window.Current.Content).Navigate(typeof(MainContentPage), storyId);
     }
 }
Exemplo n.º 11
0
        /// <summary>
        /// Navigates to the desired page, ensuring all old BackStack references to the page are removed
        /// </summary>
        /// <param name="type"></param>
        private void NavigateToPage(Type type)
        {
            IEnumerable <PageStackEntry> duplicatePages = MainContentFrame.BackStack.Where(page => page.SourcePageType == type);

            if (duplicatePages.Count() > 0)
            {
                foreach (PageStackEntry page in duplicatePages)
                {
                    MainContentFrame.BackStack.Remove(page);
                }
            }
            MainContentFrame.Navigate(type, this);
        }
Exemplo n.º 12
0
        /// <summary>
        /// PasswordListPage was selected in the menu.
        /// If configurations is made up already, navigate to password list page, if not, ignore this event.
        /// </summary>
        private async void RadioButton2_Checked(object sender, RoutedEventArgs e)
        {
            _ = sender;
            _ = e;

            // if it is not initialized, show FileSettingsPage forcly.
            if (!await AppData.IsInitialized().ConfigureAwait(true))
            {
                MainPageConfiguRadio.IsChecked = true;
            }
            else
            {
                MainContentFrame.Navigate(typeof(PasswordListPage));
                splitView.IsPaneOpen = false;
            }
        }
Exemplo n.º 13
0
        private void DisplayStory(string storyId)
        {
            ViewModelBase.CurrentStoryId = storyId;
            if (Config.UIStatus == AppUIStatus.All || Config.UIStatus == AppUIStatus.ListAndContent)
            {
                MainContentFrame.Navigate(typeof(MainContentPage), storyId);
                CommentFrame.Navigate(typeof(CommentPage), storyId);
            }
            else
            {
                Frame rootFrame = App.GetWindowFrame();
                if (rootFrame == null)
                {
                    return;
                }

                rootFrame.Navigate(typeof(MainContentPage), storyId);
            }
        }
Exemplo n.º 14
0
        private void OnUtilityListBoxChanged(object sender, SelectionChangedEventArgs e)
        {
            if (TripPlannerListItem.IsSelected)
            {
                MainContentFrame.Navigate(typeof(TripPlannerWindow));
            }

            if (DeparturesListItem.IsSelected)
            {
                MainContentFrame.Navigate(typeof(DeparturesWindow));
            }

            if (SettingsListItem.IsSelected)
            {
                MainContentFrame.Navigate(typeof(SettingsWindow), new Action(() =>
                {
                    // Translate sidebar whenever the language setting is modified
                    DeparturesText.Text  = _translator["Departures.Text"];
                    TripPlannerText.Text = _translator["TripPlanner.Text"];
                    SettingsText.Text    = _translator["Settings.Text"];
                }));
            }
        }
Exemplo n.º 15
0
 private void MainSwitcherSearchButton_OnChecked(object sender, RoutedEventArgs e)
 {
     MainContentFrame?.Navigate(SearchPage);
 }
Exemplo n.º 16
0
 private void MainSwitcherQueueButton_OnChecked(object sender, RoutedEventArgs e)
 {
     MainContentFrame?.Navigate(new QueuePage());
 }
 private void New_Recipe_Onboarding(object sender, RoutedEventArgs e)
 {
     MainContentFrame.Navigate(typeof(RecipeOnboarding));
     SplitView.splitviewPage.MainNav.IsPaneOpen = false;
 }
Exemplo n.º 18
0
 // ハンバーガーメニューで[ページ【1】]が新たに選択された
 private void RadioButton1_Checked(object sender, RoutedEventArgs e)
 {
     MainContentFrame.Navigate(typeof(Browser.MainBrowser));
     Splitter.IsPaneOpen = false;
 }
Exemplo n.º 19
0
 // ハンバーガーメニューで[ページ【3】]が新たに選択された
 private void RadioButton3_Checked(object sender, RoutedEventArgs e)
 {
     MainContentFrame.Navigate(typeof(Setting.SettingHubPage));
     Splitter.IsPaneOpen = false;
 }
Exemplo n.º 20
0
 private void Setting_Tapped(object sender, Windows.UI.Xaml.Input.TappedRoutedEventArgs e)
 {
     ViewModel.SelectedApp = null;
     MainContentFrame.Navigate(typeof(TestPage));
 }
Exemplo n.º 21
0
 /// <summary>
 /// Laduje strone AddProductPage
 /// </summary>
 private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
 {
     MainContentFrame.Navigate(new AddProductPage());
 }
Exemplo n.º 22
0
 /// <summary>
 /// Laduje strone ProductsPage
 /// </summary>
 private void ProductsButton_OnClick(object sender, RoutedEventArgs e)
 {
     MainContentFrame.Navigate(new ProductsPage());
 }
Exemplo n.º 23
0
 private void MainContentFrame_OnLoaded(object sender, RoutedEventArgs e)
 {
     MainContentFrame.Navigate(SearchPage);
 }
Exemplo n.º 24
0
 /// <summary>
 /// Laduje strone HomePage
 /// </summary>
 private void HomeListButton_OnClick(object sender, RoutedEventArgs e)
 {
     MainContentFrame.Navigate(new HomePage());
 }