private void btnTest_Click(object sender, EventArgs e) { int ret = AuthObj.Auth("0F3C6EC9-7089-4BB2-B308-508E90A2995E"); if (0 == ret) { Hide(); frmMain.ShowDialog(); Close(); } else { lblRet.Text = "The Test-card is disabled"; } }
private void btnAuth_Click(object sender, EventArgs e) { int ret = 0; if (0 == cboMode.SelectedIndex) { ret = AuthObj.Auth(txtAcc.Text); } else { ret = AuthObj.UserAuth(txtAcc.Text, txtPwd.Text); } switch (ret) { case 0: Hide(); frmMain.ShowDialog(); Close(); break; case -1: lblRet.Text = "The Registr-code is Invalid"; break; case -2: lblRet.Text = "The Registr-code is disabled"; break; case -3: lblRet.Text = "Bind is over limit"; break; case -4: lblRet.Text = "Channels is over limit"; break; case -5: lblRet.Text = "Out of date"; break; case -6: lblRet.Text = "Insufficient Balance"; break; } }