private void AddContext() { string strAddContext = uiWordDesc.GetContext(); AddWordVO addWordVO = new AddWordVO(curWordVO.Spell, strAddContext); SendNotification(EventEnum.COMMAND_ADD_WORD, addWordVO); }
public override void Execute(INotification notification) { AddWordVO addWordVO = notification.Body as AddWordVO; BookMgr bookMgr = Facade.RetrieveProxy(ProxyEnum.BOOK_MGR) as BookMgr; bookMgr.AddWord(addWordVO.BookName, addWordVO.Spell, addWordVO.Context); SendNotification(EventEnum.COMMAND_WORD_ADDED, addWordVO); }
public override void HandleNotification(INotification notification) { switch (notification.Name) { case EventEnum.COMMAND_WORD_ADDED: { AddWordVO addWordVO = notification.Body as AddWordVO; if (curWordVO != null && addWordVO.Spell == curWordVO.Spell) { ShowWorld(curWordVO.Spell); uiWordDesc.CleanSearchWord(); uiWordDesc.CleanContext(); } } break; default: base.HandleNotification(notification); break; } }