| | |
| | | class __declspec(dllexport) vindexform: public xwin |
| | | { |
| | | public: |
| | | string m_Assignment; |
| | | xstring m_Assignment; |
| | | HWND m_hMenu; |
| | | xlayersheet mainsheet; |
| | | xcombobox cbx_menu; |
| | | xcombobox cbx_panelName; |
| | | xcombobox cbx_panelNo; |
| | | xcombobox cbx_tab; |
| | | xcombobox cbx_menu; //页签数组 |
| | | xcombobox cbx_panelName; //页签顺序数组 |
| | | xcombobox cbx_panelNo; //页签数组 |
| | | xcombobox cbx_tab; //页签顺序数组 |
| | | |
| | | |
| | | xcombobox memuId; //页签数组 |
| | | xcombobox tabNo; //页签顺序数组 |
| | | xcombobox panelNo; //页签数组 |
| | | xcombobox panelName; //页签顺序数组 |
| | | |
| | | HWND m_npHwnd; //菜单树窗口句柄 |
| | | HWND m_nHwnd; //菜单树窗口句柄 |
| | | int m_cursheet; //当前页签 |
| | |
| | | else |
| | | { |
| | | KXMLDOMElement e = x.documentElement(); |
| | | if (e.selectSingleNode(L"home")) |
| | | if (e) |
| | | { |
| | | KXMLDOMElement e1 = e.selectSingleNode(L"home"); |
| | | e1.setAttribute(att, value); |
| | | } |
| | | else |
| | | { |
| | | KXMLDOMElement e2 = x.createElement(L"home"); |
| | | e2.setAttribute(att, value); |
| | | e.appendChild(e2); |
| | | if (e.selectSingleNode(L"home")) |
| | | { |
| | | KXMLDOMElement e1 = e.selectSingleNode(L"home"); |
| | | e1.setAttribute(att, value); |
| | | } |
| | | else |
| | | { |
| | | KXMLDOMElement e2 = x.createElement(L"home"); |
| | | e2.setAttribute(att, value); |
| | | e.appendChild(e2); |
| | | } |
| | | } |
| | | //alert(e.xml); |
| | | } |
| | |
| | | xaserverarg* arg = new xaserverarg(); |
| | | HWND hWnd = GetHWND(); |
| | | arg->SetParam(L"hwnd", (LPARAM)hWnd); |
| | | arg->SetParam(L"memuId", (LPARAM)cbx_menu.getNativePointer()); |
| | | arg->SetParam(L"tabNo", (LPARAM)cbx_tab.getNativePointer()); |
| | | arg->SetParam(L"panelNo", (LPARAM)cbx_panelNo.getNativePointer()); |
| | | arg->SetParam(L"panelName", (LPARAM)cbx_panelName.getNativePointer()); |
| | | arg->SetParam(L"cbx_menu", (LPARAM)cbx_menu.getNativePointer()); |
| | | arg->SetParam(L"cbx_tab", (LPARAM)cbx_tab.getNativePointer()); |
| | | arg->SetParam(L"cbx_panelNo", (LPARAM)cbx_panelNo.getNativePointer()); |
| | | arg->SetParam(L"cbx_panelName", (LPARAM)cbx_panelName.getNativePointer()); |
| | | xwin* pwin = OpenWindow(L"dev:xpage[vindexmenu.vx]", (LPARAM)arg); |
| | | m_hMenu = pwin->GetHWND(); |
| | | hw = m_hMenu; |
| | |
| | | xaserverarg* arg = new xaserverarg(); |
| | | HWND hWnd = GetHWND(); |
| | | arg->SetParam(L"hwnd", (LPARAM)hWnd); |
| | | arg->SetParam(L"memuId", (LPARAM)cbx_menu.getNativePointer()); |
| | | arg->SetParam(L"tabNo", (LPARAM)cbx_tab.getNativePointer()); |
| | | arg->SetParam(L"cbx_menu", (LPARAM)cbx_menu.getNativePointer()); |
| | | arg->SetParam(L"cbx_tab", (LPARAM)cbx_tab.getNativePointer()); |
| | | arg->SetParam(L"panelNo", (LPARAM)cbx_panelNo.getNativePointer()); |
| | | arg->SetParam(L"panelName", (LPARAM)cbx_panelName.getNativePointer()); |
| | | xwin* pwin=OpenWindow(L"dev:xpage[vindexmenu.vx]", (LPARAM)arg); |
| | |
| | | OnMenu(NULL); |
| | | } |
| | | menuShow = -1 - isshow; |
| | | xcombobox::SetCurSel(memuId.GetHWND(), menuShow); |
| | | cbx_menu.SetCurSel(menuShow); |
| | | if (f != L"") |
| | | setHomeConfig(L"menuposition", xstring(menuShow)); |
| | | return 1; |
| | |
| | | int ReSetInfo() |
| | | { |
| | | |
| | | memuId.ResetContent(); |
| | | tabNo.ResetContent(); |
| | | panelNo.ResetContent(); |
| | | panelName.ResetContent(); |
| | | cbx_menu.ResetContent(); |
| | | cbx_tab.ResetContent(); |
| | | cbx_panelNo.ResetContent(); |
| | | cbx_panelName.ResetContent(); |
| | | |
| | | int hItem = mainsheet.GetSheetCount(); |
| | | while (hItem > 1) |
| | |
| | | if (m_Assignment == L"") |
| | | alert(L"获取用户数据失败,请重新登录!"); |
| | | else |
| | | xaserver::SetUID((LPWSTR)m_Assignment); |
| | | xaserver::SetUID((LPWSTR)m_Assignment.c_str()); |
| | | |
| | | xcombobox::AddItem(memuId.GetHWND(), L"开始"); |
| | | xcombobox::AddItem(tabNo.GetHWND(), L"-1"); |
| | | xcombobox::AddItem(cbx_menu.GetHWND(), L"开始"); |
| | | xcombobox::AddItem(cbx_tab.GetHWND(), L"-1"); |
| | | //OpenWindow(L"dev:xpage[vstart.vx]"); |
| | | xcontrol xc = GetControl(L"statusbar0"); |
| | | xc.SetText(L"正在初始化系统,请稍候...."); |
| | |
| | | int MF_CHECKED = 0x8; |
| | | |
| | | int k = mainsheet.GetSheetIndex(); |
| | | //int cs = xcombobox::GetCount(memuId.GetId()); |
| | | //int cs = xcombobox::GetCount(cbx_menu.GetId()); |
| | | int cs = mainsheet.GetSheetCount(); |
| | | int i; |
| | | for (i = 0; i < cs; i++) { |
| | | //string str = xcombobox::GetLBText(memuId.GetId(), i); |
| | | //string str = xcombobox::GetLBText(cbx_menu.GetId(), i); |
| | | xstring str = mainsheet.GetSheetText(i); |
| | | if (i == k) |
| | | AppendMenu(m, MF_STRING | MF_CHECKED, i + 1, str); |
| | |
| | | int sheet = nmtv.nSheet; |
| | | int s = mainsheet.GetSheetCount(); |
| | | //trace(s); |
| | | int cs = xcombobox::GetCount(memuId.GetHWND()); |
| | | int cs = xcombobox::GetCount(cbx_menu.GetHWND()); |
| | | int cursheet = m_cursheet; |
| | | |
| | | if (s > cs) { |
| | | xcombobox::AddItem(memuId.GetHWND(), L"自由窗口"); |
| | | xcombobox::AddItem(tabNo.GetHWND(), xstring(cursheet)); |
| | | xcombobox::AddItem(cbx_menu.GetHWND(), L"自由窗口"); |
| | | xcombobox::AddItem(cbx_tab.GetHWND(), xstring(cursheet)); |
| | | } |
| | | if (s < cs) { |
| | | xcombobox::DeleteItem(memuId.GetHWND(), cursheet); |
| | | xcombobox::DeleteItem(cbx_menu.GetHWND(), cursheet); |
| | | int i = 0; |
| | | xstring value = xcombobox::GetLBText(tabNo.GetHWND(), cursheet); |
| | | xstring value = xcombobox::GetLBText(cbx_tab.GetHWND(), cursheet); |
| | | for (i = 0; i < cs; i++) |
| | | { |
| | | xstring tabId = xcombobox::GetLBText(tabNo.GetHWND(), i); |
| | | xstring tabId = xcombobox::GetLBText(cbx_tab.GetHWND(), i); |
| | | if (tabId == xstring(cursheet)) |
| | | { |
| | | xcombobox::DeleteItem(tabNo.GetHWND(), i); |
| | | xcombobox::InsertString(tabNo.GetHWND(), i, value); |
| | | xcombobox::DeleteItem(cbx_tab.GetHWND(), i); |
| | | xcombobox::InsertString(cbx_tab.GetHWND(), i, value); |
| | | } |
| | | } |
| | | xcombobox::DeleteItem(tabNo.GetHWND(), cursheet); |
| | | xcombobox::DeleteItem(cbx_tab.GetHWND(), cursheet); |
| | | if (sheet != value.toInt()) |
| | | mainsheet.SelectSheet(value.toInt()); |
| | | } |
| | |
| | | if((xstring)m_Assignment == L"") |
| | | alert(L"获取用户数据失败,请重新登录!"); |
| | | else |
| | | xaserver::SetUID((LPWSTR)m_Assignment); |
| | | xaserver::SetUID((LPWSTR)m_Assignment.c_str()); |
| | | return 1; |
| | | } |
| | | |