private void createColumnElement(XmlNode chNode, Dictionary <string, object> generalDictionary) { GeneralForm columnForm = new GeneralForm(); String columnName = chNode.Attributes[0].Value; columnForm.Text = "Column " + columnName; columnForm.General_DescriptionGFBox.Text = chNode.Attributes[1].Value; columnForm.General_DescriptionGFBox.Select(0, 0); generalDictionary.Add(columnName, columnForm); }
private void createRowElement(XmlNode chNode, Dictionary <string, object> generalDictionary) { GeneralForm rowForm = new GeneralForm(); String rowName = chNode.Attributes[0].Value; rowForm.Text = "Row " + rowName; rowForm.General_DescriptionGFBox.Text = chNode.Attributes[1].Value; rowForm.General_DescriptionGFBox.Select(0, 0); generalDictionary.Add(rowName, rowForm); }
public GeneralForm loadRootNode() { XmlNode root = doc.DocumentElement; GeneralForm spreadsheetForm = new GeneralForm(); spreadsheetForm.Text = "Spreadsheet " + root.Attributes[0].Value; spreadsheetForm.General_DescriptionGFBox.Text = root.Attributes[1].Value; spreadsheetForm.General_DescriptionGFBox.Select(0, 0); return(spreadsheetForm); }
private void createCellElement(XmlNode chNode, Dictionary <string, object> cellDictionary) { //formula if (chNode.HasChildNodes) { CellForm cellForm = new CellForm(); String cellName = chNode.Attributes[0].Value; cellForm.createFormSizes(cellElementList(chNode.ChildNodes)); cellForm.Text = "Cell " + cellName; cellForm.General_DescriptionBox.Text = chNode.Attributes[1].Value; cellForm.General_DescriptionBox.Select(0, 0); if (chNode.ChildNodes.Count == 2) { cellForm.inputBox.Text = chNode.ChildNodes.Item(0).Attributes[1].Value; cellForm.OutputBox.Text = chNode.ChildNodes.Item(1).Attributes[0].Value; cellDictionary.Add(cellName, cellForm); } else { foreach (XmlNode child in chNode.ChildNodes) { if (child.Name.Equals("input")) { foreach (Control ctr in cellForm.Controls) { if (ctr is TextBox && ctr.Name.Equals(child.Attributes[0].Value)) { ctr.Text = child.Attributes[1].Value; break; } } } if (child.Name.Equals("output")) { cellForm.OutputBox.Text = child.Attributes[0].Value; } } cellDictionary.Add(cellName, cellForm); } } //value else { GeneralForm cellForm = new GeneralForm(); String cellName = chNode.Attributes[0].Value; cellForm.Text = "Cell " + cellName; cellForm.General_DescriptionGFBox.Text = chNode.Attributes[1].Value; cellForm.General_DescriptionGFBox.Select(0, 0); cellDictionary.Add(cellName, cellForm); } }
public void loadWorksheet(Dictionary <string, object> generalDictionary) { XmlNode root = doc.DocumentElement; if (root != null) { GeneralForm worksheetForm; foreach (XmlNode chNode in root.ChildNodes) { worksheetForm = new GeneralForm(); String worksheetName = chNode.Attributes[0].Value; worksheetForm.Text = "Worksheet " + worksheetName; worksheetForm.General_DescriptionGFBox.Text = chNode.Attributes[1].Value; worksheetForm.General_DescriptionGFBox.Select(0, 0); generalDictionary.Add(worksheetName, worksheetForm); } } }