| | |
| | | { |
| | | return new vindexformex(implPtr,(HWND)hWnd); |
| | | } |
| | | |
| | | string getHomeConfig(string att) |
| | | { |
| | | xml x = new xml; |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | x.Load("cache\\config.xml"); |
| | | //alert(x.GetXml()); |
| | | if (x.GetXml() == "") return ""; |
| | | msxml::IXMLDOMElement e = x.GetXmlDoc().documentElement; |
| | | if (e.selectSingleNode("home")) |
| | | { |
| | | msxml::IXMLDOMElement e1 = e.selectSingleNode("home"); |
| | | if (e1.selectSingleNode("@" + att)) |
| | | return e1.selectSingleNode("@" + att).text; |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | int setHomeConfig(string att, string value) |
| | | { |
| | | xml x = new xml; |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | x.Load("cache\\config.xml"); |
| | | if (x.GetXml() == "") |
| | | { |
| | | //alert("<config><home "+att+"="+value+"/></config>"); |
| | | x.LoadXml("<config><home " + att + "='" + value + "'/></config>"); |
| | | } |
| | | else |
| | | { |
| | | msxml::IXMLDOMElement e = x.GetXmlDoc().documentElement; |
| | | if (e.selectSingleNode("home")) |
| | | { |
| | | msxml::IXMLDOMElement e1 = e.selectSingleNode("home"); |
| | | e1.setAttribute(att, value); |
| | | } |
| | | else |
| | | { |
| | | msxml::IXMLDOMElement e2 = x.GetXmlDoc().createElement("home"); |
| | | e2.setAttribute(att, value); |
| | | e.appendChild(e2); |
| | | } |
| | | //alert(e.xml); |
| | | } |
| | | //alert(x.GetXml()); |
| | | xutil::SaveToFile("cache\\config.xml", x.GetXml(), "", "", ""); |
| | | return 1; |
| | | } |
| | | |
| | | public: |
| | | int OnDWClick(TEvent* evt, int p) |
| | | { |