/// <summary>
/// 登陆:检查
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnLogin_Click(object sender, EventArgs e)
{
//第7章第2题的思路;
string sql = string.Format("select count(*)form users where id={0} and loginPwd='{1}'",txtLoginId.Text.Trim(),txtLoginPwd.Text.Trim());
//找出你的登录成功的代码
//int count=Convert.ToInt32(comm.ExecuteScalar()); 第1行第1列的值,Object类型;需要强转
//UserHelper类,记录当前登录的QQ号.
//if (count > 0)
//{
// UserHelper.loginId = int.Parse(txtLoginId.Text.Trim()); //则将当前QQ号。
UserHelper.loginId = int.Parse(txtLoginId.Text.Trim());
//new 主窗体;
DBHelper.conn.Close();
MainForm mf = new MainForm();
mf.Show();
this.Visible = false;
//}
//如果登录成功,则将成功的QQ号码,存放到UserHelper的id里面
}
//窗体加载事件;
private void LoginForm_Load(object sender, EventArgs e)
{
skinEngine1.SkinFile = "skins\\MSN.ssk";
//皮肤控件的皮肤=文件路径
}
//皮肤下拉框控件,选项改变事件;
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
skinEngine1.SkinFile = "skins\\" + comboBox1.Text;
}