| | |
| | | int nlen = nlist.length(); |
| | | KXMLDOMElement ele; |
| | | |
| | | auto elenode = anode.GetElement(); |
| | | xstring nodeName = elenode.tagName(); |
| | | |
| | | xstring tools =L"<vbox class=''>"; |
| | | if (scene ==L"list") tools +=L"<xspace height='12'/>"; |
| | | if (nodeName == L"hbox")tools = L"<hbox class=''>"; |
| | | |
| | | for (index = 0; index < nlen; index++) |
| | | { |
| | |
| | | |
| | | xstring tool; |
| | | |
| | | if (src !=L"") |
| | | tool =(xstring)L"<xtoolbutton src='" + src +L"' caption='" + label +L"' name='action:" + name +L"' height='23' style='background-color:none #ceecce none #ffffff'/>"; |
| | | if (nodeName == L"hbox") |
| | | { |
| | | if (src != L"") |
| | | tool = (xstring)L"<xtoolbutton src='" + src + L"' caption='" + label + L"' name='action:" + name + L"' width='70' style='font-family:思源黑体 CN Bold;font-size:8pt'/>"; |
| | | else |
| | | tool = (xstring)L"<xtoolbutton image='" + image + L"' caption='" + label + L"' name='action:" + name + L"' width='70' style='font-family:思源黑体 CN Bold;font-size:8pt'/>"; |
| | | } |
| | | else |
| | | tool =(xstring)L"<xtoolbutton image='" + image +L"' caption='" + label +L"' name='action:" + name +L"' height='23' style='background-color:none #ceecce none #ffffff'/>"; |
| | | { |
| | | if (src != L"") |
| | | tool = (xstring)L"<xtoolbutton src='" + src + L"' caption='" + label + L"' name='action:" + name + L"' height='23' style='background-color:none #ceecce none #ffffff'/>"; |
| | | else |
| | | tool = (xstring)L"<xtoolbutton image='" + image + L"' caption='" + label + L"' name='action:" + name + L"' height='23' style='background-color:none #ceecce none #ffffff'/>"; |
| | | } |
| | | tools += tool; |
| | | } |
| | | if (agent) |
| | |
| | | tools += tmp; |
| | | } |
| | | } |
| | | tools +=L"</vbox>"; |
| | | if (nodeName == L"hbox") |
| | | tools += L"</hbox>"; |
| | | else |
| | | tools +=L"</vbox>"; |
| | | SetAgentNode(anode, tools); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | virtual int SetAgent1(xstring scene, xstring EntityID) |
| | | { |
| | | xstring xfNodeAgentArea = L"agentarea"; |
| | | xnode anode = GetAgentNode(xfNodeAgentArea); |
| | | KXMLDOMElement xframeElement = GetElement(); |
| | | KXMLDOMNode agent = xframeElement.selectSingleNode(L"agent/" + xfNodeAgentArea + L"[1]/*"); |
| | | |
| | | KXMLDOMDocument x; |
| | | xaserverarg arg; |
| | | arg.AddArg(L"scene", scene, L"xs:string"); |
| | | arg.AddArg(L"EntityID", EntityID, L"xs:string"); |
| | | arg.AddArg(L"TaskID", GetTaskID(), L"xs:string"); |
| | | arg.AddArg(L"EntityName", GetEntityName(1), L"xs:string"); |
| | | xurl::get(GetServerUrl(), (xstring)L"/workflow/query/datarole/" + GetEntityName(1), arg.GetString(), x); |
| | | //if(x.GetXmlDoc().selectSingleNode("datarole/rightes/right")) |
| | | SetObjectInfo(x.documentElement()); |
| | | xstring sNodes; |
| | | sNodes = (xstring)L"datarole/actions/action[contains(@scene,'" + scene + L"')]"; |
| | | KXMLDOMNodeList nlist = x.selectNodes(sNodes); |
| | | int index; |
| | | int nlen = nlist.length(); |
| | | KXMLDOMElement ele; |
| | | |
| | | xstring tools = L"<vbox class=''>"; |
| | | if (scene == L"list") tools += L"<xspace height='12'/>"; |
| | | |
| | | for (index = 0; index < nlen; index++) |
| | | { |
| | | ele = nlist.item(index); |
| | | xstring name = ele.selectSingleNode(L"@id").text();//.getAttribute("id"); |
| | | xstring label = ele.selectSingleNode(L"@caption").text();//ele.getAttribute("caption"); |
| | | xstring image; |
| | | xstring src = L""; |
| | | if (ele.selectSingleNode(L"@image")) |
| | | image = ele.selectSingleNode(L"@image").text(); |
| | | else |
| | | image = L"0 22"; |
| | | |
| | | if (ele.selectSingleNode(L"@src")) |
| | | src = ele.selectSingleNode(L"@src").text(); |
| | | |
| | | xstring tool; |
| | | |
| | | if (src != L"") |
| | | tool = (xstring)L"<xtoolbutton src='" + src + L"' caption='" + label + L"' name='action:" + name + L"' height='23' style='background-color:none #ceecce none #ffffff'/>"; |
| | | else |
| | | tool = (xstring)L"<xtoolbutton image='" + image + L"' caption='" + label + L"' name='action:" + name + L"' height='23' style='background-color:none #ceecce none #ffffff'/>"; |
| | | tools += tool; |
| | | } |
| | | if (agent) |
| | | { |
| | | nlist = agent.selectNodes(L".//xtoolbutton"); |
| | | nlen = nlist.length(); |
| | | for (index = 0; index < nlen; index++) |
| | | { |
| | | ele = nlist.item(index); |
| | | xstring tmp = ele.xml(); |
| | | tools += tmp; |
| | | } |
| | | } |
| | | tools += L"</vbox>"; |
| | | SetAgentNode(anode, tools); |
| | | |
| | | return 1; |