示例#1
0
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
	}
}
示例#2
0
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
	}
}
示例#3
0
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;
}
示例#5
0
void CChatChanMember::DontIgnore(LPCTSTR pszName)
{
	ADDTOCALLSTACK("CChatChanMember::DontIgnore");
	if (IsIgnoring(pszName))
		ToggleIgnore(pszName);
	else
		SendChatMsg(CHATMSG_NotIgnoring, pszName);
}
示例#6
0
void CChatChanMember::Ignore(LPCTSTR pszName)
{
	ADDTOCALLSTACK("CChatChanMember::Ignore");
	if (!IsIgnoring(pszName))
		ToggleIgnore(pszName);
	else
		SendChatMsg(CHATMSG_AlreadyIgnoringPlayer, pszName);
}
示例#7
0
void CChatChanMember::PermitWhoIs()
{
	ADDTOCALLSTACK("CChatChanMember::PermitWhoIs");
	if (GetWhoIs())
		return;
	SetWhoIs(true);
	SendChatMsg(CHATMSG_ShowingName);
}
示例#8
0
void CChatMember::ClearIgnoreList()
{
	ADDTOCALLSTACK("CChatMember::ClearIgnoreList");
	for ( size_t i = 0; i < m_IgnoredMembers.GetCount(); i++ )
		m_IgnoredMembers.DeleteAt(i);

	SendChatMsg(CHATMSG_NoLongerIgnoringAnyone);
}
示例#9
0
void CChatMember::RemoveIgnore(LPCTSTR pszName)
{
	ADDTOCALLSTACK("CChatMember::RemoveIgnore");
	if ( !IsIgnoring(pszName) )
		SendChatMsg(CHATMSG_NotIgnoring, pszName);
	else
		ToggleIgnore(pszName);
}
示例#10
0
void CChatChanMember::ForbidWhoIs()
{
	ADDTOCALLSTACK("CChatChanMember::ForbidWhoIs");
	if (!GetWhoIs())
		return;
	SetWhoIs(false);
	SendChatMsg(CHATMSG_NotShowingName);
}
示例#11
0
LRESULT CChatDlg::OnHotKey( WPARAM wParam,LPARAM lParam )
{
	if (nHotkey == wParam)
	{
		SendChatMsg();   //如果按下了 Ctrl + Enter , 则发送当前的消息
	}
	return 0;
}
示例#12
0
void CChatMember::ShowCharacterName()
{
	ADDTOCALLSTACK("CChatMember::ShowCharacterName");
	if ( m_bAllowWhoIs )
		return;

	m_bAllowWhoIs = true;
	SendChatMsg(CHATMSG_ShowingName);
}
示例#13
0
Widget* TalkBox::ClickUp(const Point2i &mousePosition, uint button)
{
  Widget* w = VBox::ClickUp(mousePosition, button);
  if (w == send_txt_bt) {
    SendChatMsg();
    return this;
  }
  return w;
}
示例#14
0
void CChatMember::HideCharacterName()
{
	ADDTOCALLSTACK("CChatMember::HideCharacterName");
	if ( !m_bAllowWhoIs )
		return;

	m_bAllowWhoIs = false;
	SendChatMsg(CHATMSG_NoLongerShowingName);
}
示例#15
0
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;
}
示例#16
0
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;
}
示例#17
0
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());
		}
	}
}
示例#18
0
void CChatChanMember::ToggleWhoIs()
{
	ADDTOCALLSTACK("CChatChanMember::ToggleWhoIs");
	SetWhoIs(!GetWhoIs());
	SendChatMsg((GetWhoIs() == true) ? CHATMSG_ShowingName : CHATMSG_NotShowingName);
}
示例#19
0
void CChatMember::ToggleCharacterName()
{
	ADDTOCALLSTACK("CChatMember::ToggleCharacterName");
	m_bAllowWhoIs = !m_bAllowWhoIs;
	SendChatMsg(m_bAllowWhoIs ? CHATMSG_ShowingName : CHATMSG_NoLongerShowingName);
}
示例#20
0
void CChatDlg::OnBnClickedBtnSendMsg()
{
	// TODO: 在此添加控件通知处理程序代码
	SendChatMsg();  //发送消息
}
示例#21
0
void CChatMember::ToggleReceiving()
{
	ADDTOCALLSTACK("CChatMember::ToggleReceiving");
	m_bReceiving = !m_bReceiving;
	SendChatMsg(m_bReceiving ? CHATMSG_ReceivingPrivateMessages : CHATMSG_NoLongerReceivingPrivateMessages);
}