Пример #1
0
void PrivateChatInput::OnCustomViewOrtherButtonClick(NDUICustomView* customView, unsigned int ortherButtonIndex, int ortherButtonTag)
{
	/*
	if (ortherButtonIndex == 0) 
	{
		//发送
		std::string msg = FilterMessage(this->GetEditText(0));
		std::string localMsg;
		//localMsg.append("【To】");
		//localMsg.append(this->GetEditText(1));
		localMsg.append(NDPlayer::defaultHero().m_name);
		localMsg.append(":");
		//localMsg.append(msg);
		Chat::DefaultChat()->AddMessage(ChatTypeSecret, msg.c_str(), localMsg.c_str());
		SendChatDataToServer(ChatTypeSecret, msg.c_str(), this->GetEditText(1).c_str());				
		Hide();
	}
	else */if (ortherButtonIndex == 0)
	{
		//插入表情
		ShowExpressions();			
	}
	else if (ortherButtonIndex == 1)
	{
		//插入物品
		ShowItems();
	}
	else if (ortherButtonIndex == 2)
	{
		//从好友列表添加
		ShowFriends();		
	}
}
Пример #2
0
BOOL
WelcomePage::OnInitDialog ()
{
  pSheet = reinterpret_cast<RemoveWizard *>(GetParent());
  BOOL ret = CPropertyPage::OnInitDialog();
  try
    {
      CWnd * pWnd = GetDlgItem(IDC_WELCOME);
      if (pWnd == 0)
	{
	  UNEXPECTED_CONDITION ("WelcomePage::OnInitDialog");
	}
      extern CFont fntWelcome;
      pWnd->SetFont (&fntWelcome);
      ShowItems ();
    }
  catch (const MiKTeXException & e)
    {
      pSheet->ReportError (e);
    }
  catch (const exception & e)
    {
      pSheet->ReportError (e);
    }
  return (ret);
}
Пример #3
0
void PublicChatInput::OnCustomViewOrtherButtonClick(NDUICustomView* customView, unsigned int ortherButtonIndex, int ortherButtonTag)
{
	if (ortherButtonIndex == 0) 
	{
		if (m_curChatType == ChatTypeArmy && NDPlayer::defaultHero().getSynRank() == SYNRANK_NONE) 
		{
			ChatRecordManager::DefaultManager()->SetErrorMessage(NDCommonCString("YouHasnotJunTuan"));
		}		
		else if (m_curChatType == ChatTypeQueue && !NDPlayer::defaultHero().isTeamMember()) 
		{
			ChatRecordManager::DefaultManager()->SetErrorMessage(NDCommonCString("YouHasnotJunTeam"));
		}
		else 
		{
			std::string msg = FilterMessage(this->GetEditText(0));	
			std::string speaker = NDPlayer::defaultHero().m_name + ":";
			Chat::DefaultChat()->AddMessage(m_curChatType, msg.c_str(), speaker.c_str());
			SendChatDataToServer(m_curChatType, msg.c_str());				
		}
		//发送		
		Hide();
	}
	else if (ortherButtonIndex == 1)
	{
		//插入表情
		ShowExpressions();			
	}
	else if (ortherButtonIndex == 2)
	{
		//插入物品
		ShowItems();
	}
}
Пример #4
0
void
WelcomePage::OnThoroughly ()
{
  thoroughly = thoroughlyButton.GetCheck ();
  ShowItems ();
}