if ((this.txtusername.Text.Length >= 8) && (this.txtKey.Text.Length <= 20))
{
string str = this.txtusername.Text.Trim();
string str2 = this.txtKey.Text.Trim();
string str3 = str.Substring(3, 5);
string str4 = str.Substring(7, 1);
this.lblRealKey.Text = str3 + "dc" + str4.GetHashCode();
if ((str3 + "dc" + str4.GetHashCode()).Equals(str2))
{
MessageBox.Show("恭喜你,注册成功!", "成功", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
}
else
{
MessageBox.Show("恭喜你,注册失败!浮云……", "失败", MessageBoxButtons.OK, MessageBoxIcon.Hand);
}
}
else
{
MessageBox.Show("恭喜你,注册失败!浮云……", "失败", MessageBoxButtons.OK, MessageBoxIcon.Hand);
}
页:
[1]