(XmlElement Node, string NodeName, string Attribute = "Value")
| 124 | } |
| 125 | |
| 126 | public static RectangleF XmlElementToRectangleF(XmlElement Node, string NodeName, string Attribute = "Value") |
| 127 | { |
| 128 | string[] tRectArr = Helper.GetXmlResValue(Node, NodeName, Attribute).Split(','); |
| 129 | |
| 130 | if (tRectArr.Length != 4) |
| 131 | throw new Exception("'" + NodeName + "'属性格式不正确: 请确保为'x1,y1,x2,y2'."); |
| 132 | |
| 133 | return new RectangleF( |
| 134 | Convert.ToSingle(tRectArr[0]), |
| 135 | Convert.ToSingle(tRectArr[1]), |
| 136 | Convert.ToSingle(tRectArr[2]) - Convert.ToSingle(tRectArr[0]), |
| 137 | Convert.ToSingle(tRectArr[3]) - Convert.ToSingle(tRectArr[1]) |
| 138 | ); |
| 139 | } |
| 140 | |
| 141 | public static void WriteFSTGXmlType(XmlDocument XmlDoc, string TargetFile) |
| 142 | { |
nothing calls this directly
no test coverage detected