public override void ParseXml(System.Xml.XmlElement aNode) { base.ParseXml(aNode); if (aNode.HasAttribute("readonly")) { FReadOnly = aNode.Attributes["readonly"].Value == "1"; } else { FReadOnly = false; } if (aNode.HasAttribute("printonlytext")) { FPrintOnlyText = aNode.Attributes["printonlytext"].Value == "1"; } else { FPrintOnlyText = true; } HC.SetBorderSideByPro(aNode.Attributes["border"].Value, FBorderSides); FBorderWidth = byte.Parse(aNode.Attributes["borderwidth"].Value); FText = aNode.InnerText; }
public override void ParseXml(System.Xml.XmlElement aNode) { base.ParseXml(aNode); FReadOnly = bool.Parse(aNode.Attributes["readonly"].Value); HC.SetBorderSideByPro(aNode.Attributes["border"].Value, FBorderSides); FBorderWidth = byte.Parse(aNode.Attributes["borderwidth"].Value); FText = aNode.InnerText; }
public void ParseXml(XmlElement aNode) { FWidth = int.Parse(aNode.Attributes["width"].Value); FHeight = int.Parse(aNode.Attributes["height"].Value); FRowSpan = int.Parse(aNode.Attributes["rowspan"].Value); FColSpan = int.Parse(aNode.Attributes["colspan"].Value); FAlignVert = (HCAlignVert)(byte.Parse(aNode.Attributes["vert"].Value)); FBackgroundColor = HC.GetXmlRGBColor(aNode.Attributes["bkcolor"].Value); HC.SetBorderSideByPro(aNode.Attributes["border"].Value, FBorderSides); if ((FRowSpan < 0) || (FColSpan < 0)) { FCellData.Dispose(); //FCellData = null; } else { FCellData.ParseXml(aNode.SelectSingleNode("items") as XmlElement); } }
public virtual void ParseXml(XmlElement aNode) { FWidth = int.Parse(aNode.Attributes["width"].Value); FHeight = int.Parse(aNode.Attributes["height"].Value); FRowSpan = int.Parse(aNode.Attributes["rowspan"].Value); FColSpan = int.Parse(aNode.Attributes["colspan"].Value); FAlignVert = (HCAlignVert)(byte.Parse(aNode.Attributes["vert"].Value)); FBackgroundColor = HC.HCRGBStringToColor(aNode.Attributes["bkcolor"].Value); HC.SetBorderSideByPro(aNode.Attributes["border"].Value, FBorderSides); if ((FRowSpan < 0) || (FColSpan < 0)) { FCellData.Dispose(); FCellData = null; } else { FCellData.Width = FWidth; // // 不准确的赋值,应该减去2个水平padding,加载时使用无大碍 FCellData.ParseXml(aNode.SelectSingleNode("items") as XmlElement); } }