예제 #1
0
 private void NavView_BackRequested(NavigationView sender, NavigationViewBackRequestedEventArgs args)
 {
     ContentFrame.Navigate(typeof(HomePage));
 }
예제 #2
0
 private void StoichiometryButton_Click(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(Atomic.App.Pages.StoichiometryPage));
 }
예제 #3
0
 private void IdealGasButton_Click(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(Atomic.App.Pages.IdealGasPage));
 }
예제 #4
0
 private void NavView_Loaded(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(OrderPage));
 }
예제 #5
0
 private void TableButton_Click(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(Atomic.App.Pages.PeriodicTablePage));
 }
예제 #6
0
 private void BtnSetting_Click(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(SettingsPage), null, App.FromRightTransitionInfo);
 }
예제 #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}"));
        }
예제 #8
0
 public MainWindow()
 {
     InitializeComponent();
     ContentFrame.Navigate(new ViewerPage(this));
     ContentFrame.Focus();
 }
예제 #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);
         }
     }
 }
예제 #10
0
 private void AboutButton_Click(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(Pages.AboutPage));
 }
예제 #11
0
 private void View(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(Views.View));
 }
예제 #12
0
 private void FavoritesButton_Click(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(Pages.FavoritesPage));
 }
예제 #13
0
 private void IngredientButton_Click(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(Pages.SearchIngredientPage));
 }
예제 #14
0
 public void Navigate(Type sourcePageType, object parameter)
 {
     ContentFrame.Navigate(sourcePageType, parameter);
 }
예제 #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;
                }
            }
        }
예제 #16
0
파일: MainPage.xaml.cs 프로젝트: jjg0519/OA
 public void NavigateTo(Uri uri)
 {
     ContentFrame.Navigate(uri);
 }
예제 #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);
        }
예제 #18
0
 private void MainPage_Loaded(object sender, RoutedEventArgs e)
 {
     this.MainContent.SelectedItem = this.MainContent.MenuItems.First();
     ContentFrame.Navigate(typeof(WelcomePage));
 }
예제 #19
0
 private void Example1_Loaded(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(SampleStandardSizingPage), null, new SuppressNavigationTransitionInfo());
 }
예제 #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);
 }
예제 #22
0
 private void NavView_BackRequested(NavigationView sender, NavigationViewBackRequestedEventArgs args)
 {
     ContentFrame.GoBack();
 }
예제 #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));
 }
예제 #25
0
 private void BalanceButton_Click(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(Atomic.App.Pages.FormulaBalancerPage));
 }
예제 #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;
                }
            }
        }
예제 #27
0
 private void EmpiricalFormulaButton_Click(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(Atomic.App.Pages.EmpiricalFormulaPage));
 }
예제 #28
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     ContentFrame.Navigate(typeof(BlankPage1));
 }
예제 #29
0
 private void LimitingReagentButton_Click(object sender, RoutedEventArgs e)
 {
     ContentFrame.Navigate(typeof(Atomic.App.Pages.LimitingReagentPage));
 }
예제 #30
0
 public bool NavigateTo(Type sourcePageType)
 {
     return(ContentFrame.Navigate(typeof(PumpsPage)));
 }