public override void LoadData(XmlNode configNode, ResourceManager resourceManager) { base.LoadData(configNode, resourceManager); if (!_resourceManager.DataROIPartEFile.ExistsLocal()) { return; } var document = new XmlDocument(); document.Load(_resourceManager.DataROIPartEFile.LocalPath); var node = document.SelectSingleNode(@"/SHIFT13E"); if (node == null) { return; } foreach (var headerNode in (node.SelectNodes("./SHIFT13EHeader")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }).ToList()) { HeadersItems.Add(ListDataItem.FromXml(headerNode)); } Tab1 = Tab1Info.FromXml(node); Tab2 = Tab2Info.FromXml(node); Tab3 = Tab3Info.FromXml(node, _resourceManager); CommonEditorConfiguration = TextEditorConfiguration.FromXml(node); HeadersEditorConfiguration = TextEditorConfiguration.FromXml(node, "SHIFT13EHeader"); }
public void Load(StorageFile dataFile) { var document = new XmlDocument(); document.Load(dataFile.LocalPath); var node = document.SelectSingleNode(@"/LeadOff"); if (node == null) { return; } foreach (XmlNode childNode in node.ChildNodes) { switch (childNode.Name) { case "SlideHeader": Headers.Add(ListDataItem.FromXml(childNode)); break; case "Statement": Statements.Add(ListDataItem.FromXml(childNode)); break; } } }
public override void LoadData(XmlNode configNode, ResourceManager resourceManager) { base.LoadData(configNode, resourceManager); if (!resourceManager.DataCNAPartBFile.ExistsLocal()) { return; } var document = new XmlDocument(); document.Load(resourceManager.DataCNAPartBFile.LocalPath); var node = document.SelectSingleNode(@"/CP02B"); if (node == null) { return; } foreach (XmlNode childNode in node.ChildNodes) { var item = ListDataItem.FromXml(childNode); switch (childNode.Name) { case "CP02BHeader": if (!String.IsNullOrEmpty(item.Value)) { HeadersItems.Add(item); } break; } } Clipart1Configuration = ClipartConfiguration.FromXml(node, "CP02BClipart1"); Clipart2Configuration = ClipartConfiguration.FromXml(node, "CP02BClipart2"); }
public void Load(StorageFile dataFile) { var document = new XmlDocument(); document.Load(dataFile.LocalPath); var node = document.SelectSingleNode(@"/CoverSlide"); if (node == null) return; foreach (XmlNode childNode in node.ChildNodes) { switch (childNode.Name) { case "SlideHeader": Headers.Add(ListDataItem.FromXml(childNode)); break; case "Quote": var quote = new Quote(); foreach (XmlAttribute attribute in childNode.Attributes) { switch (attribute.Name) { case "Value": quote.Text = attribute.Value; break; case "Author": quote.Author = attribute.Value; break; } } Quotes.Add(quote); break; } } }
public override void LoadData(XmlNode configNode, ResourceManager resourceManager) { base.LoadData(configNode, resourceManager); if (!resourceManager.DataMarketPartBFile.ExistsLocal()) { return; } var document = new XmlDocument(); document.Load(resourceManager.DataMarketPartBFile.LocalPath); var node = document.SelectSingleNode(@"/CP07B"); if (node == null) { return; } foreach (XmlNode childNode in node.ChildNodes) { var item = ListDataItem.FromXml(childNode); switch (childNode.Name) { case "CP07BHeader": if (!String.IsNullOrEmpty(item.Value)) { HeadersItems.Add(item); } break; case "CP07BSubheader1": if (item.IsPlaceholder) { SubHeader1Placeholder = item.Value; } else { SubHeader1DefaultValue = item.Value; } break; case "CP07BSubheader2": if (item.IsPlaceholder) { SubHeader2Placeholder = item.Value; } else { SubHeader2DefaultValue = item.Value; } break; } } Clipart1Configuration = ClipartConfiguration.FromXml(node, "CP07BClipart1"); Clipart2Configuration = ClipartConfiguration.FromXml(node, "CP07BClipart2"); Clipart3Configuration = ClipartConfiguration.FromXml(node, "CP07BClipart3"); Clipart4Configuration = ClipartConfiguration.FromXml(node, "CP07BClipart4"); Clipart5Configuration = ClipartConfiguration.FromXml(node, "CP07BClipart5"); }
public static TabInfo FromXml( XmlNode configNode, string parentConfigPrefix, StepInfo stepInfo) { var tabInfo = new TabInfo(stepInfo); tabInfo.Title = configNode.SelectSingleNode(String.Format("./{0}TabNames/Tab{1}", parentConfigPrefix, tabInfo.StepInfo.Index))?.InnerText; for (var i = 0; i < tabInfo.ComboDefaultItems.Length; i++) { var listDataItemNode = configNode.SelectSingleNode(String.Format("./{0}TAB{1}COMBO{2}", parentConfigPrefix, tabInfo.StepInfo.Index, i + 1)); if (listDataItemNode != null) { tabInfo.ComboDefaultItems[i] = ListDataItem.FromXml(listDataItemNode); } } tabInfo.ComboConfiguration = TextEditorConfiguration.FromXml(configNode, String.Format("Tab{0}Combos", tabInfo.StepInfo.Index)); return(tabInfo); }
public override void LoadData(XmlNode configNode, ResourceManager resourceManager) { base.LoadData(configNode, resourceManager); if (resourceManager.DataNeedsCommonFile.ExistsLocal()) { var document = new XmlDocument(); document.Load(resourceManager.DataNeedsCommonFile.LocalPath); var itemInfoNodes = document.SelectNodes("//SHIFTNeeds/Need")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }; foreach (var itemInfoNode in itemInfoNodes) { NeedsList.Add(NeedsItemInfo.FromXml(itemInfoNode, resourceManager.ClipartTab7SubAFolder)); } } if (resourceManager.DataNeedsSolutionsPartAFile.ExistsLocal()) { var document = new XmlDocument(); document.Load(resourceManager.DataNeedsSolutionsPartAFile.LocalPath); var node = document.SelectSingleNode(@"/SHIFT07A"); if (node == null) { return; } foreach (XmlNode childNode in node.ChildNodes) { var item = ListDataItem.FromXml(childNode); switch (childNode.Name) { case "SHIFT07AHeader": if (!String.IsNullOrEmpty(item.Value)) { HeadersItems.Add(item); } break; case "SHIFT07ACombo1": if (!String.IsNullOrEmpty(item.Value)) { Combo1Items.Add(item); } break; } } TabSelector = TabSelectorConfiguration.FromXml(node, "SHIFT07ATabStrip1"); CommonEditorConfiguration = TextEditorConfiguration.FromXml(node); HeadersEditorConfiguration = TextEditorConfiguration.FromXml(node, "SHIFT07AHeader"); Combo1Configuration = TextEditorConfiguration.FromXml(node, "SHIFT07ACombo1"); foreach (var itemInfo in NeedsList) { itemInfo.SubheaderConfiguration = TextEditorConfiguration.FromXml(node, String.Format("NeedButton{0}", itemInfo.Id)); } } }
public void LoadData() { if (_isConfigured) { return; } if (!File.Exists(_sourceFilePath)) { return; } var document = new XmlDocument(); document.Load(_sourceFilePath); var configNode = document.SelectSingleNode("//Settings"); if (configNode == null) { return; } foreach (var node in configNode.SelectNodes("./SolutionHeader")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }) { HeaderItems.Add(ListDataItem.FromXml(node)); } foreach (var node in configNode.SelectNodes("./SolutionCombo1")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }) { Combo1Items.Add(ListDataItem.FromXml(node)); } foreach (var node in configNode.SelectNodes("./Toggles/Toggle")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }) { var id = node.Attributes?.OfType <XmlAttribute>() .FirstOrDefault(a => String.Equals(a.Name, "Id", StringComparison.OrdinalIgnoreCase))?.Value?.ToLower(); switch (id) { case PositioningId: Positioning = PositioningInfo.FromXml(node); break; case ResearchId: Research = ResearchInfo.FromXml(node); break; case StyleId: Style = StyleInfo.FromXml(node, _imagesFolder, ProductId); break; } } HeaderConfiguration = TextEditorConfiguration.FromXml(configNode, "SolutionHeader"); Combo1Configuration = TextEditorConfiguration.FromXml(configNode, "SolutionCombo1"); _isConfigured = true; }
public static Tab2Info FromXml(XmlNode configNode) { var tabInfo = Empty(); if (configNode != null) { tabInfo.Title = configNode.SelectSingleNode("./Title")?.InnerText ?? tabInfo.Title; tabInfo.ToggleSwitch = CheckboxInfo.FromXml(configNode.SelectSingleNode("./ToggleSwitch")); tabInfo.Checkbox1 = CheckboxInfo.FromXml(configNode.SelectSingleNode("./Checkbox1")); foreach (var node in configNode.SelectNodes("./Combo1")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }) { tabInfo.Combo1Items.Add(ListDataItem.FromXml(node)); } var bulletComboLists = new[] { tabInfo.BulletCombo1Items, tabInfo.BulletCombo2Items, tabInfo.BulletCombo3Items, tabInfo.BulletCombo4Items, tabInfo.BulletCombo5Items, tabInfo.BulletCombo6Items, tabInfo.BulletCombo7Items, tabInfo.BulletCombo8Items }; for (var i = 0; i < bulletComboLists.Length; i++) { var defaultItemNode = configNode.SelectSingleNode(String.Format("./BulletCombo{0}", i + 1)); if (defaultItemNode == null) { continue; } bulletComboLists[i].Add(ListDataItem.FromXml(defaultItemNode)); } foreach (var node in configNode.SelectNodes("./BulletList/Item")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }) { var nodeValue = node.InnerText; foreach (var bulletComboList in bulletComboLists) { if (!bulletComboList.Any(item => String.Equals(nodeValue, item.Value, StringComparison.OrdinalIgnoreCase))) { bulletComboList.Add(ListDataItem.FromString(nodeValue)); } } } tabInfo.Combo1Configuration = TextEditorConfiguration.FromXml(configNode, "Combo1"); tabInfo.BulletComboConfiguration = TextEditorConfiguration.FromXml(configNode, "BulletCombos"); } return(tabInfo); }
public override void LoadData(XmlNode configNode, ResourceManager resourceManager) { base.LoadData(configNode, resourceManager); if (!resourceManager.DataGoalsPartBFile.ExistsLocal()) { return; } var document = new XmlDocument(); document.Load(resourceManager.DataGoalsPartBFile.LocalPath); var node = document.SelectSingleNode(@"/SHIFT04B"); if (node == null) { return; } foreach (XmlNode childNode in node.ChildNodes) { var item = ListDataItem.FromXml(childNode); switch (childNode.Name) { case "SHIFT04BHeader": if (!String.IsNullOrEmpty(item.Value)) { HeadersItems.Add(item); } break; case "SHIFT04BMULTIBOX1": MemoPopup1DefaultItem = item; break; case "SHIFT04BMULTIBOX2": MemoPopup2DefaultItem = item; break; case "SHIFT04BMULTIBOX3": MemoPopup3DefaultItem = item; break; } } Clipart1Configuration = ClipartConfiguration.FromXml(node, "SHIFT04BClipart1"); Clipart2Configuration = ClipartConfiguration.FromXml(node, "SHIFT04BClipart2"); Clipart3Configuration = ClipartConfiguration.FromXml(node, "SHIFT04BClipart3"); CommonEditorConfiguration = TextEditorConfiguration.FromXml(node); HeadersEditorConfiguration = TextEditorConfiguration.FromXml(node, "SHIFT04BHeader"); MemoPopup1Configuration = TextEditorConfiguration.FromXml(node, "SHIFT04BMULTIBOX1"); MemoPopup2Configuration = TextEditorConfiguration.FromXml(node, "SHIFT04BMULTIBOX2"); MemoPopup3Configuration = TextEditorConfiguration.FromXml(node, "SHIFT04BMULTIBOX3"); }
public override void LoadData(XmlNode configNode, ResourceManager resourceManager) { base.LoadData(configNode, resourceManager); var steps = new List <StepInfo>(); if (resourceManager.DataCBCCommonFile.ExistsLocal()) { var document = new XmlDocument(); document.Load(resourceManager.DataCBCCommonFile.LocalPath); var stepInfoNodes = document.SelectNodes("//CBC/Step")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }; foreach (var stepInfoNode in stepInfoNodes) { steps.Add(StepInfo.FromXml(stepInfoNode)); } } if (resourceManager.DataCBCPartBFile.ExistsLocal()) { var document = new XmlDocument(); document.Load(resourceManager.DataCBCPartBFile.LocalPath); var node = document.SelectSingleNode(@"/SHIFT08B"); if (node == null) { return; } foreach (XmlNode childNode in node.ChildNodes) { var item = ListDataItem.FromXml(childNode); switch (childNode.Name) { case "SHIFT08BHeader": if (!String.IsNullOrEmpty(item.Value)) { HeadersItems.Add(item); } break; } } if (steps.Count == 5) { Tab1Info = TabInfo.FromXml(node, "SHIFT08B", steps.Single(step => step.Index == 1)); Tab2Info = TabInfo.FromXml(node, "SHIFT08B", steps.Single(step => step.Index == 2)); Tab3Info = TabInfo.FromXml(node, "SHIFT08B", steps.Single(step => step.Index == 3)); Tab4Info = TabInfo.FromXml(node, "SHIFT08B", steps.Single(step => step.Index == 4)); Tab5Info = TabInfo.FromXml(node, "SHIFT08B", steps.Single(step => step.Index == 5)); } CommonEditorConfiguration = TextEditorConfiguration.FromXml(node); HeadersEditorConfiguration = TextEditorConfiguration.FromXml(node, "SHIFT08BHeader"); } }
public override void LoadData(XmlNode configNode, ResourceManager resourceManager) { base.LoadData(configNode, resourceManager); if (!resourceManager.DataCoverPartEFile.ExistsLocal()) { return; } var document = new XmlDocument(); document.Load(resourceManager.DataCoverPartEFile.LocalPath); var node = document.SelectSingleNode(@"/SHIFT01E"); if (node == null) { return; } foreach (XmlNode childNode in node.ChildNodes) { var item = ListDataItem.FromXml(childNode); switch (childNode.Name) { case "SHIFT01EHeader": if (!String.IsNullOrEmpty(item.Value)) { HeadersItems.Add(item); } break; case "SHIFT01ESubheader1": if (item.IsPlaceholder) { SubHeader1Placeholder = item.Value; } else { SubHeader1DefaultValue = item.Value; } break; } } Clipart1Configuration = ClipartConfiguration.FromXml(node, "SHIFT01EClipart1"); Clipart2Configuration = ClipartConfiguration.FromXml(node, "SHIFT01EClipart2"); CommonEditorConfiguration = TextEditorConfiguration.FromXml(node); HeadersEditorConfiguration = TextEditorConfiguration.FromXml(node, "SHIFT01EHeader"); SubHeader1Configuration = TextEditorConfiguration.FromXml(node, "SHIFT01ESubheader1"); Calendar1Configuration = TextEditorConfiguration.FromXml(node, "Calendar1"); }
public void LoadData() { if (_isConfigured) { return; } if (!File.Exists(_sourceFilePath)) { return; } var document = new XmlDocument(); document.Load(_sourceFilePath); var configNode = document.SelectSingleNode("//Settings"); if (configNode == null) { return; } foreach (var node in configNode.SelectNodes("./MediaPlan/Description/Item")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }) { MemoPopup1Items.Add(ListDataItem.FromXml(node)); } foreach (var node in configNode.SelectNodes("./MediaPlan/SizeSpecs/Item")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }) { Combo1Items.Add(ListDataItem.FromXml(node)); } foreach (var node in configNode.SelectNodes("./MediaPlan/Quantity/Item")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }) { Combo2Items.Add(ListDataItem.FromXml(node)); } foreach (var node in configNode.SelectNodes("./MediaPlan/Investment/Item")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }) { Combo3Items.Add(ListDataItem.FromXml(node)); } _isConfigured = true; }
public static Tab1Info FromXml(XmlNode configNode) { var tabInfo = Empty(); if (configNode != null) { tabInfo.Title = configNode.SelectSingleNode("./Title")?.InnerText ?? tabInfo.Title; tabInfo.ComboCheckbox1 = CheckboxInfo.FromXml(configNode.SelectSingleNode("./Checkbox1")); foreach (var node in configNode.SelectNodes("./Combo1")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }) { tabInfo.Combo1Items.Add(ListDataItem.FromXml(node)); } tabInfo.MemoPopupCheckbox1 = CheckboxInfo.FromXml(configNode.SelectSingleNode("./MultiBox1Checkbox1")); foreach (var node in configNode.SelectNodes("./MultiBox1")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }) { tabInfo.MemoPopup1Items.Add(ListDataItem.FromXml(node)); } tabInfo.ComboCheckbox2 = CheckboxInfo.FromXml(configNode.SelectSingleNode("./Checkbox2")); foreach (var node in configNode.SelectNodes("./Combo2")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }) { tabInfo.Combo2Items.Add(ListDataItem.FromXml(node)); } tabInfo.MemoPopupCheckbox2 = CheckboxInfo.FromXml(configNode.SelectSingleNode("./MultiBox2Checkbox2")); foreach (var node in configNode.SelectNodes("./MultiBox2")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }) { tabInfo.MemoPopup2Items.Add(ListDataItem.FromXml(node)); } tabInfo.Combo1Configuration = TextEditorConfiguration.FromXml(configNode, "Combo1"); tabInfo.MemoPopup1Configuration = TextEditorConfiguration.FromXml(configNode, "Multibox1"); tabInfo.Combo2Configuration = TextEditorConfiguration.FromXml(configNode, "Combo2"); tabInfo.MemoPopup2Configuration = TextEditorConfiguration.FromXml(configNode, "Multibox2"); } return(tabInfo); }
public void LoadHHIData(StorageFile dataFile) { var document = new XmlDocument(); document.Load(dataFile.LocalPath); var node = document.SelectSingleNode(@"./Income"); if (node == null) { return; } foreach (XmlNode childNode in node.ChildNodes) { switch (childNode.Name) { case "HHI": HHIs.Add(ListDataItem.FromXml(childNode)); break; } } }
public void LoadCombinedData(StorageFile dataFile) { var document = new XmlDocument(); document.Load(dataFile.LocalPath); var node = document.SelectSingleNode(@"/TargetCustomers"); if (node == null) { return; } foreach (XmlNode childNode in node.ChildNodes) { switch (childNode.Name) { case "SlideHeader": Headers.Add(ListDataItem.FromXml(childNode)); break; case "Demo": Demos.Add(ListDataItem.FromXml(childNode)); break; case "HHI": HHIs.Add(ListDataItem.FromXml(childNode)); break; case "Geography": Geographies.Add(ListDataItem.FromXml(childNode)); break; } } CombinedList.AddRange(Demos); CombinedList.AddRange(HHIs); CombinedList.AddRange(Geographies); }
public void Load(StorageFile dataFile) { var document = new XmlDocument(); document.Load(dataFile.LocalPath); var node = document.SelectSingleNode(@"/SimpleSummary"); if (node != null) { foreach (XmlNode childNode in node.ChildNodes) { switch (childNode.Name) { case "SlideHeader": Headers.Add(ListDataItem.FromXml(childNode)); break; case "Detail": foreach (XmlAttribute attribute in childNode.Attributes) { switch (attribute.Name) { case "Value": if (!string.IsNullOrEmpty(attribute.Value)) { Details.Add(attribute.Value); } break; } } break; } } } }
public override void LoadData(XmlNode configNode, ResourceManager resourceManager) { base.LoadData(configNode, resourceManager); if (resourceManager.DataNextStepsPartIFile.ExistsLocal()) { var document = new XmlDocument(); document.Load(resourceManager.DataNextStepsPartIFile.LocalPath); var node = document.SelectSingleNode(@"/SHIFT14I"); if (node == null) { return; } foreach (XmlNode childNode in node.ChildNodes) { var item = ListDataItem.FromXml(childNode); switch (childNode.Name) { case "SHIFT14IHeader": if (!String.IsNullOrEmpty(item.Value)) { HeadersItems.Add(item); } break; case "SHIFT14ICombo1": if (!String.IsNullOrEmpty(item.Value)) { Combo1Items.Add(item); } break; case "SHIFT14ICombo2": if (!String.IsNullOrEmpty(item.Value)) { Combo2Items.Add(item); } break; case "SHIFT14ICombo3": if (!String.IsNullOrEmpty(item.Value)) { Combo3Items.Add(item); } break; case "SHIFT14ICombo4": if (!String.IsNullOrEmpty(item.Value)) { Combo4Items.Add(item); } break; case "SHIFT14ICombo5": if (!String.IsNullOrEmpty(item.Value)) { Combo5Items.Add(item); } break; case "SHIFT14ITAB1SHUBHEADER1": if (item.IsPlaceholder) { SubHeader1Placeholder = item.Value; } else { SubHeader1DefaultValue = item.Value; } break; case "SHIFT14ITAB2SHUBHEADER1": if (item.IsPlaceholder) { SubHeader2Placeholder = item.Value; } else { SubHeader2DefaultValue = item.Value; } break; case "SHIFT14ITAB3SHUBHEADER1": if (item.IsPlaceholder) { SubHeader3Placeholder = item.Value; } else { SubHeader3DefaultValue = item.Value; } break; case "SHIFT14ITAB4SHUBHEADER1": if (item.IsPlaceholder) { SubHeader4Placeholder = item.Value; } else { SubHeader4DefaultValue = item.Value; } break; case "SHIFT14ITAB5SHUBHEADER1": if (item.IsPlaceholder) { SubHeader5Placeholder = item.Value; } else { SubHeader5DefaultValue = item.Value; } break; case "SHIFT14ITAB6SHUBHEADER1": if (item.IsPlaceholder) { SubHeader6Placeholder = item.Value; } else { SubHeader6DefaultValue = item.Value; } break; } } Clipart1Configuration = ClipartConfiguration.FromXml(node, "SHIFT14IClipart1"); Clipart2Configuration = ClipartConfiguration.FromXml(node, "SHIFT14IClipart2"); Clipart3Configuration = ClipartConfiguration.FromXml(node, "SHIFT14IClipart3"); CommonEditorConfiguration = TextEditorConfiguration.FromXml(node); HeadersEditorConfiguration = TextEditorConfiguration.FromXml(node, "SHIFT14IHeader"); Combo1Configuration = TextEditorConfiguration.FromXml(node, "SHIFT14ICombo1"); Combo2Configuration = TextEditorConfiguration.FromXml(node, "SHIFT14ICombo2"); Combo3Configuration = TextEditorConfiguration.FromXml(node, "SHIFT14ICombo3"); Combo4Configuration = TextEditorConfiguration.FromXml(node, "SHIFT14ICombo4"); Combo5Configuration = TextEditorConfiguration.FromXml(node, "SHIFT14ICombo5"); SubHeader1Configuration = TextEditorConfiguration.FromXml(node, "SHIFT14ITAB1SHUBHEADER1"); SubHeader2Configuration = TextEditorConfiguration.FromXml(node, "SHIFT14ITAB2SHUBHEADER1"); SubHeader3Configuration = TextEditorConfiguration.FromXml(node, "SHIFT14ITAB3SHUBHEADER1"); SubHeader4Configuration = TextEditorConfiguration.FromXml(node, "SHIFT14ITAB4SHUBHEADER1"); SubHeader5Configuration = TextEditorConfiguration.FromXml(node, "SHIFT14ITAB5SHUBHEADER1"); SubHeader6Configuration = TextEditorConfiguration.FromXml(node, "SHIFT14ITAB6SHUBHEADER1"); } if (resourceManager.DataNextStepsCommonFile.ExistsLocal()) { var document = new XmlDocument(); document.Load(resourceManager.DataNextStepsCommonFile.LocalPath); var comboLists = new[] { Combo1Items, Combo2Items, Combo3Items, Combo4Items, Combo5Items }; var proofNodes = document.SelectNodes("//SHIFTNextSteps/Item")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }; foreach (var proofNode in proofNodes) { var nodeValue = proofNode.Attributes?.OfType <XmlAttribute>() .FirstOrDefault(a => String.Equals(a.Name, "Description", StringComparison.OrdinalIgnoreCase))?.Value; if (!String.IsNullOrWhiteSpace(nodeValue)) { foreach (var comboList in comboLists) { if (!comboList.Any(item => String.Equals(nodeValue, item.Value, StringComparison.OrdinalIgnoreCase))) { comboList.Add(ListDataItem.FromString(nodeValue)); } } } } } }
public override void LoadData(XmlNode configNode, ResourceManager resourceManager) { base.LoadData(configNode, resourceManager); if (!resourceManager.DataMarketPartBFile.ExistsLocal()) { return; } var document = new XmlDocument(); document.Load(resourceManager.DataMarketPartBFile.LocalPath); var node = document.SelectSingleNode(@"/SHIFT05B"); if (node == null) { return; } foreach (XmlNode childNode in node.ChildNodes) { var item = ListDataItem.FromXml(childNode); switch (childNode.Name) { case "SHIFT05BHeader": if (!String.IsNullOrEmpty(item.Value)) { HeadersItems.Add(item); } break; case "SHIFT05BCombo1": if (!String.IsNullOrEmpty(item.Value)) { Combo1Items.Add(item); } break; case "SHIFT05BMULTIBOX1": MemoPopup1DefaultItem = item; break; case "SHIFT05BMULTIBOX2": MemoPopup2DefaultItem = item; break; case "SHIFT05BMULTIBOX3": MemoPopup3DefaultItem = item; break; case "SHIFT05BSubheader1": SubHeader1DefaultValue = Decimal.Parse((item.Value ?? "0").Replace(CultureInfo.CurrentCulture.NumberFormat.PercentSymbol, String.Empty), NumberStyles.AllowCurrencySymbol | NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands); break; case "SHIFT05BSubheader2": if (item.IsPlaceholder) { SubHeader2Placeholder = item.Value; } else { SubHeader2DefaultValue = item.Value; } break; case "SHIFT05BSubheader3": SubHeader3DefaultValue = Decimal.Parse((item.Value ?? "0").Replace(CultureInfo.CurrentCulture.NumberFormat.PercentSymbol, String.Empty), NumberStyles.AllowCurrencySymbol | NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands); break; case "SHIFT05BSubheader4": SubHeader4DefaultValue = Decimal.Parse((item.Value ?? "0").Replace(CultureInfo.CurrentCulture.NumberFormat.PercentSymbol, String.Empty), NumberStyles.AllowCurrencySymbol | NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands); break; case "SHIFT05BSubheader5": SubHeader5DefaultValue = Decimal.Parse((item.Value ?? "0").Replace(CultureInfo.CurrentCulture.NumberFormat.PercentSymbol, String.Empty), NumberStyles.AllowCurrencySymbol | NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands); break; } } Clipart1Configuration = ClipartConfiguration.FromXml(node, "SHIFT05BClipart1"); Clipart2Configuration = ClipartConfiguration.FromXml(node, "SHIFT05BClipart2"); Clipart3Configuration = ClipartConfiguration.FromXml(node, "SHIFT05BClipart3"); Clipart4Configuration = ClipartConfiguration.FromXml(node, "SHIFT05BClipart4"); Clipart5Configuration = ClipartConfiguration.FromXml(node, "SHIFT05BClipart5"); CommonEditorConfiguration = TextEditorConfiguration.FromXml(node); HeadersEditorConfiguration = TextEditorConfiguration.FromXml(node, "SHIFT05BHeader"); Combo1Configuration = TextEditorConfiguration.FromXml(node, "SHIFT05BCombo1"); MemoPopup1Configuration = TextEditorConfiguration.FromXml(node, "SHIFT05BMULTIBOX1"); MemoPopup2Configuration = TextEditorConfiguration.FromXml(node, "SHIFT05BMULTIBOX2"); MemoPopup3Configuration = TextEditorConfiguration.FromXml(node, "SHIFT05BMULTIBOX3"); SubHeader1Configuration = TextEditorConfiguration.FromXml(node, "SHIFT05BSubheader1"); SubHeader2Configuration = TextEditorConfiguration.FromXml(node, "SHIFT05BSubheader2"); SubHeader3Configuration = TextEditorConfiguration.FromXml(node, "SHIFT05BSubheader3"); SubHeader4Configuration = TextEditorConfiguration.FromXml(node, "SHIFT05BSubheader4"); SubHeader5Configuration = TextEditorConfiguration.FromXml(node, "SHIFT05BSubheader5"); }
public override void LoadData(XmlNode configNode, ResourceManager resourceManager) { base.LoadData(configNode, resourceManager); if (resourceManager.DataSolutionsCommonFile.ExistsLocal()) { var document = new XmlDocument(); document.Load(resourceManager.DataSolutionsCommonFile.LocalPath); var itemInfoNodes = document.SelectNodes("//Products/Product")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }; foreach (var itemInfoNode in itemInfoNodes) { SolutionsList.Add(SolutionsItemInfo.FromXml(itemInfoNode, resourceManager.ClipartTab7SubCFolder)); } } if (resourceManager.DataNeedsSolutionsPartDFile.ExistsLocal()) { var document = new XmlDocument(); document.Load(resourceManager.DataNeedsSolutionsPartDFile.LocalPath); var node = document.SelectSingleNode(@"/SHIFT07D"); if (node == null) { return; } foreach (XmlNode childNode in node.ChildNodes) { var item = ListDataItem.FromXml(childNode); switch (childNode.Name) { case "SHIFT07DHeader": if (!String.IsNullOrEmpty(item.Value)) { HeadersItems.Add(item); } break; case "SHIFT07DCombo1": if (item.IsPlaceholder) { Combo1Placeholder = item.Value; } break; case "SHIFT07DCombo2": if (item.IsPlaceholder) { Combo2Placeholder = item.Value; } break; case "SHIFT07DCombo3": if (item.IsPlaceholder) { Combo3Placeholder = item.Value; } break; case "SHIFT07DCombo4": if (item.IsPlaceholder) { Combo4Placeholder = item.Value; } break; } } Clipart1Configuration = ClipartConfiguration.FromXml(node, "SHIFT07DClipart1"); Clipart2Configuration = ClipartConfiguration.FromXml(node, "SHIFT07DClipart2"); Clipart3Configuration = ClipartConfiguration.FromXml(node, "SHIFT07DClipart3"); CommonEditorConfiguration = TextEditorConfiguration.FromXml(node); HeadersEditorConfiguration = TextEditorConfiguration.FromXml(node, "SHIFT07DHeader"); Combo1Configuration = TextEditorConfiguration.FromXml(node, "SHIFT07DCombo1"); Combo2Configuration = TextEditorConfiguration.FromXml(node, "SHIFT07DCombo2"); Combo3Configuration = TextEditorConfiguration.FromXml(node, "SHIFT07DCombo3"); Combo4Configuration = TextEditorConfiguration.FromXml(node, "SHIFT07DCombo4"); SubHeader1Configuration = TextEditorConfiguration.FromXml(node, "SHIFT07DLinkText1"); SubHeader2Configuration = TextEditorConfiguration.FromXml(node, "SHIFT07DLinkText2"); SubHeader3Configuration = TextEditorConfiguration.FromXml(node, "SHIFT07DLinkText3"); SubHeader4Configuration = TextEditorConfiguration.FromXml(node, "SHIFT07DLinkText4"); } }
public override void LoadData(XmlNode configNode, ResourceManager resourceManager) { base.LoadData(configNode, resourceManager); if (resourceManager.DataAgendaPartEFile.ExistsLocal()) { var document = new XmlDocument(); document.Load(resourceManager.DataAgendaPartEFile.LocalPath); var node = document.SelectSingleNode(@"/SHIFT03E"); if (node == null) { return; } Tab1Title = node.SelectSingleNode("./SHIFT03ETab1Name")?.Attributes ?.OfType <XmlAttribute>() .FirstOrDefault(a => String.Equals(a.Name, "Value", StringComparison.OrdinalIgnoreCase))?.Value ?? "Goals"; Tab2Title = node.SelectSingleNode("./SHIFT03ETab2Name")?.Attributes ?.OfType <XmlAttribute>() .FirstOrDefault(a => String.Equals(a.Name, "Value", StringComparison.OrdinalIgnoreCase))?.Value ?? "Strategy"; Tab3Title = node.SelectSingleNode("./SHIFT03ETab3Name")?.Attributes ?.OfType <XmlAttribute>() .FirstOrDefault(a => String.Equals(a.Name, "Value", StringComparison.OrdinalIgnoreCase))?.Value ?? "Tactics"; foreach (XmlNode childNode in node.ChildNodes) { var item = ListDataItem.FromXml(childNode); switch (childNode.Name) { case "SHIFT03EHeader": if (!String.IsNullOrEmpty(item.Value)) { HeadersItems.Add(item); } break; case "SHIFT03EMULTIBOX1": if (!String.IsNullOrEmpty(item.Value)) { MemoPopup1Items.Add(item); } break; case "SHIFT03EMULTIBOX2": if (!String.IsNullOrEmpty(item.Value)) { MemoPopup2Items.Add(item); } break; case "SHIFT03EMULTIBOX3": if (!String.IsNullOrEmpty(item.Value)) { MemoPopup3Items.Add(item); } break; case "SHIFT03EMULTIBOX4": if (!String.IsNullOrEmpty(item.Value)) { MemoPopup4Items.Add(item); } break; case "SHIFT03EMULTIBOX5": if (!String.IsNullOrEmpty(item.Value)) { MemoPopup5Items.Add(item); } break; case "SHIFT03EMULTIBOX6": if (!String.IsNullOrEmpty(item.Value)) { MemoPopup6Items.Add(item); } break; case "SHIFT03ECOMBO1": if (!String.IsNullOrEmpty(item.Value)) { Combo1Items.Add(item); } break; case "SHIFT03ECOMBO2": if (!String.IsNullOrEmpty(item.Value)) { Combo2Items.Add(item); } break; case "SHIFT03ECOMBO3": if (!String.IsNullOrEmpty(item.Value)) { Combo3Items.Add(item); } break; case "SHIFT03ECOMBO4": if (!String.IsNullOrEmpty(item.Value)) { Combo4Items.Add(item); } break; case "SHIFT03ECOMBO5": if (!String.IsNullOrEmpty(item.Value)) { Combo5Items.Add(item); } break; case "SHIFT03ECOMBO6": if (!String.IsNullOrEmpty(item.Value)) { Combo6Items.Add(item); } break; case "SHIFT03ECOMBO7": if (!String.IsNullOrEmpty(item.Value)) { Combo7Items.Add(item); } break; } } Clipart1Configuration = ClipartConfiguration.FromXml(node, "SHIFT03EClipart1"); Clipart2Configuration = ClipartConfiguration.FromXml(node, "SHIFT03EClipart2"); Clipart3Configuration = ClipartConfiguration.FromXml(node, "SHIFT03EClipart3"); CommonEditorConfiguration = TextEditorConfiguration.FromXml(node); HeadersEditorConfiguration = TextEditorConfiguration.FromXml(node, "SHIFT03EHeader"); MemoPopup1Configuration = TextEditorConfiguration.FromXml(node, "SHIFT03EMULTIBOX1"); MemoPopup2Configuration = TextEditorConfiguration.FromXml(node, "SHIFT03EMULTIBOX2"); MemoPopup3Configuration = TextEditorConfiguration.FromXml(node, "SHIFT03EMULTIBOX3"); MemoPopup4Configuration = TextEditorConfiguration.FromXml(node, "SHIFT03EMULTIBOX4"); MemoPopup5Configuration = TextEditorConfiguration.FromXml(node, "SHIFT03EMULTIBOX5"); MemoPopup6Configuration = TextEditorConfiguration.FromXml(node, "SHIFT03EMULTIBOX6"); ComboConfiguration = TextEditorConfiguration.FromXml(node, "TAB3COMBOS"); } if (resourceManager.DataClientGoalsFile.ExistsLocal()) { var targetMemoPopupLists = new[] { MemoPopup1Items, MemoPopup2Items, MemoPopup3Items, }; var document = new XmlDocument(); document.Load(resourceManager.DataClientGoalsFile.LocalPath); var goalNodes = document.SelectNodes("//ClientGoals/Goal")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }; foreach (var node in goalNodes) { var goalDataItem = ListDataItem.FromXml(node); foreach (var itemList in targetMemoPopupLists) { if (!itemList.Any(item => String.Equals(item.Value, goalDataItem.Value, StringComparison.OrdinalIgnoreCase))) { itemList.Add(ListDataItem.Clone(goalDataItem)); } } } } if (resourceManager.DataApproachesCommonFile.ExistsLocal()) { var targetMemoPopupLists = new[] { MemoPopup4Items, MemoPopup5Items, MemoPopup6Items, }; var document = new XmlDocument(); document.Load(resourceManager.DataApproachesCommonFile.LocalPath); var approachNodes = document.SelectNodes("//OurApproach/Approach/Name")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }; foreach (var node in approachNodes) { foreach (var itemList in targetMemoPopupLists) { if (!itemList.Any(item => String.Equals(item.Value, node.InnerText, StringComparison.OrdinalIgnoreCase))) { itemList.Add(ListDataItem.FromString(node.InnerText)); } } } } if (resourceManager.DataSolutionsCommonFile.ExistsLocal()) { var targetComboItemLists = new[] { Combo1Items, Combo2Items, Combo3Items, Combo4Items, Combo5Items, Combo6Items, Combo7Items, }; var document = new XmlDocument(); document.Load(resourceManager.DataSolutionsCommonFile.LocalPath); var productNodes = document.SelectNodes("//Products/Product/Name")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }; foreach (var node in productNodes) { foreach (var comboItemList in targetComboItemLists) { if (!comboItemList.Any(item => String.Equals(item.Value, node.InnerText, StringComparison.OrdinalIgnoreCase))) { comboItemList.Add(ListDataItem.FromString(node.InnerText)); } } } } }
public override void LoadData(XmlNode configNode, ResourceManager resourceManager) { base.LoadData(configNode, resourceManager); if (!resourceManager.DataAgendaPartDFile.ExistsLocal()) { return; } var document = new XmlDocument(); document.Load(resourceManager.DataAgendaPartDFile.LocalPath); var node = document.SelectSingleNode(@"/SHIFT03D"); if (node == null) { return; } foreach (XmlNode childNode in node.ChildNodes) { var item = ListDataItem.FromXml(childNode); switch (childNode.Name) { case "SHIFT03DHeader": if (!String.IsNullOrEmpty(item.Value)) { HeadersItems.Add(item); } break; case "SHIFT03DCombo1": if (!String.IsNullOrEmpty(item.Value)) { Combo1Items.Add(item); } break; case "SHIFT03DCombo2": if (!String.IsNullOrEmpty(item.Value)) { Combo2Items.Add(item); } break; case "SHIFT03DCombo3": if (!String.IsNullOrEmpty(item.Value)) { Combo3Items.Add(item); } break; case "SHIFT03DCombo4": if (!String.IsNullOrEmpty(item.Value)) { Combo4Items.Add(item); } break; case "SHIFT03DCombo5": if (!String.IsNullOrEmpty(item.Value)) { Combo5Items.Add(item); } break; } } Clipart1Configuration = ClipartConfiguration.FromXml(node, "SHIFT03DClipart1"); CommonEditorConfiguration = TextEditorConfiguration.FromXml(node); HeadersEditorConfiguration = TextEditorConfiguration.FromXml(node, "SHIFT03DHeader"); Combo1Configuration = TextEditorConfiguration.FromXml(node, "SHIFT03DCombo1"); Combo2Configuration = TextEditorConfiguration.FromXml(node, "SHIFT03DCombo2"); Combo3Configuration = TextEditorConfiguration.FromXml(node, "SHIFT03DCombo3"); Combo4Configuration = TextEditorConfiguration.FromXml(node, "SHIFT03DCombo4"); Combo5Configuration = TextEditorConfiguration.FromXml(node, "SHIFT03DCombo5"); }
public static Tab2Info FromXml(XmlNode configNode) { var tabInfo = Empty(); if (configNode != null) { foreach (var titleNode in (configNode.SelectNodes("./SHIFT13ETabStrip")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }).ToList()) { var titleAttribute = titleNode.Attributes?.OfType <XmlAttribute>() .FirstOrDefault(a => String.Equals(a.Name, "Tab2Name", StringComparison.OrdinalIgnoreCase)); if (titleAttribute == null) { continue; } tabInfo.Title = titleAttribute.Value; break; } var subheader1Item = ListDataItem.FromXml(configNode.SelectSingleNode("./SHIFT13ETAB2Subheader1")); if (subheader1Item.IsDefault && !subheader1Item.IsPlaceholder && !String.IsNullOrWhiteSpace(subheader1Item.Value)) { var itemValue = subheader1Item.Value.ToLower(); var scaleFactor = 1m; if (itemValue.EndsWith("b")) { itemValue = itemValue.Replace("b", ""); scaleFactor = 1000000000m; } else if (itemValue.EndsWith("m")) { itemValue = itemValue.Replace("m", ""); scaleFactor = 1000000m; } tabInfo.SubHeader1DefaultValue = Decimal.Parse(itemValue, NumberStyles.AllowCurrencySymbol | NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands) * scaleFactor; } var subheader2Item = ListDataItem.FromXml(configNode.SelectSingleNode("./SHIFT13ETAB2Subheader2")); if (subheader2Item.IsDefault && !subheader2Item.IsPlaceholder && !String.IsNullOrWhiteSpace(subheader2Item.Value)) { var itemValue = subheader2Item.Value.ToLower(); var scaleFactor = 1m; if (itemValue.EndsWith("b")) { itemValue = itemValue.Replace("b", ""); scaleFactor = 1000000000m; } else if (itemValue.EndsWith("m")) { itemValue = itemValue.Replace("m", ""); scaleFactor = 1000000m; } tabInfo.SubHeader2DefaultValue = Decimal.Parse(itemValue, NumberStyles.AllowCurrencySymbol | NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands) * scaleFactor; } var subheader3Item = ListDataItem.FromXml(configNode.SelectSingleNode("./SHIFT13ETAB2Subheader3")); if (subheader3Item.IsDefault && !subheader3Item.IsPlaceholder) { tabInfo.SubHeader3DefaultValue = subheader3Item.Value; } else if (subheader3Item.IsPlaceholder) { tabInfo.SubHeader3Placeholder = subheader3Item.Value; } tabInfo.Subheader1Configuration = TextEditorConfiguration.FromXml(configNode, "SHIFT13ESubHeader1"); tabInfo.Subheader2Configuration = TextEditorConfiguration.FromXml(configNode, "SHIFT13ESubHeader2"); tabInfo.Subheader3Configuration = TextEditorConfiguration.FromXml(configNode, "SHIFT13ESubHeader3"); } return(tabInfo); }
public static Tab3Info FromXml(XmlNode configNode, ResourceManager resourceManager) { var tabInfo = Empty(); if (configNode != null) { foreach (var titleNode in (configNode.SelectNodes("./SHIFT13ETabStrip")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }).ToList()) { var titleAttribute = titleNode.Attributes?.OfType <XmlAttribute>() .FirstOrDefault(a => String.Equals(a.Name, "Tab3Name", StringComparison.OrdinalIgnoreCase)); if (titleAttribute == null) { continue; } tabInfo.Title = titleAttribute.Value; break; } foreach (var comboNode in (configNode.SelectNodes("./SHIFT13ETAB3COMBO1")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }).ToList()) { tabInfo.Combo1Items.Add(ListDataItem.FromXml(comboNode)); } foreach (var comboNode in (configNode.SelectNodes("./SHIFT13ETAB3COMBO2")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }).ToList()) { tabInfo.Combo2Items.Add(ListDataItem.FromXml(comboNode)); } foreach (var comboNode in (configNode.SelectNodes("./SHIFT13ETAB3COMBO3")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }).ToList()) { tabInfo.Combo3Items.Add(ListDataItem.FromXml(comboNode)); } foreach (var comboNode in (configNode.SelectNodes("./SHIFT13ETAB3COMBO4")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }).ToList()) { tabInfo.Combo4Items.Add(ListDataItem.FromXml(comboNode)); } if (resourceManager.DataAgreementCommonFile.ExistsLocal()) { var comboLists = new[] { tabInfo.Combo1Items, tabInfo.Combo2Items, tabInfo.Combo3Items, tabInfo.Combo4Items, }; var document = new XmlDocument(); document.Load(resourceManager.DataAgreementCommonFile.LocalPath); var televisionNodes = document.SelectNodes("//Settings/Television/Item")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }; foreach (var itemNode in televisionNodes) { var nodeValue = itemNode?.InnerText; if (!String.IsNullOrWhiteSpace(nodeValue)) { foreach (var comboList in comboLists) { if (!comboList.Any(item => String.Equals(nodeValue, item.Value, StringComparison.OrdinalIgnoreCase))) { comboList.Add(ListDataItem.FromString(nodeValue)); } } } } var digitalNodes = document.SelectNodes("//Settings/Digital/Item")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }; foreach (var itemNode in digitalNodes) { var nodeValue = itemNode?.InnerText; if (!String.IsNullOrWhiteSpace(nodeValue)) { foreach (var comboList in comboLists) { if (!comboList.Any(item => String.Equals(nodeValue, item.Value, StringComparison.OrdinalIgnoreCase))) { comboList.Add(ListDataItem.FromString(nodeValue)); } } } } } var subheader1Item = ListDataItem.FromXml(configNode.SelectSingleNode("./SHIFT13ETAB3Subheader1")); if (subheader1Item.IsDefault && !subheader1Item.IsPlaceholder && !String.IsNullOrWhiteSpace(subheader1Item.Value)) { var itemValue = subheader1Item.Value.ToLower(); var scaleFactor = 1m; if (itemValue.EndsWith("b")) { itemValue = itemValue.Replace("b", ""); scaleFactor = 1000000000m; } else if (itemValue.EndsWith("m")) { itemValue = itemValue.Replace("m", ""); scaleFactor = 1000000m; } tabInfo.SubHeader1DefaultValue = Decimal.Parse(itemValue, NumberStyles.AllowCurrencySymbol | NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands) * scaleFactor; } var subheader2Item = ListDataItem.FromXml(configNode.SelectSingleNode("./SHIFT13ETAB3Subheader2")); if (subheader2Item.IsDefault && !subheader2Item.IsPlaceholder && !String.IsNullOrWhiteSpace(subheader2Item.Value)) { var itemValue = subheader2Item.Value.ToLower(); var scaleFactor = 1m; if (itemValue.EndsWith("b")) { itemValue = itemValue.Replace("b", ""); scaleFactor = 1000000000m; } else if (itemValue.EndsWith("m")) { itemValue = itemValue.Replace("m", ""); scaleFactor = 1000000m; } tabInfo.SubHeader2DefaultValue = Decimal.Parse(itemValue, NumberStyles.AllowCurrencySymbol | NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands) * scaleFactor; } var subheader3Item = ListDataItem.FromXml(configNode.SelectSingleNode("./SHIFT13ETAB3Subheader3")); if (subheader3Item.IsDefault && !subheader3Item.IsPlaceholder && !String.IsNullOrWhiteSpace(subheader3Item.Value)) { var itemValue = subheader3Item.Value.ToLower(); var scaleFactor = 1m; if (itemValue.EndsWith("b")) { itemValue = itemValue.Replace("b", ""); scaleFactor = 1000000000m; } else if (itemValue.EndsWith("m")) { itemValue = itemValue.Replace("m", ""); scaleFactor = 1000000m; } tabInfo.SubHeader3DefaultValue = Decimal.Parse(itemValue, NumberStyles.AllowCurrencySymbol | NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands) * scaleFactor; } var subheader4Item = ListDataItem.FromXml(configNode.SelectSingleNode("./SHIFT13ETAB3Subheader4")); if (subheader4Item.IsDefault && !subheader4Item.IsPlaceholder && !String.IsNullOrWhiteSpace(subheader4Item.Value)) { var itemValue = subheader4Item.Value.ToLower(); var scaleFactor = 1m; if (itemValue.EndsWith("b")) { itemValue = itemValue.Replace("b", ""); scaleFactor = 1000000000m; } else if (itemValue.EndsWith("m")) { itemValue = itemValue.Replace("m", ""); scaleFactor = 1000000m; } tabInfo.SubHeader4DefaultValue = Decimal.Parse(itemValue, NumberStyles.AllowCurrencySymbol | NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands) * scaleFactor; } tabInfo.Combo1Configuration = TextEditorConfiguration.FromXml(configNode, "SHIFT13ETAB1COMBO1"); tabInfo.Combo2Configuration = TextEditorConfiguration.FromXml(configNode, "SHIFT13ETAB1COMBO2"); tabInfo.Combo3Configuration = TextEditorConfiguration.FromXml(configNode, "SHIFT13ETAB1COMBO3"); tabInfo.Combo4Configuration = TextEditorConfiguration.FromXml(configNode, "SHIFT13ETAB1COMBO4"); tabInfo.Subheader1Configuration = TextEditorConfiguration.FromXml(configNode, "SHIFT13ETAB3SubHeader1"); tabInfo.Subheader2Configuration = TextEditorConfiguration.FromXml(configNode, "SHIFT13ETAB3SubHeader2"); tabInfo.Subheader3Configuration = TextEditorConfiguration.FromXml(configNode, "SHIFT13ETAB3SubHeader3"); tabInfo.Subheader4Configuration = TextEditorConfiguration.FromXml(configNode, "SHIFT13ETAB3SubHeader4"); } return(tabInfo); }
public override void LoadData(XmlNode configNode, ResourceManager resourceManager) { base.LoadData(configNode, resourceManager); if (!resourceManager.DataPartnershipPartCFile.ExistsLocal()) { return; } var document = new XmlDocument(); document.Load(resourceManager.DataPartnershipPartCFile.LocalPath); var node = document.SelectSingleNode(@"/SHIFT06C"); if (node == null) { return; } foreach (XmlNode childNode in node.ChildNodes) { var item = ListDataItem.FromXml(childNode); switch (childNode.Name) { case "SHIFT06CHeader": if (!String.IsNullOrEmpty(item.Value)) { HeadersItems.Add(item); } break; case "SHIFT06CSubheader1": if (item.IsPlaceholder) { SubHeader1Placeholder = item.Value; } else { SubHeader1DefaultValue = item.Value; } break; case "SHIFT06CSubheader2": if (item.IsPlaceholder) { SubHeader2Placeholder = item.Value; } else { SubHeader2DefaultValue = item.Value; } break; case "SHIFT06CSubheader3": if (item.IsPlaceholder) { SubHeader3Placeholder = item.Value; } else { SubHeader3DefaultValue = item.Value; } break; case "SHIFT06CSubheader4": if (item.IsPlaceholder) { SubHeader4Placeholder = item.Value; } else { SubHeader4DefaultValue = item.Value; } break; case "SHIFT06CSubheader5": if (item.IsPlaceholder) { SubHeader5Placeholder = item.Value; } else { SubHeader5DefaultValue = item.Value; } break; case "SHIFT06CSubheader6": if (item.IsPlaceholder) { SubHeader6Placeholder = item.Value; } else { SubHeader6DefaultValue = item.Value; } break; case "SHIFT06CSubheader7": if (item.IsPlaceholder) { SubHeader7Placeholder = item.Value; } else { SubHeader7DefaultValue = item.Value; } break; case "SHIFT06CSubheader8": if (item.IsPlaceholder) { SubHeader8Placeholder = item.Value; } else { SubHeader8DefaultValue = item.Value; } break; } } Clipart1Configuration = ClipartConfiguration.FromXml(node, "SHIFT06CClipart1"); Clipart2Configuration = ClipartConfiguration.FromXml(node, "SHIFT06CClipart2"); CommonEditorConfiguration = TextEditorConfiguration.FromXml(node); HeadersEditorConfiguration = TextEditorConfiguration.FromXml(node, "SHIFT06CHeader"); SubHeader1Configuration = TextEditorConfiguration.FromXml(node, "SHIFT06CSubheader1"); SubHeader2Configuration = TextEditorConfiguration.FromXml(node, "SHIFT06CSubheader2"); SubHeader3Configuration = TextEditorConfiguration.FromXml(node, "SHIFT06CSubheader3"); SubHeader4Configuration = TextEditorConfiguration.FromXml(node, "SHIFT06CSubheader4"); SubHeader5Configuration = TextEditorConfiguration.FromXml(node, "SHIFT06CSubheader5"); SubHeader6Configuration = TextEditorConfiguration.FromXml(node, "SHIFT06CSubheader6"); SubHeader7Configuration = TextEditorConfiguration.FromXml(node, "SHIFT06CSubheader7"); SubHeader8Configuration = TextEditorConfiguration.FromXml(node, "SHIFT06CSubheader8"); }
public override void LoadData(XmlNode configNode, ResourceManager resourceManager) { base.LoadData(configNode, resourceManager); Clipart1Image = resourceManager.GraphicResources?.Tab9_B_Clipart1; Clipart2Image = resourceManager.GraphicResources?.Tab9_B_Clipart2; Clipart3Image = resourceManager.GraphicResources?.Tab9_B_Clipart3; if (resourceManager.DataApproachesCommonFile.ExistsLocal()) { var document = new XmlDocument(); document.Load(resourceManager.DataApproachesCommonFile.LocalPath); var itemInfoNodes = document.SelectNodes("//OurApproach/Approach")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }; foreach (var itemInfoNode in itemInfoNodes) { ApproachItems.Add(ApproachItemInfo.FromXml(itemInfoNode, resourceManager.ClipartTab15SubAFolder)); } } if (resourceManager.DataApproachPartBFile.ExistsLocal()) { var document = new XmlDocument(); document.Load(resourceManager.DataApproachPartBFile.LocalPath); var node = document.SelectSingleNode(@"/SHIFT09B"); if (node == null) { return; } foreach (XmlNode childNode in node.ChildNodes) { var item = ListDataItem.FromXml(childNode); switch (childNode.Name) { case "SHIFT09BHeader": if (!String.IsNullOrEmpty(item.Value)) { HeadersItems.Add(item); } break; case "SHIFT09BCombo1": if (item.IsPlaceholder) { Combo1Placeholder = item.Value; } break; case "SHIFT09BCombo2": if (item.IsPlaceholder) { Combo2Placeholder = item.Value; } break; case "SHIFT09BCombo3": if (item.IsPlaceholder) { Combo3Placeholder = item.Value; } break; case "SHIFT09BCombo4": if (item.IsPlaceholder) { Combo4Placeholder = item.Value; } break; } } Clipart1Configuration = ClipartConfiguration.FromXml(node, "SHIFT09BClipart1"); Clipart2Configuration = ClipartConfiguration.FromXml(node, "SHIFT09BClipart2"); Clipart3Configuration = ClipartConfiguration.FromXml(node, "SHIFT09BClipart3"); CommonEditorConfiguration = TextEditorConfiguration.FromXml(node); HeadersEditorConfiguration = TextEditorConfiguration.FromXml(node, "SHIFT09BHeader"); Combo1Configuration = TextEditorConfiguration.FromXml(node, "SHIFT09BCombo1"); Combo2Configuration = TextEditorConfiguration.FromXml(node, "SHIFT09BCombo2"); Combo3Configuration = TextEditorConfiguration.FromXml(node, "SHIFT09BCombo3"); Combo4Configuration = TextEditorConfiguration.FromXml(node, "SHIFT09BCombo4"); SubHeader1Configuration = TextEditorConfiguration.FromXml(node, "SHIFT09BLinkText1"); SubHeader2Configuration = TextEditorConfiguration.FromXml(node, "SHIFT09BLinkText2"); SubHeader3Configuration = TextEditorConfiguration.FromXml(node, "SHIFT09BLinkText3"); SubHeader4Configuration = TextEditorConfiguration.FromXml(node, "SHIFT09BLinkText4"); } }
public override void LoadData(XmlNode configNode, ResourceManager resourceManager) { base.LoadData(configNode, resourceManager); if (!resourceManager.DataSharePartAFile.ExistsLocal()) { return; } var document = new XmlDocument(); document.Load(resourceManager.DataSharePartAFile.LocalPath); var node = document.SelectSingleNode(@"/CP05A"); if (node == null) { return; } foreach (XmlNode childNode in node.ChildNodes) { var item = ListDataItem.FromXml(childNode); switch (childNode.Name) { case "CP05AHeader": if (!String.IsNullOrEmpty(item.Value)) { HeadersItems.Add(item); } break; case "CP05ABillionCombo1": if (!String.IsNullOrEmpty(item.Value)) { Combo1Items.Add(item); } break; case "CP05APercentCombo2": if (!String.IsNullOrEmpty(item.Value)) { Combo2Items.Add(item); } break; case "CP05APopulationCombo3": if (!String.IsNullOrEmpty(item.Value)) { Combo3Items.Add(item); } break; case "CP05ASharePointCombo4": if (!String.IsNullOrEmpty(item.Value)) { Combo4Items.Add(item); } break; case "CP05ASubHeader1": if (item.IsPlaceholder) { SubHeader1Placeholder = item.Value; } else { SubHeader1DefaultValue = item.Value; } break; case "CP05ASubHeader2": SubHeader2DefaultValue = Decimal.Parse(item.Value ?? "0", NumberStyles.AllowCurrencySymbol | NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands); break; case "CP05ASubHeader3": if (item.IsPlaceholder) { SubHeader3Placeholder = item.Value; } else { SubHeader3DefaultValue = item.Value; } break; case "CP05ASubHeader4": if (item.IsPlaceholder) { SubHeader4Placeholder = item.Value; } else { SubHeader4DefaultValue = item.Value; } break; case "CP05ASubHeader5": if (item.IsPlaceholder) { SubHeader5Placeholder = item.Value; } else { SubHeader5DefaultValue = item.Value; } break; case "CP05ASubHeader6": if (item.IsPlaceholder) { SubHeader6Placeholder = item.Value; } else { SubHeader6DefaultValue = item.Value; } break; case "CP05ASubHeader7": if (item.IsPlaceholder) { SubHeader7Placeholder = item.Value; } else { SubHeader7DefaultValue = item.Value; } break; } } Clipart1Configuration = ClipartConfiguration.FromXml(node, "CP05AClipart1"); Clipart2Configuration = ClipartConfiguration.FromXml(node, "CP05AClipart2"); Clipart3Configuration = ClipartConfiguration.FromXml(node, "CP05AClipart3"); }
public static Tab1Info FromXml(XmlNode configNode) { var tabInfo = Empty(); if (configNode != null) { foreach (var titleNode in (configNode.SelectNodes("./SHIFT13ETabStrip")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }).ToList()) { var titleAttribute = titleNode.Attributes?.OfType <XmlAttribute>() .FirstOrDefault(a => String.Equals(a.Name, "Tab1Name", StringComparison.OrdinalIgnoreCase)); if (titleAttribute == null) { continue; } tabInfo.Title = titleAttribute.Value; break; } foreach (var comboNode in (configNode.SelectNodes("./SHIFT13ETAB1COMBO1")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }).ToList()) { tabInfo.Combo1Items.Add(ListDataItem.FromXml(comboNode)); } foreach (var comboNode in (configNode.SelectNodes("./SHIFT13ETAB1COMBO2")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }).ToList()) { tabInfo.Combo2Items.Add(ListDataItem.FromXml(comboNode)); } tabInfo.Checkbox1 = CheckboxInfo.FromXml(configNode.SelectSingleNode("./SHIFT13ECheckbox1")); tabInfo.Checkbox2 = CheckboxInfo.FromXml(configNode.SelectSingleNode("./SHIFT13ECheckbox2")); tabInfo.Combo1Configuration = TextEditorConfiguration.FromXml(configNode, "SHIFT13ETAB1COMBO1"); tabInfo.Combo2Configuration = TextEditorConfiguration.FromXml(configNode, "SHIFT13ETAB1COMBO2"); foreach (var styleNode in (configNode.SelectNodes("./ControlStyle")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }).ToList()) { var controlAttributeValue = styleNode.Attributes?.OfType <XmlAttribute>().FirstOrDefault(a => String.Equals(a.Name, "Control", StringComparison.OrdinalIgnoreCase))?.Value; switch (controlAttributeValue) { case "GridLines": tabInfo.GridLineColor = ColorTranslator.FromHtml(styleNode.Attributes ?.OfType <XmlAttribute>() .FirstOrDefault(a => String.Equals(a.Name, "Gridlinescolor", StringComparison.OrdinalIgnoreCase))?.Value); break; case "GridRow": tabInfo.RowTitlesForeColor = ColorTranslator.FromHtml(styleNode.Attributes ?.OfType <XmlAttribute>() .FirstOrDefault(a => String.Equals(a.Name, "FarLeftHeadercolor", StringComparison.OrdinalIgnoreCase))?.Value); tabInfo.ValueCellsForeColor = ColorTranslator.FromHtml(styleNode.Attributes ?.OfType <XmlAttribute>() .FirstOrDefault(a => String.Equals(a.Name, "CellTextColor", StringComparison.OrdinalIgnoreCase))?.Value); break; case "GridColumn": tabInfo.HeaderForeColor = ColorTranslator.FromHtml(styleNode.Attributes ?.OfType <XmlAttribute>() .FirstOrDefault(a => String.Equals(a.Name, "TopHeadercolor", StringComparison.OrdinalIgnoreCase))?.Value); break; case "PreLaunchShade": tabInfo.PrelaunchEmptySpaceBackColor = ColorTranslator.FromHtml(styleNode.Attributes ?.OfType <XmlAttribute>() .FirstOrDefault(a => String.Equals(a.Name, "FillColor", StringComparison.OrdinalIgnoreCase))?.Value); break; } } } return(tabInfo); }
public override void LoadData(XmlNode configNode, ResourceManager resourceManager) { base.LoadData(configNode, resourceManager); if (!resourceManager.DataROIPartDFile.ExistsLocal()) { return; } var document = new XmlDocument(); document.Load(resourceManager.DataROIPartDFile.LocalPath); var node = document.SelectSingleNode(@"/CP06D"); if (node == null) { return; } foreach (XmlNode childNode in node.ChildNodes) { var item = ListDataItem.FromXml(childNode); switch (childNode.Name) { case "CP06DHeader": if (!String.IsNullOrEmpty(item.Value)) { HeadersItems.Add(item); } break; case "CP06DSubHeader1": if (item.IsPlaceholder) { SubHeader1Placeholder = item.Value; } else { SubHeader1DefaultValue = item.Value; } break; case "CP06DSubHeader2": SubHeader2DefaultValue = Decimal.Parse((item.Value ?? "0").Replace(CultureInfo.CurrentCulture.NumberFormat.PercentSymbol, String.Empty), NumberStyles.AllowCurrencySymbol | NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands); break; case "CP06DSubHeader3": if (item.IsPlaceholder) { SubHeader3Placeholder = item.Value; } else { SubHeader3DefaultValue = item.Value; } break; case "CP06DSubHeader4": SubHeader4DefaultValue = Decimal.Parse((item.Value ?? "0").Replace(CultureInfo.CurrentCulture.NumberFormat.PercentSymbol, String.Empty), NumberStyles.AllowCurrencySymbol | NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands); break; case "CP06DSubHeader5": if (item.IsPlaceholder) { SubHeader5Placeholder = item.Value; } else { SubHeader5DefaultValue = item.Value; } break; case "CP06DSubHeader6": SubHeader6DefaultValue = Decimal.Parse((item.Value ?? "0").Replace(CultureInfo.CurrentCulture.NumberFormat.PercentSymbol, String.Empty), NumberStyles.AllowCurrencySymbol | NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands); break; case "CP06DSubHeader7": if (item.IsPlaceholder) { SubHeader7Placeholder = item.Value; } else { SubHeader7DefaultValue = item.Value; } break; case "CP06DSubHeader8": SubHeader8DefaultValue = Decimal.Parse((item.Value ?? "0").Replace(CultureInfo.CurrentCulture.NumberFormat.PercentSymbol, String.Empty), NumberStyles.AllowCurrencySymbol | NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands); break; case "CP06DSubHeader9": if (item.IsPlaceholder) { SubHeader9Placeholder = item.Value; } else { SubHeader9DefaultValue = item.Value; } break; case "CP06DSubHeader10": SubHeader10DefaultValue = Decimal.Parse((item.Value ?? "0").Replace(CultureInfo.CurrentCulture.NumberFormat.PercentSymbol, String.Empty), NumberStyles.AllowCurrencySymbol | NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands); break; case "CP06DSubHeader11": if (item.IsPlaceholder) { SubHeader11Placeholder = item.Value; } else { SubHeader11DefaultValue = item.Value; } break; case "CP06DSubHeader12": SubHeader12DefaultValue = Decimal.Parse((item.Value ?? "0").Replace(CultureInfo.CurrentCulture.NumberFormat.PercentSymbol, String.Empty), NumberStyles.AllowCurrencySymbol | NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands); break; case "CP06DSubHeader13": if (item.IsPlaceholder) { SubHeader13Placeholder = item.Value; } else { SubHeader13DefaultValue = item.Value; } break; case "CP06DSubHeader14": if (item.IsPlaceholder) { SubHeader14Placeholder = item.Value; } else { SubHeader14DefaultValue = item.Value; } break; case "CP06DSubHeader15": SubHeader15DefaultValue = Decimal.Parse((item.Value ?? "0").Replace(CultureInfo.CurrentCulture.NumberFormat.PercentSymbol, String.Empty), NumberStyles.AllowCurrencySymbol | NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands); break; case "CP06DSubHeader16": if (item.IsPlaceholder) { SubHeader16Placeholder = item.Value; } else { SubHeader16DefaultValue = item.Value; } break; case "CP06DSubHeader17": if (item.IsPlaceholder) { SubHeader17Placeholder = item.Value; } else { SubHeader17DefaultValue = item.Value; } break; } } Clipart1Configuration = ClipartConfiguration.FromXml(node, "CP06DClipart1"); Clipart2Configuration = ClipartConfiguration.FromXml(node, "CP06DClipart2"); Clipart3Configuration = ClipartConfiguration.FromXml(node, "CP06DClipart3"); }
public override void LoadData(XmlNode configNode, ResourceManager resourceManager) { base.LoadData(configNode, resourceManager); if (!resourceManager.DataInvestmentPartBFile.ExistsLocal()) { return; } var document = new XmlDocument(); document.Load(resourceManager.DataInvestmentPartBFile.LocalPath); var node = document.SelectSingleNode(@"/SHIFT12B"); if (node == null) { return; } foreach (XmlNode childNode in node.ChildNodes) { var item = ListDataItem.FromXml(childNode); switch (childNode.Name) { case "SHIFT12BHeader": if (!String.IsNullOrEmpty(item.Value)) { HeadersItems.Add(item); } break; case "SHIFT12BCombo1": if (!String.IsNullOrEmpty(item.Value)) { Combo1Items.Add(item); } break; case "SHIFT12BCombo2": if (!String.IsNullOrEmpty(item.Value)) { Combo2Items.Add(item); } break; case "SHIFT12BCombo3": if (!String.IsNullOrEmpty(item.Value)) { Combo3Items.Add(item); } break; case "SHIFT12BCombo4": if (!String.IsNullOrEmpty(item.Value)) { Combo4Items.Add(item); } break; case "SHIFT12BCombo5": if (!String.IsNullOrEmpty(item.Value)) { Combo5Items.Add(item); } break; case "SHIFT12BCombo6": if (!String.IsNullOrEmpty(item.Value)) { Combo6Items.Add(item); } break; case "SHIFT12BSubheader1": if (item.IsPlaceholder) { SubHeader1Placeholder = item.Value; } else { SubHeader1DefaultValue = item.Value; } break; case "SHIFT12BSubheader2": if (item.IsPlaceholder) { SubHeader2Placeholder = item.Value; } else { SubHeader2DefaultValue = item.Value; } break; } } Clipart1Configuration = ClipartConfiguration.FromXml(node, "SHIFT12BClipart1"); Clipart2Configuration = ClipartConfiguration.FromXml(node, "SHIFT12BClipart2"); Clipart3Configuration = ClipartConfiguration.FromXml(node, "SHIFT12BClipart3"); Clipart4Configuration = ClipartConfiguration.FromXml(node, "SHIFT12BClipart4"); Clipart5Configuration = ClipartConfiguration.FromXml(node, "SHIFT12BClipart5"); CommonEditorConfiguration = TextEditorConfiguration.FromXml(node); HeadersEditorConfiguration = TextEditorConfiguration.FromXml(node, "SHIFT12BHeader"); Combo1Configuration = TextEditorConfiguration.FromXml(node, "SHIFT12BCombo1"); Combo2Configuration = TextEditorConfiguration.FromXml(node, "SHIFT12BCombo2"); Combo3Configuration = TextEditorConfiguration.FromXml(node, "SHIFT12BCombo3"); Combo4Configuration = TextEditorConfiguration.FromXml(node, "SHIFT12BCombo4"); Combo5Configuration = TextEditorConfiguration.FromXml(node, "SHIFT12BCombo5"); Combo6Configuration = TextEditorConfiguration.FromXml(node, "SHIFT12BCombo6"); SubHeader1Configuration = TextEditorConfiguration.FromXml(node, "SHIFT12BSubheader1"); SubHeader2Configuration = TextEditorConfiguration.FromXml(node, "SHIFT12BSubheader2"); }