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 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 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 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 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 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.DataContractPartBFile.ExistsLocal()) { var document = new XmlDocument(); document.Load(_resourceManager.DataContractPartBFile.LocalPath); var node = document.SelectSingleNode(@"/SHIFT15B"); if (node == null) { return; } foreach (XmlNode childNode in node.ChildNodes) { var item = ListDataItem.FromXml(childNode); switch (childNode.Name) { case "SHIFT15BHeader": if (!String.IsNullOrEmpty(item.Value)) { HeadersItems.Add(item); } break; case "SHIFT15BTab1Combo1A": if (!String.IsNullOrEmpty(item.Value)) { Table1Combo1AItems.Add(item); } break; case "SHIFT15BTab1Combo1C": if (!String.IsNullOrEmpty(item.Value)) { Table1Combo1CItems.Add(item); } break; case "SHIFT15BTab1Combo2A": if (!String.IsNullOrEmpty(item.Value)) { Table1Combo2AItems.Add(item); } break; case "SHIFT15BTab1Combo2C": if (!String.IsNullOrEmpty(item.Value)) { Table1Combo2CItems.Add(item); } break; case "SHIFT15BTab1Combo3A": if (!String.IsNullOrEmpty(item.Value)) { Table1Combo3AItems.Add(item); } break; case "SHIFT15BTab1Combo3C": if (!String.IsNullOrEmpty(item.Value)) { Table1Combo3CItems.Add(item); } break; case "SHIFT15BTab1Combo4A": if (!String.IsNullOrEmpty(item.Value)) { Table1Combo4AItems.Add(item); } break; case "SHIFT15BTab1Combo4C": if (!String.IsNullOrEmpty(item.Value)) { Table1Combo4CItems.Add(item); } break; case "SHIFT15BTab1Combo5A": if (!String.IsNullOrEmpty(item.Value)) { Table1Combo5AItems.Add(item); } break; case "SHIFT15BTab1Combo5C": if (!String.IsNullOrEmpty(item.Value)) { Table1Combo5CItems.Add(item); } break; case "SHIFT15BTab1Combo6A": if (!String.IsNullOrEmpty(item.Value)) { Table1Combo6AItems.Add(item); } break; case "SHIFT15BTab1Combo6C": if (!String.IsNullOrEmpty(item.Value)) { Table1Combo6CItems.Add(item); } break; case "SHIFT15BTab1Combo7A": if (!String.IsNullOrEmpty(item.Value)) { Table1Combo7AItems.Add(item); } break; case "SHIFT15BTab1Combo7C": if (!String.IsNullOrEmpty(item.Value)) { Table1Combo7CItems.Add(item); } break; case "SHIFT15BTab1Combo8A": if (!String.IsNullOrEmpty(item.Value)) { Table1Combo8AItems.Add(item); } break; case "SHIFT15BTab1Combo8C": if (!String.IsNullOrEmpty(item.Value)) { Table1Combo8CItems.Add(item); } break; case "SHIFT15BTab1Combo9A": if (!String.IsNullOrEmpty(item.Value)) { Table1Combo9AItems.Add(item); } break; case "SHIFT15BTab1Combo9C": if (!String.IsNullOrEmpty(item.Value)) { Table1Combo9CItems.Add(item); } break; case "SHIFT15BTab1Combo10A": if (!String.IsNullOrEmpty(item.Value)) { Table1Combo10AItems.Add(item); } break; case "SHIFT15BTab1Combo10C": if (!String.IsNullOrEmpty(item.Value)) { Table1Combo10CItems.Add(item); } break; case "SHIFT15BTab2Combo1A": if (!String.IsNullOrEmpty(item.Value)) { Table2Combo1AItems.Add(item); } break; case "SHIFT15BTab2Combo1C": if (!String.IsNullOrEmpty(item.Value)) { Table2Combo1CItems.Add(item); } break; case "SHIFT15BTab2Combo2A": if (!String.IsNullOrEmpty(item.Value)) { Table2Combo2AItems.Add(item); } break; case "SHIFT15BTab2Combo2C": if (!String.IsNullOrEmpty(item.Value)) { Table2Combo2CItems.Add(item); } break; case "SHIFT15BTab2Combo3A": if (!String.IsNullOrEmpty(item.Value)) { Table2Combo3AItems.Add(item); } break; case "SHIFT15BTab2Combo3C": if (!String.IsNullOrEmpty(item.Value)) { Table2Combo3CItems.Add(item); } break; case "SHIFT15BTab2Combo4A": if (!String.IsNullOrEmpty(item.Value)) { Table2Combo4AItems.Add(item); } break; case "SHIFT15BTab2Combo4C": if (!String.IsNullOrEmpty(item.Value)) { Table2Combo4CItems.Add(item); } break; case "SHIFT15BTab2Combo5A": if (!String.IsNullOrEmpty(item.Value)) { Table2Combo5AItems.Add(item); } break; case "SHIFT15BTab2Combo5C": if (!String.IsNullOrEmpty(item.Value)) { Table2Combo5CItems.Add(item); } break; case "SHIFT15BTab2Combo6A": if (!String.IsNullOrEmpty(item.Value)) { Table2Combo6AItems.Add(item); } break; case "SHIFT15BTab2Combo6C": if (!String.IsNullOrEmpty(item.Value)) { Table2Combo6CItems.Add(item); } break; case "SHIFT15BTab2Combo7A": if (!String.IsNullOrEmpty(item.Value)) { Table2Combo7AItems.Add(item); } break; case "SHIFT15BTab2Combo7C": if (!String.IsNullOrEmpty(item.Value)) { Table2Combo7CItems.Add(item); } break; case "SHIFT15BTab2Combo8A": if (!String.IsNullOrEmpty(item.Value)) { Table2Combo8AItems.Add(item); } break; case "SHIFT15BTab2Combo8C": if (!String.IsNullOrEmpty(item.Value)) { Table2Combo8CItems.Add(item); } break; case "SHIFT15BTab2Combo9A": if (!String.IsNullOrEmpty(item.Value)) { Table2Combo9AItems.Add(item); } break; case "SHIFT15BTab2Combo9C": if (!String.IsNullOrEmpty(item.Value)) { Table2Combo9CItems.Add(item); } break; case "SHIFT15BTab2Combo10A": if (!String.IsNullOrEmpty(item.Value)) { Table2Combo10AItems.Add(item); } break; case "SHIFT15BTab2Combo10C": if (!String.IsNullOrEmpty(item.Value)) { Table2Combo10CItems.Add(item); } break; case "SHIFT15BSummaryCheckbox1": SummaryCheckbox1 = CheckboxInfo.FromXml(childNode); break; case "SHIFT15BSummaryCheckbox2": SummaryCheckbox3 = CheckboxInfo.FromXml(childNode); break; } } Table1Configuration = TableConfiguration.FromXml(node, "SHIFT15BTab1"); Table2Configuration = TableConfiguration.FromXml(node, "SHIFT15BTab2"); CommonEditorConfiguration = TextEditorConfiguration.FromXml(node); HeadersEditorConfiguration = TextEditorConfiguration.FromXml(node, "SHIFT15BHeader"); TableComboConfiguration = TextEditorConfiguration.FromXml(node, "SHIFT15BTabCombos"); SummaryConfiguration = TextEditorConfiguration.FromXml(node, "SHIFT15BSummaryCombos"); } if (resourceManager.DataAgreementCommonFile.ExistsLocal()) { var table1Column1Combos = Table1Column1Lists; var table2Column1Combos = Table2Column1Lists; var column3Combos = Table1Column3Lists.Union(Table2Column3Lists).ToArray(); var document = new XmlDocument(); document.Load(resourceManager.DataAgreementCommonFile.LocalPath); var table1Column1Nodes = document.SelectNodes("//Settings/Television/Item")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }; foreach (var itemNode in table1Column1Nodes) { var nodeValue = itemNode?.InnerText; if (!String.IsNullOrWhiteSpace(nodeValue)) { foreach (var comboList in table1Column1Combos) { if (!comboList.Any(item => String.Equals(nodeValue, item.Value, StringComparison.OrdinalIgnoreCase))) { comboList.Add(ListDataItem.FromString(nodeValue)); } } } } var table2Column1Nodes = document.SelectNodes("//Settings/Digital/Item")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }; foreach (var itemNode in table2Column1Nodes) { var nodeValue = itemNode?.InnerText; if (!String.IsNullOrWhiteSpace(nodeValue)) { foreach (var comboList in table2Column1Combos) { if (!comboList.Any(item => String.Equals(nodeValue, item.Value, StringComparison.OrdinalIgnoreCase))) { comboList.Add(ListDataItem.FromString(nodeValue)); } } } } var column3Nodes = document.SelectNodes("//Settings/Term/Item")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }; foreach (var itemNode in column3Nodes) { var nodeValue = itemNode?.InnerText; if (!String.IsNullOrWhiteSpace(nodeValue)) { foreach (var comboList in column3Combos) { if (!comboList.Any(item => String.Equals(nodeValue, item.Value, StringComparison.OrdinalIgnoreCase))) { comboList.Add(ListDataItem.FromString(nodeValue)); } } } } var summaryCombo1Nodes = document.SelectNodes("//Settings/Months/Item")?.OfType <XmlNode>().ToArray() ?? new XmlNode[] { }; foreach (var itemNode in summaryCombo1Nodes) { var nodeValue = itemNode?.InnerText; if (!String.IsNullOrWhiteSpace(nodeValue) && !SummaryCombo2Items.Any(item => String.Equals(nodeValue, item.Value, StringComparison.OrdinalIgnoreCase))) { SummaryCombo2Items.Add(ListDataItem.FromString(nodeValue)); } } } }
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.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); if (!resourceManager.DataCustomerPartCFile.ExistsLocal()) { return; } var document = new XmlDocument(); document.Load(resourceManager.DataCustomerPartCFile.LocalPath); var node = document.SelectSingleNode(@"/CP04C"); if (node == null) { return; } foreach (XmlNode childNode in node.ChildNodes) { var item = ListDataItem.FromXml(childNode); switch (childNode.Name) { case "CP04CHeader": if (!String.IsNullOrEmpty(item.Value)) { HeadersItems.Add(item); } break; case "CP04CSubheader1": if (item.IsPlaceholder) { SubHeader1Placeholder = item.Value; } else { SubHeader1DefaultValue = item.Value; } break; case "CP04CSubheader2": if (item.IsPlaceholder) { SubHeader2Placeholder = item.Value; } else { SubHeader2DefaultValue = item.Value; } break; case "CP04CSubheader3": if (item.IsPlaceholder) { SubHeader3Placeholder = item.Value; } else { SubHeader3DefaultValue = item.Value; } break; } } }
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 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 productNode in itemInfoNodes) { var fileName = productNode.SelectSingleNode("./ProductFile")?.InnerText; if (!String.IsNullOrWhiteSpace(fileName)) { var filePath = Path.Combine(Asa.Common.Core.Configuration.ResourceManager.Instance.DictionariesFolder.LocalPath, fileName); if (File.Exists(filePath)) { Products.Add(ProductInfo.FromFile( productNode.SelectSingleNode("./Name")?.InnerText, filePath)); } } } } if (_resourceManager.DataContractPartAFile.ExistsLocal()) { var document = new XmlDocument(); document.Load(_resourceManager.DataContractPartAFile.LocalPath); var node = document.SelectSingleNode(@"/SHIFT15A"); if (node == null) { return; } foreach (XmlNode childNode in node.ChildNodes) { var item = ListDataItem.FromXml(childNode); switch (childNode.Name) { case "SHIFT15AHeader": if (!String.IsNullOrEmpty(item.Value)) { HeadersItems.Add(item); } break; case "SHIFT15ACombo1": if (!String.IsNullOrEmpty(item.Value)) { Combo1Items.Add(item); } break; case "SHIFT15ACombo2": if (!String.IsNullOrEmpty(item.Value)) { Combo2Items.Add(item); } break; } } TabSelector = TabSelectorConfiguration.FromXml(node, "SHIFT15ATabStrip"); CommonEditorConfiguration = TextEditorConfiguration.FromXml(node); HeadersEditorConfiguration = TextEditorConfiguration.FromXml(node, "SHIFT15AHeader"); Combo1Configuration = TextEditorConfiguration.FromXml(node, "SHIFT15ACombo1"); Combo2Configuration = TextEditorConfiguration.FromXml(node, "SHIFT15ACombo2"); var productMemoPopupConfiguration = TextEditorConfiguration.FromXml(node, "ProductMultiBox1"); var productCombo1Configuration = TextEditorConfiguration.FromXml(node, "ProductCombo1"); var productCombo2Configuration = TextEditorConfiguration.FromXml(node, "ProductCombo2"); var productCombo3Configuration = TextEditorConfiguration.FromXml(node, "ProductCombo3"); var productButtonConfiguration = ProductButtonConfiguration.FromXml(node, "ProductButtons"); var productListConfiguration = FormListConfiguration.FromXml(node); foreach (var itemInfo in Products) { itemInfo.MemoPopup1Configuration = productMemoPopupConfiguration; itemInfo.Combo1Configuration = productCombo1Configuration; itemInfo.Combo2Configuration = productCombo2Configuration; itemInfo.Combo3Configuration = productCombo3Configuration; itemInfo.ButtonConfiguration = productButtonConfiguration; itemInfo.FormListConfiguration = productListConfiguration; } } }
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 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.DataNeedsSolutionsPartEFile.ExistsLocal()) { var document = new XmlDocument(); document.Load(resourceManager.DataNeedsSolutionsPartEFile.LocalPath); var node = document.SelectSingleNode(@"/SHIFT07E"); if (node == null) { return; } foreach (XmlNode childNode in node.ChildNodes) { var item = ListDataItem.FromXml(childNode); switch (childNode.Name) { case "SHIFT07EHeader": if (!String.IsNullOrEmpty(item.Value)) { HeadersItems.Add(item); } break; case "SHIFT07ECombo1": if (!String.IsNullOrEmpty(item.Value)) { Combo1Items.Add(item); } break; case "SHIFT07ETab1": Tab1DefaultItem = NeedsList.FirstOrDefault(needsItem => String.Equals( needsItem.SubHeaderDefaultValue, childNode.Attributes? .OfType <XmlAttribute>() .FirstOrDefault(a => String.Equals(a.Name, "MultiBoxValue", StringComparison.OrdinalIgnoreCase))?.Value, StringComparison.OrdinalIgnoreCase)); Tab1DefaultName = childNode.Attributes? .OfType <XmlAttribute>() .FirstOrDefault(a => String.Equals(a.Name, "TabName", StringComparison.OrdinalIgnoreCase))?.Value; break; case "SHIFT07ETab2": Tab2DefaultItem = NeedsList.FirstOrDefault(needsItem => String.Equals( needsItem.SubHeaderDefaultValue, childNode.Attributes? .OfType <XmlAttribute>() .FirstOrDefault(a => String.Equals(a.Name, "MultiBoxValue", StringComparison.OrdinalIgnoreCase))?.Value, StringComparison.OrdinalIgnoreCase)); Tab2DefaultName = childNode.Attributes? .OfType <XmlAttribute>() .FirstOrDefault(a => String.Equals(a.Name, "TabName", StringComparison.OrdinalIgnoreCase))?.Value; break; case "SHIFT07ETab3": Tab3DefaultItem = NeedsList.FirstOrDefault(needsItem => String.Equals( needsItem.SubHeaderDefaultValue, childNode.Attributes? .OfType <XmlAttribute>() .FirstOrDefault(a => String.Equals(a.Name, "MultiBoxValue", StringComparison.OrdinalIgnoreCase))?.Value, StringComparison.OrdinalIgnoreCase)); Tab3DefaultName = childNode.Attributes? .OfType <XmlAttribute>() .FirstOrDefault(a => String.Equals(a.Name, "TabName", StringComparison.OrdinalIgnoreCase))?.Value; break; case "SHIFT07ETab4": Tab4DefaultItem = NeedsList.FirstOrDefault(needsItem => String.Equals( needsItem.SubHeaderDefaultValue, childNode.Attributes? .OfType <XmlAttribute>() .FirstOrDefault(a => String.Equals(a.Name, "MultiBoxValue", StringComparison.OrdinalIgnoreCase))?.Value, StringComparison.OrdinalIgnoreCase)); Tab4DefaultName = childNode.Attributes? .OfType <XmlAttribute>() .FirstOrDefault(a => String.Equals(a.Name, "TabName", StringComparison.OrdinalIgnoreCase))?.Value; break; } } CommonEditorConfiguration = TextEditorConfiguration.FromXml(node); HeadersEditorConfiguration = TextEditorConfiguration.FromXml(node, "SHIFT07EHeader"); Combo1Configuration = TextEditorConfiguration.FromXml(node, "SHIFT07ECombo1"); SubHeader1Configuration = TextEditorConfiguration.FromXml(node, "Tab1MultiBox"); SubHeader2Configuration = TextEditorConfiguration.FromXml(node, "Tab2MultiBox"); SubHeader3Configuration = TextEditorConfiguration.FromXml(node, "Tab3MultiBox"); SubHeader4Configuration = TextEditorConfiguration.FromXml(node, "Tab4MultiBox"); FormListConfiguration = FormListConfiguration.FromXml(node); } }
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.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); 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.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"); }