Example #1
0
 private void NavView_BackRequested(NavigationView sender, NavigationViewBackRequestedEventArgs args)
 {
     ContentFrame.Navigate(typeof(HomePage));
 }
Example #2
0
 private void StoichiometryButton_Click(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(Atomic.App.Pages.StoichiometryPage));
 }
Example #3
0
 private void IdealGasButton_Click(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(Atomic.App.Pages.IdealGasPage));
 }
 private void NavView_Loaded(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(OrderPage));
 }
Example #5
0
 private void TableButton_Click(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(Atomic.App.Pages.PeriodicTablePage));
 }
 private void BtnSetting_Click(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(SettingsPage), null, App.FromRightTransitionInfo);
 }
Example #7
0
        /// <summary>
        /// Navigates to a page. Depends on the Name attribute of the Button control
        /// Expects : Button Tag attribute to be the page name to navigate to, if page is in a folder then
        /// folderName.pageName e.g View.AddUser where View is the folder and AddUser is the xaml page
        /// Expects : Frame Name attribute to be ContentFrame
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        private void ClickHandler(object sender, RoutedEventArgs e)
        {
            //Exception is not handled deliberately.so the developer will be reminded to set control's Name attribute
            ContentFrame.Navigate(Type.GetType($"{Application.Current.GetType().Namespace}.{(sender as Button).Tag}"));
        }
Example #8
0
 public MainWindow()
 {
     InitializeComponent();
     ContentFrame.Navigate(new ViewerPage(this));
     ContentFrame.Focus();
 }
Example #9
0
 private void TestView_BackRequested(object sender, BackRequestedEventArgs e)
 {
     if (ContentFrame.CanGoBack)
     {
         e.Handled = true;
         ContentFrame.GoBack();
         if (ContentFrame.Content.ToString() == "App2.MainDiary")
         {
             radioButton1.IsChecked  = true;
             radioButton1.Background = new SolidColorBrush(Colors.Red);
             radioButton2.Background = new SolidColorBrush(Colors.Transparent);
             radioButton3.Background = new SolidColorBrush(Colors.Transparent);
             radioButton4.Background = new SolidColorBrush(Colors.Transparent);
         }
         if (ContentFrame.Content.ToString() == "App2.MapPage")
         {
             radioButton3.IsChecked  = true;
             radioButton3.Background = new SolidColorBrush(Colors.Red);
             radioButton2.Background = new SolidColorBrush(Colors.Transparent);
             radioButton1.Background = new SolidColorBrush(Colors.Transparent);
             radioButton4.Background = new SolidColorBrush(Colors.Transparent);
         }
         if (ContentFrame.Content.ToString() == "App2.RoutePage")
         {
             radioButton4.IsChecked  = true;
             radioButton4.Background = new SolidColorBrush(Colors.Red);
             radioButton2.Background = new SolidColorBrush(Colors.Transparent);
             radioButton1.Background = new SolidColorBrush(Colors.Transparent);
             radioButton3.Background = new SolidColorBrush(Colors.Transparent);
         }
         if (ContentFrame.Content.ToString() == "App2.InvertoryMain")
         {
             radioButton2.IsChecked  = true;
             radioButton2.Background = new SolidColorBrush(Colors.Red);
             radioButton4.Background = new SolidColorBrush(Colors.Transparent);
             radioButton1.Background = new SolidColorBrush(Colors.Transparent);
             radioButton3.Background = new SolidColorBrush(Colors.Transparent);
         }
         if (ContentFrame.Content.ToString() == "App2.FieldInvertoryItem")
         {
             radioButton2.IsChecked  = true;
             radioButton2.Background = new SolidColorBrush(Colors.Red);
             radioButton4.Background = new SolidColorBrush(Colors.Transparent);
             radioButton1.Background = new SolidColorBrush(Colors.Transparent);
             radioButton3.Background = new SolidColorBrush(Colors.Transparent);
         }
         if (ContentFrame.Content.ToString() == "App2.CreateInvert")
         {
             radioButton2.IsChecked  = true;
             radioButton2.Background = new SolidColorBrush(Colors.Red);
             radioButton4.Background = new SolidColorBrush(Colors.Transparent);
             radioButton1.Background = new SolidColorBrush(Colors.Transparent);
             radioButton3.Background = new SolidColorBrush(Colors.Transparent);
         }
         if (ContentFrame.Content.ToString() == "App2.FieldInvert")
         {
             radioButton2.IsChecked  = true;
             radioButton2.Background = new SolidColorBrush(Colors.Red);
             radioButton4.Background = new SolidColorBrush(Colors.Transparent);
             radioButton1.Background = new SolidColorBrush(Colors.Transparent);
             radioButton3.Background = new SolidColorBrush(Colors.Transparent);
         }
         if (ContentFrame.Content.ToString() == "App2.OpenInvertory")
         {
             radioButton2.IsChecked  = true;
             radioButton2.Background = new SolidColorBrush(Colors.Red);
             radioButton4.Background = new SolidColorBrush(Colors.Transparent);
             radioButton1.Background = new SolidColorBrush(Colors.Transparent);
             radioButton3.Background = new SolidColorBrush(Colors.Transparent);
         }
     }
 }
