示例#1
0
        public MainPage()
        {
            dietPage = new MyDietPage()
            {
                Title = "Diet"
            };

            homePage = new HomePage()
            {
                Title = "Home"
            };

            medicinePage = new MedicinePage()
            {
                Title = "Medication"
            };

            activityPage = new ActivityPage()
            {
                Title = "Exercise"
            };

            profilePage = new ProfilePage()
            {
                Title = "Profile"
            };

            if (Device.RuntimePlatform == Device.iOS)
            {
                profilePage.Icon  = "tab_about.png";
                dietPage.Icon     = "tab_feed.png";
                homePage.Icon     = "tab_home30.png";
                medicinePage.Icon = "tab_pill30.png";
                activityPage.Icon = "tab_activity30.png";
            }


            Children.Add(homePage);

            Children.Add(dietPage);
            Children.Add(medicinePage);
            Children.Add(activityPage);
            Children.Add(profilePage);

            Title = Children[0].Title;
        }
示例#2
0
        public void Show(int key)
        {
            switch (key)
            {
            case 1:
                ReceptionPanelWindow recepcion = new ReceptionPanelWindow();
                recepcion.Show();
                break;

            case 2:
                RegisterPage register = new RegisterPage();
                //register.Show();
                break;

            case 4:
                CookPanelWindow cookReport = new CookPanelWindow();
                cookReport.Show();
                break;

            case 5:
                CookInfoPage cookInfo = new CookInfoPage();
                cookInfo.Show();
                break;

            case 6:
                UserMenuPage menu = new UserMenuPage();
                menu.Show();
                break;

            case 7:
                NursePanelWindow urgency = new NursePanelWindow();
                urgency.Show();
                break;

            case 8:
                UserReportPage report = new UserReportPage();
                break;

            case 9:
                InfoPage info = new InfoPage();
                break;

            case 10:
                DoctorPanelWindow option = new DoctorPanelWindow();
                option.Show();
                break;

            case 11:
                PaymentPage pay = new PaymentPage();
                pay.Show();
                break;

            case 12:
                PharmacyPanelWindow pharmacy = new PharmacyPanelWindow();
                pharmacy.Show();
                break;

            case 13:
                MedicinePage medicine = new MedicinePage(aux);
                break;

            case 14:
                AdminPanelWindow adminPage = new AdminPanelWindow();
                adminPage.Show();
                break;

            case 16:
                PersonalRegisterPage personal = new PersonalRegisterPage();
                //personal.Show();
                break;

            default:
                Xceed.Wpf.Toolkit.MessageBox.Show("Ha ocurrido un error de navegación", "Error", MessageBoxButton.OK,
                                                  MessageBoxImage.Error);
                break;
            }
        }