VB处理一个文本,求思路
有如下一个文本文件,我只关心color下面的那些。想写一个程序,读入这个文本,然后可以显示每个关键字对应的颜色和RGB值,如polygon->day->background,
然后在它右边写一个按钮,点击按钮可以屏幕取色,将取到的颜色替代目前的颜色值
最后保存文件。
先问下用什么方法可以比较方便做到?
程序代码:
{ "vesion": "2.0", "enableDirectionalRoadLabel": 1, "roadWidth": { "highway": [24, 20, 18, 16, 14, 12, 10, 8, 6, 4, 1, 1], "expWay": [20, 18, 16, 12, 10, 8, 6, 4, 3, 1, 1, 1], "arterial": [20, 18, 16, 12, 10, 8, 6, 4, 3, 1, 1, 1], "localMajor": [18, 14, 14, 8, 6, 3, 1, 1, 1, 1, 1, 1], "local": [12, 8, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1] }, "color": { "buildingAndTmcEdge": { "day": { "building" : "c5c1c1", "tmc" : "ffffff" }, "night": { "building" : "324f64", "tmc" : "ffffff" } }, "polygon": { "day": { "background" : "FFFFCE", "fourColorOne" : "FFDAB4", "community" : "FFDAB4", "onground" : "FFDAB4", "fourColorTwo" : "FFDAB4", "fourColorThree": "FFDAB4", "school" : "F7DB9C", "fourColorFour" : "FFDAB4", "hospital" : "F7DB9C", "greenArea" : "7BCB6B", "water" : "52AEEF", "closedArea" : "FFDAB4", "underground" : "FFDAB4", "park" : "FFDAB4", "building" : "FAF9F5", "subwayStation" : "F89F7C" }, "night": { "background" : "081C29", "fourColorOne" : "FFDAB4", "community" : "FFDAB4", "onground" : "FFDAB4", "fourColorTwo" : "FFDAB4", "fourColorThree": "FFDAB4", "school" : "183039", "fourColorFour" : "FFDAB4", "hospital" : "183039", "greenArea" : "213818", "water" : "004D6B", "closedArea" : "FFDAB4", "underground" : "FFDAB4", "park" : "FFDAB4", "building" : "324f64", "subwayStation" : "f89f7c" } },