RESULT_T ApoClient::TrytoReloginEx(void *session, size_t sessionSize) { // in login if (IsLoginOk()){ nd_logerror("already in login\n"); return ESERVER_ERR_SUCCESS; } if (-1 == _trytoOpen()) { return NDSYS_ERR_HOST_UNAVAILABLE; } //login server if (!m_login) { nd_logerror("can not login the program is not init-success or connector-to-server\n"); return NDSYS_ERR_NOT_INIT; } m_runningUpdate = ERUN_UP_STOP; int ret = m_login->ReloginEx(session,sessionSize); if (0 == ret) { RESULT_T res = EnterGame(); m_runningUpdate = ERUN_UP_NORMAL; return res; } return (RESULT_T)NDERR_LIMITED; }
/* * LoginReset: We've gotten an error from the server in LOGIN state; * bring up appropriate dialog. */ void LoginReset(void) { /* If login failed here, bring up dialog again */ config.quickstart = FALSE; if (!logged_in) { if (connection != CON_NONE) if (GetLogin()) LoginSendInfo(); else Logoff(); return; } EnterGame(); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); /**********button Setting************/ connect(ui->StartButton,SIGNAL(released()),this,SLOT(EnterGame())); connect(ui->ExitButton,SIGNAL(released()),this,SLOT(ExitGame())); /****UI Setting*******/ this->setStyleSheet("#mainWindow {border-image:url(../TAIKO/Picture/BackGround.jpg);}" ); ui->ExitButton->setFlat(true); ui->StartButton->setFlat(true); }
/* * LoginErrorMessage: Bring up an error message box with given login error message. */ void LoginErrorMessage(char *message, BYTE action) { HWND hParent = GetMessageBoxParent(); config.quickstart = FALSE; ClientMessageBox(hParent, message, szAppName, MB_APPLMODAL | MB_ICONEXCLAMATION); switch (action) { case LA_NOTHING: EnterGame(); break; case LA_LOGOFF: Logoff(); break; default: debug(("LoginErrorMessage got unknown action type %d\n", action)); break; } }