(XmlElement Node, string NodeName, string Attribute = "Value")
| 109 | } |
| 110 | |
| 111 | public static Color XmlElementToColor(XmlElement Node, string NodeName, string Attribute = "Value") |
| 112 | { |
| 113 | string[] tRectArr = Helper.GetXmlResValue(Node, NodeName, Attribute).Split(','); |
| 114 | |
| 115 | if (tRectArr.Length != 4) |
| 116 | throw new Exception("'" + NodeName + "'属性格式不正确: 请确保为'a,r,g,b'."); |
| 117 | |
| 118 | return Color.FromArgb( |
| 119 | Convert.ToInt32(tRectArr[0]), |
| 120 | Convert.ToInt32(tRectArr[1]), |
| 121 | Convert.ToInt32(tRectArr[2]), |
| 122 | Convert.ToInt32(tRectArr[3]) |
| 123 | ); |
| 124 | } |
| 125 | |
| 126 | public static RectangleF XmlElementToRectangleF(XmlElement Node, string NodeName, string Attribute = "Value") |
| 127 | { |
nothing calls this directly
no test coverage detected