コード例 #1
0
void TeamService::UIGetLocalTeamInfoCb(const std::string& tid, const nim::TeamInfo& result)
{
	assert(nbase::MessageLoop::current()->ToUIMessageLoop());

	if (!result.GetName().empty())
	{
		tid_tname_pair_[tid] = result.GetName();

		InvokeChangeTeamName(result);
	}

	tid_type_pair_[tid] = result.GetType();

	on_query_tids_.erase(tid); //已经查到,从post_tids_中删除
}
コード例 #2
0
void SessionForm::OnTeamNameChange(const nim::TeamInfo& team_info)
{
	if (session_id_ == team_info.GetTeamID())
	{
		std::wstring name = nbase::UTF8ToUTF16(team_info.GetName());

		SetTaskbarTitle(name);
		label_title_->SetText(name);
	}
}
コード例 #3
0
ファイル: custom_msg.cpp プロジェクト: netease-im/NIM_PC_Demo
void CustomMsgBubble::OnTeamNameChange(const nim::TeamInfo & team_info)
{
	if (team_info.GetTeamID() == receiver_id_ && session_type_ == nim::kNIMSessionTypeTeam)
	{
		std::wstring team_sender = name_->GetText();
		size_t pos = team_sender.find(L"->");
		if (pos != std::wstring::npos)
			name_->SetText(nbase::UTF8ToUTF16(team_info.GetName()) + team_sender.substr(pos));
	}
}
コード例 #4
0
void SessionList::OnTeamNameChange(const nim::TeamInfo& team_info)
{
	SessionItem* item = (SessionItem*)session_list_->FindSubControl(nbase::UTF8ToUTF16(team_info.GetTeamID()));
	if (item)
		((Label*)item->FindSubControl(L"label_name"))->SetUTF8Text(team_info.GetName());
}