public override void LoadContentData() { _resourceManager.LoadGraphicResources(); if (_contentLoaded) { return; } ClientGoalsLists.Load(_resourceManager.DataClientGoalsFile); TargetCustomersLists.LoadHHIData(_resourceManager.DataHHIFile); TargetCustomersLists.LoadDemoData(_resourceManager.DataDemoFile); TargetCustomersLists.LoadGeographyData(_resourceManager.DataGeographyFile); if (_resourceManager.SettingsFile.ExistsLocal()) { var document = new XmlDocument(); document.Load(_resourceManager.SettingsFile.LocalPath); foreach (var tabConfigNode in document.SelectNodes(@"//Settings/Tab")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }) { var tabId = tabConfigNode.SelectSingleNode("Type")?.InnerText?.ToLower(); ShiftTopTabInfo tabInfo; switch (tabId) { case "default": tabInfo = new CleanslateTabInfo(); break; case "cover": tabInfo = new CoverTabInfo(); break; case "intro": tabInfo = new IntroTabInfo(); break; case "agenda": tabInfo = new AgendaTabInfo(); break; case "goals": tabInfo = new GoalsTabInfo(); break; case "market": tabInfo = new MarketTabInfo(); break; case "partnership": tabInfo = new PartnershipTabInfo(); break; case "needs-solutions": tabInfo = new NeedsSolutionsTabInfo(); break; case "cbc": tabInfo = new CBCTabInfo(); break; case "integrated-solution": tabInfo = new IntegratedSolutionTabInfo(); break; case "investment": tabInfo = new InvestmentTabInfo(); break; case "next-steps": tabInfo = new NextStepsTabInfo(); break; case "contract": tabInfo = new ContractTabInfo(); break; case "support-materials": tabInfo = new CommonTopTabInfo(ShiftTopTabType.SupportMaterials); break; case "spec-builder": tabInfo = new CommonTopTabInfo(ShiftTopTabType.SpecBuilder); break; case "approach": tabInfo = new ApproachTabInfo(); break; case "roi": tabInfo = new ROITabInfo(); break; default: throw new ArgumentOutOfRangeException("Shift tab type is not defined"); } tabInfo.LoadData(tabConfigNode, _resourceManager); TabsInfo.Add(tabInfo); } } _contentLoaded = true; }
public override void LoadContentData() { _resourceManager.LoadGraphicResources(); if (_contentLoaded) { return; } if (_resourceManager.SettingsFile.ExistsLocal()) { var document = new XmlDocument(); document.Load(_resourceManager.SettingsFile.LocalPath); foreach (var tabConfigNode in document.SelectNodes(@"//Settings/Tab")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }) { var tabId = tabConfigNode.SelectSingleNode("Type")?.InnerText?.ToLower(); StarTopTabInfo tabInfo; switch (tabId) { case "default": tabInfo = new CleanslateTabInfo(); break; case "cover": tabInfo = new CoverTabInfo(); break; case "cna": tabInfo = new CNATabInfo(); break; case "fishing": tabInfo = new FishingTabInfo(); break; case "customer": tabInfo = new CustomerTabInfo(); break; case "share": tabInfo = new ShareTabInfo(); break; case "roi": tabInfo = new ROITabInfo(); break; case "market": tabInfo = new MarketTabInfo(); break; case "video": tabInfo = new VideoTabInfo(); break; case "audience": tabInfo = new AudienceTabInfo(); break; case "solution": tabInfo = new SolutionTabInfo(); break; case "closers": tabInfo = new ClosersTabInfo(); break; default: throw new ArgumentOutOfRangeException("Star tab type is not defined"); } tabInfo.LoadData(tabConfigNode, _resourceManager); TabsInfo.Add(tabInfo); } } UsersList.Load(_resourceManager.DataUsersFile); ClientGoalsLists.Load(_resourceManager.DataClientGoalsFile); TargetCustomersLists.LoadCombinedData(_resourceManager.DataTargetCustomersFile); _contentLoaded = true; }