Ejemplo n.º 1
0
        public IndustryTab(TextBox keywords, LinkLabel viewTreeLink, LinkLabel viewSearchLink, ListView results,
                           TreeView resultsTree, ListView selected, List <TaxonomyStruct> completeList,
                           HDirectoryStruct hierarchy)
        {
            ViewSearchLink = viewSearchLink;
            CompleteList   = completeList;
            Keywords       = keywords;
            ViewTreeLink   = viewTreeLink;
            Results        = results;
            ResultsTree    = resultsTree;
            Selected       = selected;
            Hierarchy      = hierarchy;

            //TODO: make resource manager pull icons
            try
            {
                SelectedImageList.Images.Add(Properties.Resources.delete_icon);
                ResultImageList.Images.Add(Properties.Resources.plus_icon);
                ResultImageList.Images.Add(Properties.Resources.grayplus_icon);
            }
            catch (Exception)
            {
                //TODO: log cannot find files
            }

            InitializeUIComponents();
            AddEventHandlers();
        }
Ejemplo n.º 2
0
 public void InitializeSitecoreValues(List <TaxonomyStruct> completeList, HDirectoryStruct hierarchy)
 {
     CompleteList = completeList;
     Hierarchy    = hierarchy;
     PopulateResultsTree();
     PopulateSelected();
 }
Ejemplo n.º 3
0
        private void InitializeIndustriesTab()
        {
            List <TaxonomyStruct> industries        = SitecoreGetter.SearchTaxonomy(new Guid(Constants.INDUSTRY_GUID), "").ToList();
            HDirectoryStruct      industryDirectory = SitecoreGetter.GetHierarchyByGuid(new Guid(Constants.INDUSTRY_GUID));

            //_industryTabController = new TaxonomyTabController(uxIndustriesKeywords, uxIndustriesViewTree, uxIndustriesViewSearch,
            //    uxIndustriesResults, uxIndustriesResultsTree, uxIndustriesSelected, industries, industryDirectory,
            //    uxIndustriesIcon, tabControl1, uxIndustriesTabPage);
        }
Ejemplo n.º 4
0
        private void InitializeSubjectsTab()
        {
            List <TaxonomyStruct> subjects =
                SitecoreGetter.SearchTaxonomy(new Guid(Constants.SUBJECT_GUID), "").ToList();
            HDirectoryStruct subjectDirectory = SitecoreGetter.GetHierarchyByGuid(new Guid(Constants.SUBJECT_GUID));

            //_subjectsTabController = new TaxonomyTabController(uxSubjectsKeywords, uxSubjectsViewTree, uxSubjectsViewSearch,
            //    uxSubjectsResults, uxSubjectsResultsTree, uxSubjectsSelected, subjects, subjectDirectory,
            //    uxSubjectsIcon, tabControl1, uxSubjectsTabPage);
        }
Ejemplo n.º 5
0
        public void UpdateFields(ArticleStruct articleDetails)
        {
            List <TaxonomyStruct> taxonomyItems     = SitecoreClient.SearchTaxonomy("").ToList();
            HDirectoryStruct      taxonomyDirectory = SitecoreClient.GetHierarchyByGuid(new Guid(Constants.TAXONOMY_GUID));

            TabController.InitializeSitecoreValues(taxonomyItems, taxonomyDirectory);

            _isLive = articleDetails.IsPublished;
            label4.Refresh();
        }
Ejemplo n.º 6
0
        public void UpdateFields(ArticleStruct articleDetails)
        {
            List <TaxonomyStruct> subjects =
                SitecoreClient.SearchTaxonomy("").ToList();
            HDirectoryStruct subjectDirectory = SitecoreClient.GetHierarchyByGuid(new Guid(Constants.SUBJECT_GUID));

            TabController.InitializeSitecoreValues(subjects, subjectDirectory);

            _isLive = articleDetails.IsPublished;
            label8.Refresh();
        }
Ejemplo n.º 7
0
        private void InitializeMarketSegmentsTab()
        {
            List <TaxonomyStruct> marketSegments =
                SitecoreGetter.SearchTaxonomy(new Guid(Constants.MARKET_SEGMENT_GUID), "").ToList();
            HDirectoryStruct marketSegmentsDirectory =
                SitecoreGetter.GetHierarchyByGuid(new Guid(Constants.MARKET_SEGMENT_GUID));

            //_marketSegmentsTabController = new TaxonomyTabController(uxMarketSegmentsKeywords, uxMarketSegmentsViewTree, uxMarketSegmentsViewSearch,
            //    uxMarketSegmentsResults, uxMarketSegmentsResultsTree, uxMarketSegmentsSelected, marketSegments, marketSegmentsDirectory,
            //    uxMarketSegmentsIcon, tabControl1, uxMarketSegmentsTabPage);
        }
