|
@@ -6,8 +6,10 @@
|
|
|
#include "DlgLogin.h"
|
|
|
#include "afxdialogex.h"
|
|
|
#include "SATClient.h"
|
|
|
+#include "DlgProBar.h"
|
|
|
|
|
|
-
|
|
|
+// 进度条;
|
|
|
+extern CDlgProBar* g_pDlgProBar;
|
|
|
// CDlgLogin 对话框
|
|
|
|
|
|
IMPLEMENT_DYNAMIC(CDlgLogin, CDialogEx)
|
|
@@ -61,12 +63,20 @@ void CDlgLogin::OnBnClickedOk()
|
|
|
|
|
|
if (!SATData::login_resp.bStatus) {
|
|
|
if (CSATClient::GetInstance()->TCPLogin(strUserName.GetString(), strPassword.GetString(), Global::g_Config.strActuator)) {
|
|
|
+ while (g_pDlgProBar) {
|
|
|
+ Sleep(500);
|
|
|
+ }
|
|
|
+
|
|
|
if (!SATData::login_resp.bStatus)
|
|
|
AfxMessageBox("登录失败");
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
if (CSATClient::GetInstance()->TCPLogout(strUserName.GetString(), strPassword.GetString(), Global::g_Config.strActuator)) {
|
|
|
+ while (g_pDlgProBar) {
|
|
|
+ Sleep(500);
|
|
|
+ }
|
|
|
+
|
|
|
if (!SATData::logout_resp.bStatus)
|
|
|
AfxMessageBox("登出失败");
|
|
|
}
|