60 lines
1.8 KiB
C#
60 lines
1.8 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.ComponentModel;
|
|||
|
using System.Data;
|
|||
|
using System.Drawing;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using System.Windows.Forms;
|
|||
|
using UI.Framework.Forms;
|
|||
|
|
|||
|
namespace Grant.Framework
|
|||
|
{
|
|||
|
public partial class RegistForm : BaseForm
|
|||
|
{
|
|||
|
public RegistForm()
|
|||
|
{
|
|||
|
InitializeComponent();
|
|||
|
}
|
|||
|
|
|||
|
private void RegistForm_Load(object sender, EventArgs e)
|
|||
|
{
|
|||
|
this.Icon = Grant.Framework.GrantClient.Get().Ico;
|
|||
|
this.pictureBox2.Image = CsharpHttpHelper.HttpExtend.Base64StringToImage(GrantClient.Get().About["logo"].ToString());
|
|||
|
}
|
|||
|
|
|||
|
public string username, userpass;
|
|||
|
|
|||
|
private void label4_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
private void button1_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
try
|
|||
|
{
|
|||
|
if (this.textBox2.Text != this.textBox3.Text) throw new Exception("您两次填写的密码不一致。");
|
|||
|
var result = GrantClient.Get().SendPack("registAccounts",
|
|||
|
new
|
|||
|
{
|
|||
|
username = this.textBox4.Text.Trim(),
|
|||
|
userpass = this.textBox2.Text.Trim(),
|
|||
|
phone = this.textBox1.Text.Trim(),
|
|||
|
friendName = this.textBox5.Text
|
|||
|
});
|
|||
|
|
|||
|
username = this.textBox4.Text;
|
|||
|
userpass = this.textBox2.Text;
|
|||
|
MessageBox.Show("恭喜您,已经注册成功!","注册成功",MessageBoxButtons.OK,MessageBoxIcon.Information);
|
|||
|
this.Close();
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
MessageBox.Show(ex.Message, "友情提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|