| | |
| | | |
| | | int SetAgent() |
| | | { |
| | | string xfNodeAgentArea = "agentarea"; |
| | | string xfNodeAgentArea = L"agentarea"; |
| | | xnode anode = GetAgentNode(xfNodeAgentArea); |
| | | if(m_agentNode) |
| | | { |
| | |
| | | else |
| | | { |
| | | msxml::IXMLDOMElement xframeElement = GetElement(); |
| | | msxml::IXMLDOMElement agent = xframeElement.selectSingleNode("agent/"+xfNodeAgentArea+"[1]/*"); |
| | | msxml::IXMLDOMElement agent = xframeElement.selectSingleNode(L"agent/"+xfNodeAgentArea+L"[1]/*"); |
| | | if(agent) |
| | | { |
| | | string s = agent.xml; |
| | |
| | | //命令发布函数 |
| | | int OnCmdDispatch(string comdid) |
| | | { |
| | | if(comdid.left(3) == "IK_") |
| | | if(comdid.left(3) == L"IK_") |
| | | { |
| | | string cmd = comdid.mid(3, comdid.length()); |
| | | SendCtrlCmd(GetControl("cell"),cmd); |
| | | SendCtrlCmd(GetControl(L"cell"),cmd); |
| | | return 1; |
| | | } |
| | | else if(comdid=="xmFileOpen") |
| | | else if(comdid==L"xmFileOpen") |
| | | { |
| | | cell.OpenFile(); |
| | | cell.Redraw(); |
| | | return 1; |
| | | } |
| | | else if(comdid=="xmFileSave") |
| | | else if(comdid==L"xmFileSave") |
| | | { |
| | | cell.SaveFile(); |
| | | return 1; |
| | | } |
| | | else if(comdid=="xmFileSaveAs") |
| | | else if(comdid==L"xmFileSaveAs") |
| | | { |
| | | cell.SaveFileAs(); |
| | | return 1; |
| | |
| | | int OnAttachEvent() |
| | | { |
| | | //绑定工具条点击事件 |
| | | AttachEvent("WM_XCOMMAND",OnXCommand); |
| | | AttachEvent(L"WM_XCOMMAND",OnXCommand); |
| | | //获取焦点事件,用于重置工具条 |
| | | AttachEvent("WM_SETFOCUS",OnSetFocus); |
| | | AttachEvent(L"WM_SETFOCUS",OnSetFocus); |
| | | } |
| | | |
| | | int onload() |
| | | { |
| | | cell = GetControl("cell"); |
| | | cell = GetControl(L"cell"); |
| | | SetAgent(); |
| | | |
| | | OnAttachEvent(); |
| | |
| | | if(GetParam()) |
| | | { |
| | | args = GetParam(); |
| | | cell.openUrl("/sale/data/SysPrintTemplate/getdevxsl",args); |
| | | cell.openUrl(L"/sale/data/SysPrintTemplate/getdevxsl",args); |
| | | } |
| | | else |
| | | args =""; |
| | | args =L""; |
| | | |
| | | return 1; |
| | | } |