Exemplo n.º 1
0
        public void Initialize()
        {
            //There is an issue with the scoped regions (ie not getting the right region manager) so it has to be done manually the injection of the menu.
            var wizardView = serviceLocator.GetInstance <QuotationDetailWizardView>(QuotationDetailWizardView.CONTRACT_TYPE);


            var policyDetailRegion = regionManager.Regions[Policy.Shell.Contracts.Shell.RegionNames.POLICY_DETAIL_REGION];

            policyDetailRegion.Add(wizardView);

            ((QuotationDetailWizardViewModel)(wizardView.DataContext)).WizardContext =
                policyDetailContext.CurrentPolicyId;

            var wizardMenuRegion = regionManager.Regions[RegionNames.WIZARD_QUOTATION_MENU_REGION];
            var menuView         = serviceLocator.GetInstance <QuotationDetailMenuView>();

            wizardMenuRegion.Add(menuView);
            wizardMenuRegion.Activate(menuView);

            //Register the wizard as a menu item for the Policy Detail
            policyDetailMenuRegistry.RegisterMenuItemViewOpener("Quotation wizard", "Quotation wizard",
                                                                typeof(QuotationDetailMenuView), QuotationDetailWizardView.CONTRACT_TYPE, 5);
        }
Exemplo n.º 2
0
 public void Initialize()
 {
     //TODO: Localisation
     policyDetailMenuRegistry.RegisterMenuItemViewOpener("Policy Detail", "Policy Detail", typeof(PolicyDetailView), ViewContractNames.POLICY_DETAIL_VIEW, 1);
     policyDetailNavigator.NavigateToPolicyDetail(policyDetailContext.CurrentPolicyId);
 }