Ejemplo n.º 1
0
        public void Initialize()
        {
            Application.Current.Resources.Add("ForMeResources", new ResourceWrapper());

            unityContainer.RegisterInstance <IForMePresentationModel>(unityContainer.Resolve <ForMePresentationModel>(), new ContainerControlledLifetimeManager());
            unityContainer.RegisterInstance <IForMeView>(unityContainer.Resolve <ForMeView>(), new ContainerControlledLifetimeManager());
            unityContainer.RegisterInstance <IProfilePresentationModel>(unityContainer.Resolve <ProfilePresentationModel>(), new ContainerControlledLifetimeManager());
            unityContainer.RegisterInstance <IProfileView>(unityContainer.Resolve <ProfileView>(), new ContainerControlledLifetimeManager());
            unityContainer.RegisterInstance <IActivitiesViewPresentationModel>(unityContainer.Resolve <ActivitiesViewPresentationModel>(), new ContainerControlledLifetimeManager());
            unityContainer.RegisterInstance <IActivitiesView>(unityContainer.Resolve <ActivitiesView>(), new ContainerControlledLifetimeManager());

            NavigationLinks.MapUri(
                new Uri("/4me", UriKind.Relative),
                new Uri("/IndoorWorx.4me.Silverlight;component/Views/ForMePage.xaml", UriKind.Relative));

            NavigationLinks.Add(new Infrastructure.Models.NavigationInfo()
            {
                Content = "4me",
                IsAuthenticationRequired = true,
                NavigationUri            = "/4me",
                Allow = new string[] { "?" },
                Deny  = new string[] { "" }
            });

            AddNavigationItems();
            RegisterEvents();
        }
Ejemplo n.º 2
0
        public void Initialize()
        {
            Application.Current.Resources.Add("CatalogResources", new ResourceWrapper());

            unityContainer.RegisterInstance <ICatalogPresentationModel>(unityContainer.Resolve <CatalogPresentationModel>(), new ContainerControlledLifetimeManager());
            unityContainer.RegisterInstance <ICatalogView>(unityContainer.Resolve <CatalogView>(), new ContainerControlledLifetimeManager());

            unityContainer.RegisterInstance <IVideosPresentationModel>(unityContainer.Resolve <VideosPresentationModel>(), new ContainerControlledLifetimeManager());
            unityContainer.RegisterInstance <IVideosView>(unityContainer.Resolve <VideosView>(), new ContainerControlledLifetimeManager());

            unityContainer.RegisterInstance <IVideoDetailsPresentationModel>(unityContainer.Resolve <VideoDetailsPresentationModel>(), new ContainerControlledLifetimeManager());
            unityContainer.RegisterInstance <IVideoDetailsView>(unityContainer.Resolve <VideoDetailsView>(), new ContainerControlledLifetimeManager());

            unityContainer.RegisterInstance <IVideoCatalogPresentationModel>(unityContainer.Resolve <VideoCatalogPresentationModel>(), new ContainerControlledLifetimeManager());
            unityContainer.RegisterInstance <IVideoCatalogView>(unityContainer.Resolve <VideoCatalogView>(), new ContainerControlledLifetimeManager());

            unityContainer.RegisterInstance <ITemplatesPresentationModel>(unityContainer.Resolve <TemplatesPresentationModel>(), new ContainerControlledLifetimeManager());
            unityContainer.RegisterInstance <ITemplatesView>(unityContainer.Resolve <TemplatesView>(), new ContainerControlledLifetimeManager());

            unityContainer.RegisterInstance <ITemplateDetailsPresentationModel>(unityContainer.Resolve <TemplateDetailsPresentationModel>(), new ContainerControlledLifetimeManager());
            unityContainer.RegisterInstance <ITemplateDetailsView>(unityContainer.Resolve <TemplateDetailsView>(), new ContainerControlledLifetimeManager());

            NavigationLinks.MapUri(
                new Uri("/Catalog", UriKind.Relative),
                new Uri("/IndoorWorx.Catalog.Silverlight;component/Pages/CatalogPage.xaml", UriKind.Relative));

            NavigationLinks.Add(new Infrastructure.Models.NavigationInfo()
            {
                Content = "catalog",
                IsAuthenticationRequired = true,
                NavigationUri            = "/Catalog",
                Allow = new string[] { "?,*" }
            });
        }