private bool matchMarkToXML(_Mark m, List <XmlNode> rows, ref Dictionary <_Mark, XmlNode> warning) { foreach (XmlNode row in rows) { XmlNode rebar = row["B2aBar"]; if (rebar == null) { return(false); } string type = XML_Handle.emptyNodehandle(rebar, "Type"); string pos_nr = XML_Handle.emptyNodehandle(rebar, "Litt"); string diam = XML_Handle.emptyNodehandle(rebar, "Dim"); if (m.Position_Shape == "A") { if (m.Position_Shape == type && m.Position_Nr.ToString() == pos_nr && m.Diameter.ToString() == diam) { write("Found in XML: " + m.ToString()); string rebarString = XML_Handle.getXMLRebarString(rebar); write(rebarString); write(""); return(true); } } else { if (m.Position_Nr.ToString() == pos_nr) { if (m.Position_Shape.ToString() != type) { warning[m] = rebar; } else if (m.Diameter.ToString() != diam) { warning[m] = rebar; } write("Found in XML: " + m.ToString()); string rebarString = XML_Handle.getXMLRebarString(rebar); write(rebarString); write(""); return(true); } } } return(false); }
private bool promptAddRebarToXml(_Mark u) { _Ed.PromptKeywordOptions promptOptions = new _Ed.PromptKeywordOptions(""); promptOptions.Message = "\nAdd to XML: " + u.ToString(); promptOptions.Keywords.Add("Yes"); promptOptions.Keywords.Add("No"); promptOptions.AllowNone = false; _Ed.PromptResult promptResult = _c.ed.GetKeywords(promptOptions); if (promptResult.Status == _Ed.PromptStatus.OK) { if (promptResult.StringResult == "Yes") { return(true); } } return(false); }