(string Data)
| 66 | } |
| 67 | |
| 68 | public static RectangleF StringToRectangleF(string Data) |
| 69 | { |
| 70 | string[] tRectArr = Data.Split(','); |
| 71 | |
| 72 | if (tRectArr.Length != 4) |
| 73 | throw new Exception("格式不正确: 请确保为'x1,y1,x2,y2'."); |
| 74 | |
| 75 | return new RectangleF( |
| 76 | Convert.ToSingle(tRectArr[0]), |
| 77 | Convert.ToSingle(tRectArr[1]), |
| 78 | Convert.ToSingle(tRectArr[2]) - Convert.ToSingle(tRectArr[0]), |
| 79 | Convert.ToSingle(tRectArr[3]) - Convert.ToSingle(tRectArr[1]) |
| 80 | ); |
| 81 | } |
| 82 | |
| 83 | public static Color StringToColor(string Data) |
| 84 | { |
nothing calls this directly
no outgoing calls
no test coverage detected