Example #10
0
 private void AboutButton_Click(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(Pages.AboutPage));
 }
Example #11
0
 private void View(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(Views.View));
 }
Example #12
0
 private void FavoritesButton_Click(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(Pages.FavoritesPage));
 }
Example #13
0
 private void IngredientButton_Click(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(Pages.SearchIngredientPage));
 }
 public void Navigate(Type sourcePageType, object parameter)
 {
     ContentFrame.Navigate(sourcePageType, parameter);
 }
Example #15
0
        private void NavView_Navigate(NavigationViewItem item)
        {
            if (item != null)
            {
                switch (item.Tag)
                {
                case "today":
                    ContentFrame.Navigate(typeof(DailyReportPage));
                    NavView.Header = "Mai nap";
                    break;

                case "week":
                    ContentFrame.Navigate(typeof(WeeklyReportPage));
                    NavView.Header = "Heti jelenzés";
                    break;

                case "expired":
                    ContentFrame.Navigate(typeof(ExpiredTasksPage));
                    NavView.Header = "Lejárt feladatok";
                    break;


                case "Checklist":
                    ContentFrame.Navigate(typeof(SingleCategoryPage));
                    NavView.Header = item.Content;
                    if (ViewModel.Categories.FirstOrDefault(c => c.Name == item.Content.ToString()) != null)
                    {
                        ViewModel.SelectedCategory = ViewModel.Categories.FirstOrDefault(c => c.Name == item.Content.ToString());
                    }
                    break;

                case "MultiChecklist":
                    ContentFrame.Navigate(typeof(MultiCheckListPage));
                    NavView.Header = item.Content;
                    if (ViewModel.Categories.FirstOrDefault(c => c.Name == item.Content.ToString()) != null)
                    {
                        ViewModel.SelectedCategory = ViewModel.Categories.FirstOrDefault(c => c.Name == item.Content.ToString());
                    }
                    break;

                case "Kanban3":
                    ContentFrame.Navigate(typeof(KanbanPage));
                    NavView.Header = item.Content;
                    if (ViewModel.Categories.FirstOrDefault(c => c.Name == item.Content.ToString()) != null)
                    {
                        ViewModel.SelectedCategory = ViewModel.Categories.FirstOrDefault(c => c.Name == item.Content.ToString());
                    }
                    break;

                case "Kanban5":
                    ContentFrame.Navigate(typeof(KanbanExtendedPage));
                    NavView.Header = item.Content;
                    if (ViewModel.Categories.FirstOrDefault(c => c.Name == item.Content.ToString()) != null)
                    {
                        ViewModel.SelectedCategory = ViewModel.Categories.FirstOrDefault(c => c.Name == item.Content.ToString());
                    }
                    break;



                case "addnew":
                    ContentFrame.Navigate(typeof(NewCategoryPage));
                    NavView.Header = "Kategória hozzáadása";
                    break;

                default:
                    ContentFrame.Navigate(typeof(SettingsPage));
                    NavView.Header = "Beállítások";
                    break;
                }
            }
        }
Example #16
0
 public void NavigateTo(Uri uri)
 {
     ContentFrame.Navigate(uri);
 }
Example #17
0
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            HeaderControl.DataContext = new HeaderInfo(RuntimeData.StudentInfo, RuntimeData.UserId, RuntimeData.Score.GPA);

            ContentFrame.Navigate(typeof(Home));

            try
            {
                var channel = await Windows.Networking.PushNotifications.
                              PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();

                await WebClient.PostWnsChannelAsync(RuntimeData.Token, channel.Uri);
            }
            catch (Exception ex)
            {
                await WebClient.ReportException(ex);
            }

            // Reselect campus and reschedule tasks.
            if (RuntimeData.LaunchState)
            {
                RuntimeData.LaunchState = false;
                if (RuntimeData.LoadSetting("campus", out _) == false)
                {
                    CampusSelect campusSelect = new CampusSelect();
                    await campusSelect.ShowAsync();

                    RuntimeData.LoadSetting("campus", out _);
                }

                var tasks = BackgroundTaskRegistration.AllTasks;
                foreach (var task in tasks)
                {
                    task.Value.Unregister(true);
                }
                BackgroundExecutionManager.RemoveAccess();

                var backgroundStatus = await BackgroundExecutionManager.RequestAccessAsync();

                if (backgroundStatus == BackgroundAccessStatus.DeniedBySystemPolicy ||
                    backgroundStatus == BackgroundAccessStatus.DeniedByUser ||
                    backgroundStatus == BackgroundAccessStatus.Unspecified)
                {
                    return;
                }

                var builder = new BackgroundTaskBuilder();
                builder.Name = "Hourly Tile Update Task";
                builder.SetTrigger(new TimeTrigger(30, false));
                builder.AddCondition(new SystemCondition(SystemConditionType.InternetAvailable));
                builder.IsNetworkRequested = true;
                builder.Register();
                builder.Name = "Login Tile Update Task";
                builder.SetTrigger(new SystemTrigger(SystemTriggerType.UserPresent, false));
                builder.Register();
            }

            await ScheduleNotificationUpdateTasks.UpdateTile(RuntimeData.Schedule);
        }
