¶Ô±ÈÐÂÎļþ |
| | |
| | | #include <wobject/xstring.hpp> |
| | | #include <xcontrol/xtreeview.hpp> |
| | | #include <xcontrol/xdwgrid.hpp> |
| | | #include <wobject/xdouble.hpp> |
| | | #include <xcontrol/xlayersheet.hpp> |
| | | |
| | | #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp" |
| | | #include "viewobject/view.base.hpp" |
| | | |
| | | using xml = KXMLDOMDocument; |
| | | class __declspec(dllexport) AddUomGroup : public xwin |
| | | { |
| | | |
| | | public: |
| | | AddUomGroup(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {} |
| | | public: |
| | | static AddUomGroup* CreateInstance(void* implPtr, void* hWnd) |
| | | { |
| | | AddUomGroup* pWin = new AddUomGroup(implPtr, (HWND)hWnd); |
| | | return pWin; |
| | | } |
| | | |
| | | |
| | | int SetAgent() |
| | | { |
| | | return 1; |
| | | } |
| | | //ç¦ç¹æ¿æ´»å¤ç彿° |
| | | int OnSetFocus(TEvent* evt, LPARAM p) |
| | | { |
| | | int SetAgent(); |
| | | |
| | | //é置工å
·æ¡ |
| | | return 1; |
| | | } |
| | | |
| | | //å½ä»¤åå¸å½æ° |
| | | int OnCmdDispatch(xstring comdid) |
| | | { |
| | | if (comdid == L"cb_cancel") |
| | | CloseWindow(); |
| | | else if (comdid == L"cb_ok") |
| | | { |
| | | control xc = new control; |
| | | xc.setNativePointer(GetControl(L"Txt")); |
| | | xstring name = xc.GetText(); |
| | | xaserverarg arg; |
| | | |
| | | arg = GetArg(); |
| | | arg.AddArg(L"GroupName", name); |
| | | arg.AddArg(L"return", L"ok"); |
| | | CloseWindow(); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | //å½ä»¤å¤çäºä»¶ |
| | | int OnXCommand(TEvent* evt, LPARAM param) |
| | | { |
| | | return OnCmdDispatch(evt->xcommand.pStrID); |
| | | } |
| | | |
| | | int OnAttachEvent() |
| | | { |
| | | //ç»å®å·¥å
·æ¡ç¹å»äºä»¶ |
| | | AttachEvent(L"WM_XCOMMAND", (FEvent)&AddUomGroup::OnXCommand); |
| | | //è·åç¦ç¹äºä»¶ï¼ç¨äºé置工å
·æ¡ |
| | | AttachEvent(L"WM_SETFOCUS", (FEvent)&AddUomGroup::OnSetFocus); |
| | | return 1; |
| | | } |
| | | |
| | | int OnInitial() |
| | | { |
| | | SetAgent(); |
| | | |
| | | OnAttachEvent(); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | |
| | | int onload() |
| | | { |
| | | SetArg(); |
| | | OnInitial(); |
| | | |
| | | |
| | | |
| | | if (GetWinParam()) |
| | | { |
| | | xaserverarg arg; |
| | | |
| | | arg = GetArg(); |
| | | xstring note = arg.GetArgString(L"note"); |
| | | if (note == L"ä¿®æ¹") |
| | | { |
| | | xstring name = arg.GetArgString(L"GroupName"); |
| | | control xc = new control; |
| | | xc.setNativePointer(GetControl(L"Txt")); |
| | | xc.SetText(name); |
| | | } |
| | | xstring id = arg.GetArgString(L"m_id"); |
| | | if (id == L"FND_UOM") |
| | | { |
| | | SetWindowText(GetHWND(), L"计éåä½"); |
| | | } |
| | | else if (id == L"FND_CustomerSource") |
| | | { |
| | | SetWindowText(GetHWND(), L"å®¢æ·æ¥æº"); |
| | | } |
| | | else if (id == L"FND_AuxiliaryAttribute") |
| | | { |
| | | SetWindowText(GetHWND(), L"è¾
å©å±æ§"); |
| | | } |
| | | } |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | }; |