Ejemplo n.º 8
0
        private void InitializeTherapeuticCategoriesTab()
        {
            List <TaxonomyStruct> therapeuticCategories =
                SitecoreGetter.SearchTaxonomy(new Guid(Constants.THERAPEUTIC_CATEGORY_GUID), "").ToList();
            HDirectoryStruct therapeuticCategoriesDirectory =
                SitecoreGetter.GetHierarchyByGuid(new Guid(Constants.THERAPEUTIC_CATEGORY_GUID));

            //_therapeuticCategoriesTabController = new TaxonomyTabController(uxTherapeuticCategoriesKeywords, uxTherapeuticCategoriesViewTree, uxTherapeuticCategoriesViewSearch,
            //    uxTherapeuticCategoriesResults, uxTherapeuticCategoriesResultsTree, uxTherapeuticCategoriesSelected, therapeuticCategories, therapeuticCategoriesDirectory,
            //    uxTherapeuticCategoriesIcon, tabControl1, uxTherapeuticCategoriesTabPage);
        }
Ejemplo n.º 9
0
        private void InitializeGeographyTab()
        {
            List <TaxonomyStruct> regions =
                SitecoreGetter.SearchTaxonomy(new Guid(Constants.REGION_GUID), "").ToList();
            HDirectoryStruct regionDirectory = SitecoreGetter.GetHierarchyByGuid(new Guid(Constants.REGION_GUID));


            //_geographyTabController = new TaxonomyTabController(uxGeographyKeywords, uxGeographyViewTree, uxGeographyViewSearch,
            //    uxGeographyResults, uxGeographyResultsTree, uxGeographySelected, regions, regionDirectory,
            //    uxGeographyIcon, tabControl1, uxGeographyTabPage);
        }
Ejemplo n.º 10
0
        public HDirectoryStruct GetHierarchy(string path)
        {
            var item = _sitecoreService.GetItem <Item>(path);

            var children  = item.Children.Select(child => GetHierarchy(child.Paths.Path)).ToList();
            var childNode = new HDirectoryStruct()
            {
                ChildrenList = children, Name = item.DisplayName, ID = item.ID.ToGuid()
            };

            childNode.Children = childNode.ChildrenList.ToArray();
            return(childNode);
        }
Ejemplo n.º 11
0
        protected TreeNode RecursiveLoadHierarchy(HDirectoryStruct hds)
        {
            var node = new TreeNode(hds.Name);

            AllNodes.Add(node);
            if (!GuidNodeDictionary.ContainsKey(hds.ID))
            {
                GuidNodeDictionary.Add(hds.ID, node);
            }
            if (!NodeGuidDictionary.ContainsKey(node))
            {
                NodeGuidDictionary.Add(node, hds.ID);
            }
            foreach (var child in hds.Children)
            {
                node.Nodes.Add(RecursiveLoadHierarchy(child));
            }
            return(node);
        }
