void MyFrame::OnShowAnswer(wxCommandEvent& WXUNUSED(event)) { if(m_keyword->IsShown()) { HideAnswer(); } else { ShowAnswer(); } }
//--------------------------------------------------------------------------- void __fastcall TQuizForm::Answer1Click(TObject *Sender) { auto& state = questions[FCurrentQuestion - 1].state; bool Correct = state->capital == static_cast<TButton*>(Sender)->Text; if (Correct) { ++FCorrectAnswers; } ShowAnswer(this, Correct, state->name, state->capital); ++FCurrentQuestion; }
void IrcServerHandler::IncomingNoticeMessage (const QString& nick, const QString& msg) { ShowAnswer ("NOTICE", msg); QList<NickServIdentify> list = Core::Instance () .GetNickServIdentifyWithMainParams (ServerOptions_.ServerName_, GetNickName (), nick); if (list.isEmpty ()) return; Q_FOREACH (const NickServIdentify& nsi, list) { QRegExp authRegExp (nsi.AuthString_, Qt::CaseInsensitive, QRegExp::Wildcard); if (authRegExp.indexIn (msg) == -1) continue; SendMessage2Server (nsi.AuthMessage_.split (' ')); return; }
void DialogCard::OnButtonShow(wxCommandEvent& event) { ShowAnswer(); }
void DialogCard::HideAnswer() { ShowAnswer(false); }