| 245 | } |
| 246 | |
| 247 | void RedisDataUI::OnMenuWakeup( TNotifyUI &msg ) |
| 248 | { |
| 249 | CTreeNodeUI* pTreeNodeUI = dynamic_cast<CTreeNodeUI*> (msg.pSender); |
| 250 | if (!pTreeNodeUI) return; |
| 251 | |
| 252 | bool needMenu = false; |
| 253 | STRINGorID res(_T("")); |
| 254 | /// 父节点 |
| 255 | if (pTreeNodeUI->GetParentNode() == m_pRootNode) |
| 256 | { |
| 257 | STRINGorID xml(_T("DBOperatorMenu.xml")); |
| 258 | res = xml; |
| 259 | } |
| 260 | else if (!pTreeNodeUI->IsHasChild()) |
| 261 | { |
| 262 | STRINGorID xml(_T("KeyOperatorMenu.xml")); |
| 263 | res = xml; |
| 264 | } |
| 265 | CDuiString resStr = res.m_lpstr; |
| 266 | m_pAssistNode = pTreeNodeUI; |
| 267 | if (resStr.GetLength()) |
| 268 | { |
| 269 | CMenuWnd* pMenu = new CMenuWnd(GetHWND()); |
| 270 | pMenu->OnClick += MakeDelegate(this, &RedisDataUI::OnMenuClick); |
| 271 | CPoint point = msg.ptMouse; |
| 272 | ClientToScreen(GetHWND(), &point); |
| 273 | pMenu->Init(NULL, res, _T("xml"), point); |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | void RedisDataUI::OnItemActiveForTree( TNotifyUI &msg ) |
| 278 | { |
nothing calls this directly
no test coverage detected