MCPcopy Create free account
hub / github.com/cinience/RedisStudio / OnMenuWakeup

Method OnMenuWakeup

RedisStudio/RedisDataUI.cpp:247–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247void 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
277void RedisDataUI::OnItemActiveForTree( TNotifyUI &msg )
278{

Callers

nothing calls this directly

Calls 5

MakeDelegateFunction · 0.85
GetParentNodeMethod · 0.80
IsHasChildMethod · 0.80
GetLengthMethod · 0.45
InitMethod · 0.45

Tested by

no test coverage detected