void CChatMember::ToggleIgnore(LPCTSTR pszName) { ADDTOCALLSTACK("CChatMember::ToggleIgnore"); size_t i = FindIgnoringIndex(pszName); if ( i != m_IgnoredMembers.BadIndex() ) { // Remove member from ignore list ASSERT(m_IgnoredMembers.IsValidIndex(i)); m_IgnoredMembers.DeleteAt(i); SendChatMsg(CHATMSG_NoLongerIgnoring, pszName); // Show member name on members list again if ( m_pChannel ) { CChatMember *pMember = m_pChannel->FindMember(pszName); if ( pMember ) m_pChannel->SendMember(pMember, this); } return; } else { // Check if ignore list reached max limit if ( m_IgnoredMembers.GetCount() >= 30 ) { SendChatMsg(CHATMSG_AlreadyIgnoringMax, pszName); return; } // Add member on ignore list CGString *sName = new CGString(pszName); m_IgnoredMembers.Add(sName); SendChatMsg(CHATMSG_NowIgnoring, pszName); // this message will also hide member name on members list } }
void CChatChanMember::ToggleIgnore(LPCTSTR pszName) { ADDTOCALLSTACK("CChatChanMember::ToggleIgnore"); size_t i = FindIgnoringIndex( pszName ); if ( i != m_IgnoredMembers.BadIndex() ) { ASSERT( m_IgnoredMembers.IsValidIndex(i) ); m_IgnoredMembers.DeleteAt(i); SendChatMsg(CHATMSG_NoLongerIgnoring, pszName); // Resend the un ignored member to the client's local list of members (but only if they are currently in the same channel!) if (m_pChannel) { CChatChanMember * pMember = m_pChannel->FindMember(pszName); if (pMember) m_pChannel->SendThisMember(pMember, this); } } else { CGString * name = new CGString(pszName); m_IgnoredMembers.Add( name ); SendChatMsg(CHATMSG_NowIgnoring, pszName); // This message also takes the ignored person off the clients local list of channel members } }
void CChatChanMember::RenameChannel(LPCTSTR pszName) { ADDTOCALLSTACK("CChatChanMember::RenameChannel"); CChatChannel * pChannel = GetChannel(); if (!pChannel) SendChatMsg(CHATMSG_MustBeInAConference); else if (!pChannel->IsModerator(pszName)) SendChatMsg(CHATMSG_MustHaveOps); else pChannel->RenameChannel(this, pszName); }
unsigned CChatRoomDlg::ActionPerformed( CActionEvent* e ) { assert( e ); if( e == NULL ) return 0; switch( e->GetID() ) { case WM_KEYDOWN: { if( e->GetWParam() == VK_RETURN ) { CWinCtrl* pCtrl = e->GetSource(); assert( pCtrl ); if( pCtrl && pCtrl->IsFocus() && pCtrl->GetControlID() == IID_CHAT_EDIT ) { SendChatMsg(); return pCtrl->GetControlID(); } } } break; default: break; } return 0; }
void CChatChanMember::DontIgnore(LPCTSTR pszName) { ADDTOCALLSTACK("CChatChanMember::DontIgnore"); if (IsIgnoring(pszName)) ToggleIgnore(pszName); else SendChatMsg(CHATMSG_NotIgnoring, pszName); }
void CChatChanMember::Ignore(LPCTSTR pszName) { ADDTOCALLSTACK("CChatChanMember::Ignore"); if (!IsIgnoring(pszName)) ToggleIgnore(pszName); else SendChatMsg(CHATMSG_AlreadyIgnoringPlayer, pszName); }
void CChatChanMember::PermitWhoIs() { ADDTOCALLSTACK("CChatChanMember::PermitWhoIs"); if (GetWhoIs()) return; SetWhoIs(true); SendChatMsg(CHATMSG_ShowingName); }
void CChatMember::ClearIgnoreList() { ADDTOCALLSTACK("CChatMember::ClearIgnoreList"); for ( size_t i = 0; i < m_IgnoredMembers.GetCount(); i++ ) m_IgnoredMembers.DeleteAt(i); SendChatMsg(CHATMSG_NoLongerIgnoringAnyone); }
void CChatMember::RemoveIgnore(LPCTSTR pszName) { ADDTOCALLSTACK("CChatMember::RemoveIgnore"); if ( !IsIgnoring(pszName) ) SendChatMsg(CHATMSG_NotIgnoring, pszName); else ToggleIgnore(pszName); }
void CChatChanMember::ForbidWhoIs() { ADDTOCALLSTACK("CChatChanMember::ForbidWhoIs"); if (!GetWhoIs()) return; SetWhoIs(false); SendChatMsg(CHATMSG_NotShowingName); }
LRESULT CChatDlg::OnHotKey( WPARAM wParam,LPARAM lParam ) { if (nHotkey == wParam) { SendChatMsg(); //如果按下了 Ctrl + Enter , 则发送当前的消息 } return 0; }
void CChatMember::ShowCharacterName() { ADDTOCALLSTACK("CChatMember::ShowCharacterName"); if ( m_bAllowWhoIs ) return; m_bAllowWhoIs = true; SendChatMsg(CHATMSG_ShowingName); }
Widget* TalkBox::ClickUp(const Point2i &mousePosition, uint button) { Widget* w = VBox::ClickUp(mousePosition, button); if (w == send_txt_bt) { SendChatMsg(); return this; } return w; }
void CChatMember::HideCharacterName() { ADDTOCALLSTACK("CChatMember::HideCharacterName"); if ( !m_bAllowWhoIs ) return; m_bAllowWhoIs = false; SendChatMsg(CHATMSG_NoLongerShowingName); }
void SendPlayerTurn() { recv_turn = 0x00; while(recv_turn != 0x01) { SendChatMsg(MpGV, "player_turn"); Sleep(800); if(recv_turn == 0x01) break; Sleep(800); } counter_time_shot = COUNTER_TIME_SHOT; }
bool TalkBox::SendKey(SDL_keysym key) { bool r = false; switch (key.sym) { case SDLK_RETURN: case SDLK_KP_ENTER: SendChatMsg(); r = true; break; default: if (send_txt_bt->HasFocus()) { r = send_txt_bt->SendKey(key); } break; } return r; }
void CSDKMeetingChatUIMgr::DoPressEnterKey() { std::wstring chat_info; if (m_input_content) { chat_info = std::wstring(m_input_content->GetText().GetData()); m_input_content->SetText(L""); } unsigned int user_id = 0; if (m_pUserList && m_pUserListCombox) { CControlUI* pCurrentSelect = m_pUserListCombox->GetItemAt(m_pUserListCombox->GetCurSel()); LPCTSTR user_name = pCurrentSelect->GetText().GetData(); ZOOM_SDK_NAMESPACE::IUserInfo* pUserInfo = m_pUserList->GetUserByName(user_name); if (pUserInfo) { user_id = pUserInfo->GetUserID(); } } std::wstring show_info; if (SendChatMsg(user_id, const_cast<wchar_t* >(chat_info.c_str()))) { if (user_id == 0) { show_info = std::wstring(L"From Me send to Everyone:\n")+chat_info+L"\n"; } else { ZOOM_SDK_NAMESPACE::IUserInfo* pUserInfo = m_pUserList->GetUserByID(user_id); if (pUserInfo) { show_info = std::wstring(L"From Me send to ") +std::wstring(pUserInfo->GetUserName())+L":\n"+chat_info+L"\n"; } } if (m_show_chat_info) { m_show_chat_info->AppendText(show_info.c_str()); } } }
void CChatChanMember::ToggleWhoIs() { ADDTOCALLSTACK("CChatChanMember::ToggleWhoIs"); SetWhoIs(!GetWhoIs()); SendChatMsg((GetWhoIs() == true) ? CHATMSG_ShowingName : CHATMSG_NotShowingName); }
void CChatMember::ToggleCharacterName() { ADDTOCALLSTACK("CChatMember::ToggleCharacterName"); m_bAllowWhoIs = !m_bAllowWhoIs; SendChatMsg(m_bAllowWhoIs ? CHATMSG_ShowingName : CHATMSG_NoLongerShowingName); }
void CChatDlg::OnBnClickedBtnSendMsg() { // TODO: 在此添加控件通知处理程序代码 SendChatMsg(); //发送消息 }
void CChatMember::ToggleReceiving() { ADDTOCALLSTACK("CChatMember::ToggleReceiving"); m_bReceiving = !m_bReceiving; SendChatMsg(m_bReceiving ? CHATMSG_ReceivingPrivateMessages : CHATMSG_NoLongerReceivingPrivateMessages); }