| | |
| | | |
| | | #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp" |
| | | #include "viewobject/view.base.hpp" |
| | | #include "xcontrol/xshtml.hpp" |
| | | |
| | | using xml = KXMLDOMDocument; |
| | | class __declspec(dllexport) BugListWin : public xframe |
| | |
| | | xstring m_EntityID; |
| | | xstring m_EntityType; |
| | | |
| | | htmlctrl m_Html; |
| | | xshtml m_Html; |
| | | xcontrol m_Edit; |
| | | xcombobox m_cb; |
| | | public: |
| | | BugListWin(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {} |
| | | BugListWin(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd),m_Edit(nullptr) {} |
| | | public: |
| | | static BugListWin* CreateInstance(void* implPtr, void* hWnd) |
| | | { |
| | |
| | | return 1; |
| | | } |
| | | |
| | | static stdcall int GetModuleFileName(int hModule, xstring lpFileName, int nSize) native from "kernel32.dll" alias "GetModuleFileNameW"; |
| | | static stdcall int PathRemoveFileSpec(xstring lpFileName) native from "shlwapi.dll" alias "PathRemoveFileSpecW"; |
| | | //static stdcall int GetModuleFileName(int hModule, xstring lpFileName, int nSize) native from "kernel32.dll" alias "GetModuleFileNameW"; |
| | | //static stdcall int PathRemoveFileSpec(xstring lpFileName) native from "shlwapi.dll" alias "PathRemoveFileSpecW"; |
| | | |
| | | xstring GetModulePath() |
| | | { |
| | | xstring str = L""; |
| | | str = str.space(255); |
| | | //xstring str = L""; |
| | | //str = str.space(255); |
| | | wchar_t str[255]; |
| | | GetModuleFileName(0, str, 250); |
| | | PathRemoveFileSpec(str); |
| | | return str; |
| | |
| | | |
| | | xstring GetModuleTmpPath() |
| | | { |
| | | xstring str = L""; |
| | | str = str.space(255); |
| | | //xstring str = L""; |
| | | //str = str.space(255); |
| | | wchar_t str[255]; |
| | | GetModuleFileName(0, str, 250); |
| | | PathRemoveFileSpec(str); |
| | | xstring tmp = str + L"\\Temp"; |
| | | xstring tmp = (xstring)str + L"\\Temp"; |
| | | xaserver::CreateDirectory(tmp); |
| | | return tmp; |
| | | } |
| | |
| | | return 1; |
| | | } |
| | | |
| | | int OnHtmlClick(TEvent* evt, int p) |
| | | int OnHtmlClick(TEvent* evt, LPARAM p) |
| | | { |
| | | ref HTMLNMHDR p = evt.pnmh; |
| | | #if 0 |
| | | HTMLNMHDR& p = *(HTMLNMHDR*)evt->notify.pnmh; |
| | | const xstring d = m_Html.GetData(p.object); |
| | | if (d == L"") return -1; |
| | | xstring file = d.mid(0, d.find(L"|##@@|", 0)); |
| | |
| | | alert(L"文件打开失败2!"); |
| | | return -1; |
| | | } |
| | | |
| | | #endif |
| | | return -1; |
| | | } |
| | | |
| | | int AppendItem(xml x, KXMLDOMElement r, xstring name, xstring value) |
| | | { |
| | | KXMLDOMElement e = x.createElement(name); |
| | | e.text() = value; |
| | | e.settext(value); |
| | | r.appendChild(e); |
| | | return 1; |
| | | } |