Ejemplo n.º 12
0
        protected void InitializeControllers()
        {
            List <SitecoreTree.TaxonomyStruct> industries = _scTree.SearchIndustries("").ToList();
            HDirectoryStruct industryDirectory            = _scTree.GetHierarchyByGuid(new Guid(Constants.INDUSTRY_GUID));

            Guid subjectGuid = new Guid(Constants.SUBJECT_GUID);
            List <SitecoreTree.TaxonomyStruct> subjects = _scTree.SearchTaxonomy(subjectGuid, "").ToList();
            HDirectoryStruct subjectDirectory           = _scTree.GetHierarchyByGuid(subjectGuid);

            Guid regionGuid = new Guid(Constants.REGION_GUID);
            List <SitecoreTree.TaxonomyStruct> regions = _scTree.SearchTaxonomy(regionGuid, "").ToList();
            HDirectoryStruct regionDirectory           = _scTree.GetHierarchyByGuid(regionGuid);

            Guid therapeuticCategoryGuid = new Guid(Constants.THERAPEUTIC_CATEGORY_GUID);
            List <SitecoreTree.TaxonomyStruct> therapeuticCategories = _scTree.SearchTaxonomy(therapeuticCategoryGuid, "").ToList();
            HDirectoryStruct therapeuticCategoryDirectory            = _scTree.GetHierarchyByGuid(therapeuticCategoryGuid);

            Guid marketSegmentGuid = new Guid(Constants.MARKET_SEGMENT_GUID);
            List <SitecoreTree.TaxonomyStruct> marketSegments = _scTree.SearchTaxonomy(marketSegmentGuid, "").ToList();
            HDirectoryStruct marketSegmentDirectory           = _scTree.GetHierarchyByGuid(marketSegmentGuid);

            _industryTabController = new TaxonomyTabController(uxIndustriesKeywords, uxIndustriesViewTree, uxIndustriesViewSearch,
                                                               uxIndustriesResults, uxIndustriesResultsTree, uxIndustriesSelected, industries, industryDirectory,
                                                               uxIndustriesIcon, tabControl1, tabControl1.TabPages[4]);

            _subjectTabController = new TaxonomyTabController(uxSubjectsKeywords, uxSubjectsViewTree, uxSubjectsViewSearch, uxSubjectsResults,
                                                              uxSubjectsResultsTree, uxSubjectsSelected, subjects, subjectDirectory, uxSubjectsIcon, tabControl1, tabControl1.TabPages[5]);

            _geographyTabController = new TaxonomyTabController(uxGeographyKeywords, uxGeographyViewTree, uxGeographyViewSearch, uxGeographyResults,
                                                                uxGeographyResultsTree, uxGeographySelected, regions, regionDirectory, uxGeographyIcon, tabControl1, tabControl1.TabPages[6]);

            _therapeuticCategoriesTabController = new TaxonomyTabController(uxTherapeuticCategoriesKeywords, uxTherapeuticCategoriesViewTree, uxTherapeuticCategoriesViewSearch,
                                                                            uxTherapeuticCategoriesResults, uxTherapeuticCategoriesResultsTree, uxTherapeuticCategoriesSelected, therapeuticCategories,
                                                                            therapeuticCategoryDirectory, uxTherapeuticCategoriesIcon, tabControl1, tabControl1.TabPages[7]);

            _marketSegmentsTabController = new TaxonomyTabController(uxMarketSegmentsKeywords, uxMarketSegmentsViewTree, uxMarketSegmentsViewSearch, uxMarketSegmentsResults,
                                                                     uxMarketSegmentsResultsTree, uxMarketSegmentsSelected, marketSegments, marketSegmentDirectory, uxMarketSegmentsIcon, tabControl1, tabControl1.TabPages[8]);

            tabControl1.TabPages[4].Tag = _industryTabController;
            tabControl1.TabPages[5].Tag = _subjectTabController;
            tabControl1.TabPages[6].Tag = _geographyTabController;
            tabControl1.TabPages[7].Tag = _therapeuticCategoriesTabController;
            tabControl1.TabPages[8].Tag = _marketSegmentsTabController;

            _taxonomyTabControllers.Add(_industryTabController);
            _taxonomyTabControllers.Add(_subjectTabController);
            _taxonomyTabControllers.Add(_geographyTabController);
            _taxonomyTabControllers.Add(_therapeuticCategoriesTabController);
            _taxonomyTabControllers.Add(_marketSegmentsTabController);

            loginControl1.ToReveal = uxArticlePanel;


            if (SitecoreUser.GetUser().LoggedIn)
            {
                loginControl1.HideLogin();
            }

            Image collapsedImage = Properties.Resources.right_icon;
            Image expandedImage  = Properties.Resources.down_icon;

            _industriesExpandPanel = new ExpandFlowPanel(uxSummaryIndustriesExpand, uxSummaryIndustriesFlow,
                                                         expandedImage, collapsedImage);
            _subjectsExpandPanel = new ExpandFlowPanel(uxSummarySubjectsExpand, uxSummarySubjectsFlow,
                                                       expandedImage, collapsedImage);
            _geographyExpandPanel = new ExpandFlowPanel(uxSummaryGeographyExpand, uxSummaryGeographyFlow,
                                                        expandedImage, collapsedImage);
            _therapeuticCategoriesExpandPanel = new ExpandFlowPanel(uxSummaryTherapeuticCategoriesExpand,
                                                                    uxSummaryTherapeuticCategoriesFlow, expandedImage, collapsedImage);
            _marketSegmentsExpandPanel = new ExpandFlowPanel(uxSummaryMarketSegmentsExpand, uxSummaryMarketSegmentsFlow,
                                                             expandedImage, collapsedImage);
        }