|
- public LoginDialog() {
- Class235.lOGA49LzdKkMJ();
- base..ctor();
- this.Size = new Size(785, 110);
- base.Opacity = 0 f;
- base.HasTitle = false;
- base.HasFooter = false;
- base.HasTopBorder = false;
- base.TitleLabel.Visible = false;
- base.CloseButton.Visible = false;
- this.LoginImage = new DXImageControl {
- Parent = this,
- LibraryFile = LibraryFile.const_1,
- Index = 2,
- Location = new Point(0, 0)
- };
- this.EMailTextBox = new DXTextBox {
- Parent = this,
- Location = new Point(67, 64),
- Size = new Size(190, 20)
- };
- this.EMailTextBox.SetFocus();
- this.EMailTextBox.TextBox.TextChanged += new EventHandler(this.method_8);
- this.EMailTextBox.TextBox.GotFocus += new EventHandler(this.method_13);
- this.EMailTextBox.TextBox.LostFocus += new EventHandler(this.method_14);
- this.EMailTextBox.TextBox.KeyPress += new KeyPressEventHandler(this.method_7);
- this.PasswordTextBox = new DXTextBox {
- Parent = this,
- Location = new Point(350, 64),
- Size = new Size(190, 16),
- Password = true
- };
- this.PasswordTextBox.TextBox.TextChanged += new EventHandler(this.method_9);
- this.PasswordTextBox.TextBox.GotFocus += new EventHandler(this.method_15);
- this.PasswordTextBox.TextBox.LostFocus += new EventHandler(this.method_16);
- this.PasswordTextBox.TextBox.KeyPress += new KeyPressEventHandler(this.method_7);
- this.TipsLabel = new DXLabel {
- Parent = this,
- Location = new Point(320, 39),
- Text = "请输入你的邮箱账号和密码",
- ForeColour = Color.Gainsboro
- };
- DXLabel dXLabel = new DXLabel {
- Parent = this,
- Font = new Font(Config.FontName, CEnvir.FontSize(10 f), FontStyle.Bold),
- Text = "E-Mail:"
- };
- dXLabel.Location = new Point(this.EMailTextBox.Location.X -
- dXLabel.Size.Width + 4, (this.EMailTextBox.Size.Height -
- dXLabel.Size.Height) / 2 + this.EMailTextBox.Location.Y);
- dXLabel = new DXLabel {
- Parent = this,
- Font = new Font(Config.FontName, CEnvir.FontSize(10 f), FontStyle.Bold),
- Text = "密码:"
- };
- dXLabel.Location = new Point(this.PasswordTextBox.Location.X -
- dXLabel.Size.Width + 4, (this.PasswordTextBox.Size.Height -
- dXLabel.Size.Height) / 2 + this.PasswordTextBox.Location.Y);
- this.EMailHelpLabel = new DXLabel {
- Visible = false,
- Parent = this,
- Text = "[?]",
- Hint = string.Format("E-Mail 地址\n格式: Example@Example.Com\n最大长度: {0} 字符", 50)
- };
- this.EMailHelpLabel.Location = new
- Point(this.EMailTextBox.Location.X + this.EMailTextBox.Size.Width + 2, (this.EMailTextBox.Size.Height - this.EMailHelpLabel.Size.Height) / 2 +
- this.EMailTextBox.Location.Y);
- this.PasswordHelpLabel = new DXLabel {
- Visible = false,
- Parent = this,
- Text = "[?]",
- Hint = string.Format("密码\n允许非空格字符\n长度: 处于 {0} 和 {1} 之间", 5, 15)
- };
- this.PasswordHelpLabel.Location = new
- Point(this.PasswordTextBox.Location.X + this.PasswordTextBox.Size.Width +
- 2, (this.PasswordTextBox.Size.Height -
- this.PasswordHelpLabel.Size.Height) / 2 +
- this.PasswordTextBox.Location.Y);
- this.RememberCheckBox = new DXCheckBox {
- Label = {
- Text = "记住账号"
- },
- Parent = this,
- Checked = Config.RememberDetails
- };
- this.RememberCheckBox.Location = new
- Point(this.PasswordTextBox.Location.X + this.PasswordTextBox.Size.Width -
- this.RememberCheckBox.Size.Width + 80, 39);
- this.RememberCheckBox.CheckedChanged += new EventHandler < EventArgs > (this.method_17);
- this.LoginButton = new DXButton {
- Parent = this,
- Location = new Point(560, 60),
- Size = new Size(100, DXControl.DefaultHeight),
- Label = {
- Text = "登录"
- },
- Enabled = false
- };
- this.LoginButton.MouseClick += new EventHandler < MouseEventArgs > (this.method_18);
- this.QuitButton = new DXButton {
- Parent = this,
- Location = new Point(665, 60),
- Size = new Size(100, DXControl.DefaultHeight),
- Label = {
- Text = "退出"
- }
- };
- DXControl arg_616_0 = this.QuitButton;
- EventHandler < MouseEventArgs > arg_616_1;
- if ((arg_616_1 = LoginScene.LoginDialog.Class16.eventHandler_0) == null) {
- arg_616_1 = (LoginScene.LoginDialog.Class16.eventHandler_0 = new EventHandler < MouseEventArgs > (LoginScene.LoginDialog.Class16.class16_0.method_0));
- }
- arg_616_0.MouseClick += arg_616_1;
- this.ChangePasswordImage = new DXButton {
- Parent = this,
- LibraryFile = LibraryFile.const_1,
- Index = 11,
- Location = new Point(643, 0),
- Size = new Size(150, DXControl.DefaultHeight)
- };
- this.ChangePasswordImage.MouseClick += new EventHandler < MouseEventArgs > (this.method_10);
- this.ForgotPasswordLabel = new DXLabel {
- Parent = this,
- Text = "忘记密码?",
- Sound = SoundIndex.ButtonC
- };
- this.ForgotPasswordLabel.MouseEnter += new EventHandler < EventArgs > (this.method_19);
- this.ForgotPasswordLabel.MouseLeave += new EventHandler < EventArgs > (this.method_20);
- this.ForgotPasswordLabel.Location = new Point(650, 39);
- this.ForgotPasswordLabel.MouseClick += new EventHandler < MouseEventArgs > (this.method_11);
- this.NewAccountImage = new DXButton {
- Parent = this,
- LibraryFile = LibraryFile.const_1,
- Index = 10,
- Location = new Point(505, 0),
- Size = new Size(150, DXControl.DefaultHeight)
- };
- this.NewAccountImage.MouseClick += new EventHandler < MouseEventArgs > (this.method_12);
- DXControl arg_77D_0 = base.CloseButton;
- EventHandler < MouseEventArgs > arg_77D_1;
- if ((arg_77D_1 = LoginScene.LoginDialog.Class16.eventHandler_1) == null) {
- arg_77D_1 = (LoginScene.LoginDialog.Class16.eventHandler_1 = new EventHandler < MouseEventArgs > (LoginScene.LoginDialog.Class16.class16_0.method_1));
- }
- arg_77D_0.MouseClick += arg_77D_1;
- if (Config.RememberDetails) {
- this.EMailTextBox.TextBox.Text = Config.RememberedEMail;
- this.PasswordTextBox.TextBox.Text = Config.RememberedPassword;
- }
- }
- public void Login() {
- this.LoginAttempted = true;
- Login packet = new Login {
- EMailAddress = this.EMailTextBox.TextBox.Text,
- Password = this.PasswordTextBox.TextBox.Text,
- CheckSum = CEnvir.C
- };
- CEnvir.Enqueue(packet);
- }
- private void method_7(object sender, KeyPressEventArgs e) {
- if (e.KeyChar == '\r') {
- e.Handled = true;
- if (!this.Boolean_0) {
- this.EMailTextBox.SetFocus();
- } else if (!this.PasswordValid) {
- this.PasswordTextBox.SetFocus();
- } else if (this.LoginButton.IsEnabled) {
- this.Login();
- }
- }
- }
- private void method_8(object sender, EventArgs e) {
- this.Boolean_0 =
- (!string.IsNullOrEmpty(this.EMailTextBox.TextBox.Text) &&
- this.EMailTextBox.TextBox.Text.Length >= 2);
- if (string.IsNullOrEmpty(this.EMailTextBox.TextBox.Text)) {
- this.EMailTextBox.BorderColour = Color.FromArgb(141, 125, 109);
- } else {
- this.EMailTextBox.BorderColour = (this.Boolean_0 ? Color.Green : Color.Red);
- }
- }
- private void method_9(object sender, EventArgs e) {
- this.PasswordValid =
- (!string.IsNullOrEmpty(this.PasswordTextBox.TextBox.Text) &&
- Globals.PasswordRegex.IsMatch(this.PasswordTextBox.TextBox.Text));
- if (string.IsNullOrEmpty(this.PasswordTextBox.TextBox.Text)) {
- this.PasswordTextBox.BorderColour = Color.FromArgb(141, 125, 109);
- } else {
- this.PasswordTextBox.BorderColour = (this.PasswordValid ? Color.Green : Color.Red);
- }
- }
- private void method_10(object sender, MouseEventArgs e) {
- LoginScene loginScene = DXControl.ActiveScene as LoginScene;
- if (loginScene != null) {
- base.Visible = false;
- loginScene.ChangeBox.Visible = true;
- loginScene.ChangeBox.EMailTextBox.SetFocus();
- }
- }
- private void method_11(object sender, MouseEventArgs e) {
- LoginScene loginScene = DXControl.ActiveScene as LoginScene;
- if (loginScene != null) {
- base.Visible = false;
- loginScene.RequestPassswordBox.Visible = true;
- loginScene.RequestPassswordBox.EMailTextBox.SetFocus();
- }
- }
- private void method_12(object sender, MouseEventArgs e) {
- LoginScene loginScene = DXControl.ActiveScene as LoginScene;
- if (loginScene != null) {
- base.Visible = false;
- loginScene.AccountBox.Visible = true;
- loginScene.AccountBox.EMailTextBox.SetFocus();
- }
- }
- protected override void Dispose(bool disposing) {
- base.Dispose(disposing);
- if (disposing) {
- if (this.EMailTextBox != null) {
- if (!this.EMailTextBox.IsDisposed) {
- this.EMailTextBox.Dispose();
- }
- this.EMailTextBox = null;
- }
- if (this.PasswordTextBox != null) {
- if (!this.PasswordTextBox.IsDisposed) {
- this.PasswordTextBox.Dispose();
- }
- this.PasswordTextBox = null;
- }
- if (this.EMailHelpLabel != null) {
- if (!this.EMailHelpLabel.IsDisposed) {
- this.EMailHelpLabel.Dispose();
- }
- this.EMailHelpLabel = null;
- }
- if (this.PasswordHelpLabel != null) {
- if (!this.PasswordHelpLabel.IsDisposed) {
- this.PasswordHelpLabel.Dispose();
- }
- this.PasswordHelpLabel = null;
- }
- if (this.RememberCheckBox != null) {
- if (!this.RememberCheckBox.IsDisposed) {
- this.RememberCheckBox.Dispose();
- }
- this.RememberCheckBox = null;
- }
- if (this.LoginButton != null) {
- if (!this.LoginButton.IsDisposed) {
- this.LoginButton.Dispose();
- }
- this.LoginButton = null;
- }
- if (this.NewAccountImage != null) {
- if (!this.NewAccountImage.IsDisposed) {
- this.NewAccountImage.Dispose();
- }
- this.NewAccountImage = null;
- }
- if (this.ChangePasswordImage != null) {
- if (!this.ChangePasswordImage.IsDisposed) {
- this.ChangePasswordImage.Dispose();
- }
- this.ChangePasswordImage = null;
- }
- if (this.ForgotPasswordLabel != null) {
- if (!this.ForgotPasswordLabel.IsDisposed) {
- this.ForgotPasswordLabel.Dispose();
- }
- this.ForgotPasswordLabel = null;
- }
- this.bool_29 = false;
- this.bool_30 = false;
- this.bool_31 = false;
- }
- }
复制代码
文件名:黑龙仿韩服逆向代码.zip( 售价: 1000积分 ) 访问密码:z3e31 |
上一篇:Delphi传奇地图平滑移动代码下一篇:传奇3G2005源代码C# 逆向Zircon传奇3G源码
|