Example #18
0
 private void MainPage_Loaded(object sender, RoutedEventArgs e)
 {
     this.MainContent.SelectedItem = this.MainContent.MenuItems.First();
     ContentFrame.Navigate(typeof(WelcomePage));
 }
Example #19
0
 private void Example1_Loaded(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(SampleStandardSizingPage), null, new SuppressNavigationTransitionInfo());
 }
Example #20
0
 internal void NavigateToColor(string color)
 {
     NavViewMenu.Header = ResourceLoader.GetForCurrentView().GetString(color + "NavItem/Content");
     ContentFrame.Navigate(typeof(ColorPage), color);
 }
 public ChangelogDialog(Type pageType)
 {
     this.InitializeComponent();
     ContentFrame.Navigate(pageType);
 }
Example #22
0
 private void NavView_BackRequested(NavigationView sender, NavigationViewBackRequestedEventArgs args)
 {
     ContentFrame.GoBack();
 }
Example #23
0
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            this.DataContext = this.ViewModel.warehouse;

            ContentFrame.Navigate(typeof(GraphsPage), "fast");
        }
 public MainPage()
 {
     this.InitializeComponent();
     ContentFrame.Navigate(typeof(LandingPage));
 }
Example #25
0
 private void BalanceButton_Click(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(Atomic.App.Pages.FormulaBalancerPage));
 }
Example #26
0
        //押されたアイテムの処理
        private void NavView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            if (args.IsSettingsSelected)
            {
                //ContentFrame.Navigate(typeof(SettingsPage));
            }
            else
            {
                NavigationViewItem item = args.SelectedItem as NavigationViewItem;

                switch (item.Tag.ToString())
                {
                case "home":
                    ContentFrame.Navigate(typeof(home));
                    NavView.Header = "ホーム";
                    break;

                case "signup":
                    ContentFrame.Navigate(typeof(signin));
                    NavView.Header = "サインアップ";

                    break;

                case "signin":
                    ContentFrame.Navigate(typeof(Signup));
                    NavView.Header = "サインイン";
                    break;

                case "signout":
                    ContentFrame.Navigate(typeof(Page));
                    NavView.Header = "サインアウト";
                    break;

                case "work":
                    ContentFrame.Navigate(typeof(BookmarkList));

                    //確認用
                    signin.Visibility  = Visibility.Collapsed;
                    signup.Visibility  = Visibility.Collapsed;
                    signout.Visibility = Visibility.Visible;

                    NavView.Header = "仕事";
                    break;

                case "music":
                    ContentFrame.Navigate(typeof(BookmarkList));
                    NavView.Header = "音楽";
                    break;

                case "enter":
                    ContentFrame.Navigate(typeof(BookmarkList));
                    NavView.Header = "芸能";
                    break;

                case "sport":
                    ContentFrame.Navigate(typeof(BookmarkList));
                    NavView.Header = "スポーツ";
                    break;

                case "fashion":
                    ContentFrame.Navigate(typeof(BookmarkList));
                    NavView.Header = "ファッション";
                    break;

                case "game":
                    ContentFrame.Navigate(typeof(BookmarkList));
                    NavView.Header = "ゲーム";
                    break;

                case "other":
                    ContentFrame.Navigate(typeof(BookmarkList));
                    NavView.Header = "その他";
                    break;
                }
            }
        }
Example #27
0
 private void EmpiricalFormulaButton_Click(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(Atomic.App.Pages.EmpiricalFormulaPage));
 }
Example #28
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     ContentFrame.Navigate(typeof(BlankPage1));
 }
Example #29
0
 private void LimitingReagentButton_Click(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(Atomic.App.Pages.LimitingReagentPage));
 }
Example #30
0
 public bool NavigateTo(Type sourcePageType)
 {
     return(ContentFrame.Navigate(typeof(PumpsPage)));
 }