Ejemplo n.º 1
0
        public static void OnDelete(object obj)
        {
            var userController  = UserPageControllers.Find(c => c.Page == CurrentNavStatus);
            var adminController = AdminPageControllers.Find(c => c.Page == CurrentNavStatus);
            var foundController = userController ?? adminController;

            foundController.DeleteButtonPressed();
        }
Ejemplo n.º 2
0
        public static void NavigateTo(string page)
        {
            var userPage  = UserPages.ToList().Find(p => p.Title == page);
            var adminPage = AdminPages.ToList().Find(p => p.Title == page);


            var foundPage = userPage ?? adminPage;

            NavFrame.Navigate(foundPage);
            var controller = UserPageControllers.Find(c =>
                                                      Equals(c.Page, UserPages.ToList().Find(p => p.Title == foundPage.Title))) ??
                             AdminPageControllers.Find(c =>
                                                       Equals(c.Page, AdminPages.ToList().Find(p => p.Title == foundPage.Title)));

            ButtonMethod.Invoke(controller.NewButtonActive, controller.EditButtonActive, controller.SaveButtonActive, controller.DeleteButtonActive, false);

            CurrentNavStatus = foundPage;
            OnNavigationAlert(CurrentNavStatus.Title);
        }