public void InitializePurpleGenericTemplate()
        {
            Type   type   = Type.GetType(GlobalSolutionCenter.GetScreenFullPageUrlClass(NavPageUrlPage));
            Screen screen = System.Activator.CreateInstance(type) as Screen;

            NavTabPage = screen;
            return;
        }
Beispiel #2
0
        public void Navigate2Screen(object sender)
        {
            NavigateBarItemViewModel navigateBarItemViewModel = sender as NavigateBarItemViewModel;

            if (navigateBarItemViewModel != null)
            {
                if (navigateBarItemViewModel.NavItemUrlPage == string.Empty)
                {
                    return;
                }
                if (!navigateBarItemViewModel.NavPageEnableMasterTemplate)
                {
                    Type   type   = Type.GetType(GlobalSolutionCenter.GetScreenFullPageUrlClass(navigateBarItemViewModel.NavItemUrlPage));
                    Screen screen = System.Activator.CreateInstance(type) as Screen;
                    MainWindow = screen;
                    return;
                }
                PurpleGenericTemplateViewModel purpleGenericTemplateViewModel = new PurpleGenericTemplateViewModel();
                purpleGenericTemplateViewModel.NavPageTitle    = navigateBarItemViewModel.NavItemNameTitle;
                purpleGenericTemplateViewModel.NavTabGroupName = navigateBarItemViewModel.NavItemNameTitle;
                purpleGenericTemplateViewModel.NavPageUrlPage  = navigateBarItemViewModel.NavItemUrlPage;

                MainWindow = purpleGenericTemplateViewModel;
                return;
            }
            NavigateSubItemMenu navigateSubItemMenu = sender as NavigateSubItemMenu;

            if (navigateSubItemMenu != null)
            {
                if (navigateSubItemMenu.NavSubItemUrlPage == string.Empty)
                {
                    return;
                }
                if (!navigateSubItemMenu.NavPageEnableMasterTemplate)
                {
                    Type   type   = Type.GetType(GlobalSolutionCenter.GetScreenFullPageUrlClass(navigateSubItemMenu.NavSubItemUrlPage));
                    Screen screen = System.Activator.CreateInstance(type) as Screen;
                    MainWindow = screen;
                    return;
                }
                PurpleGenericTemplateViewModel purpleGenericTemplateViewModel = new PurpleGenericTemplateViewModel();
                purpleGenericTemplateViewModel.NavPageTitle    = navigateSubItemMenu.NavSubItemNameTitle;
                purpleGenericTemplateViewModel.NavTabGroupName = navigateSubItemMenu.NavParentGroupName;
                purpleGenericTemplateViewModel.NavPageUrlPage  = navigateSubItemMenu.NavSubItemUrlPage;
                MainWindow = purpleGenericTemplateViewModel;
                return;
            }
        }