Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.ComponentModel;
- using System.Drawing;
- using System.Windows.Forms;
- using BetterSocks;
- using DROSE.Properties;
- namespace DROSE
- {
- // Token: 0x02000031 RID: 49
- public class Login : Form
- {
- // Token: 0x060000B7 RID: 183 RVA: 0x00005288 File Offset: 0x00003488
- public Login()
- {
- this.InitializeComponent();
- FormManagement.RandomizeTitle(this);
- FormManagement.Movable(this.pnlTop, this);
- FormManagement.Movable(this.lblTitle, this);
- FormManagement.ApplyPlaceholder(this.txtUsername, "username", Color.DarkCyan, Color.Cyan, null);
- FormManagement.ApplyPlaceholder(this.txtPassword, "password", Color.DarkCyan, Color.Cyan, "•");
- FormManagement.ApplyPlaceholder(this.txtRegisterUsername, "username", Color.DarkCyan, Color.Cyan, null);
- FormManagement.ApplyPlaceholder(this.txtRegisterPassword, "password", Color.DarkCyan, Color.Cyan, "•");
- FormManagement.ApplyPlaceholder(this.txtRegisterLicense, "license key", Color.DarkCyan, Color.Cyan, null);
- bool flag = !Seal.Authenticate("udDY5ahKWO4q0oHqDOSUfXNPXR45wkM0yqZDBgox5tY6R").status;
- if (flag)
- {
- MessageBox.Show("Failed to contact login server.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
- Application.Exit();
- }
- }
- // Token: 0x060000B8 RID: 184 RVA: 0x00005391 File Offset: 0x00003591
- private void btnExit_Click(object sender, EventArgs e)
- {
- Application.Exit();
- }
- // Token: 0x060000B9 RID: 185 RVA: 0x0000539C File Offset: 0x0000359C
- private void btnLogin_Click(object sender, EventArgs e)
- {
- LoginResponse loginResponse = Seal.Login(this.txtUsername.Text, this.txtPassword.Text);
- bool status = loginResponse.status;
- if (status)
- {
- string text = string.Empty;
- bool flag = loginResponse.remain == "lifetime";
- if (flag)
- {
- text = "Never";
- }
- else
- {
- text = Login.FromUnixTime(Convert.ToInt64(loginResponse.remain)).ToString("MMM d, yyyy @ hh: mm tt");
- }
- MessageBox.Show(string.Format("Welcome back, {0}!\nYour sub expires: {1}", loginResponse.username, text), "DROSE", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- Login._user = this.txtUsername.Text;
- Login._exp = text;
- new Main().Show();
- base.Hide();
- }
- else
- {
- MessageBox.Show("Failed to login.", "Errose", MessageBoxButtons.OK, MessageBoxIcon.Hand);
- }
- }
- // Token: 0x060000BA RID: 186 RVA: 0x00005478 File Offset: 0x00003678
- private void btnCreateAccount_Click(object sender, EventArgs e)
- {
- RegisterResponse registerResponse = Seal.Register(this.txtRegisterUsername.Text, this.txtRegisterPassword.Text, this.txtRegisterLicense.Text);
- bool status = registerResponse.status;
- if (status)
- {
- MessageBox.Show(string.Format("Welcome to DROSE, {0}!\nAccount created successfully.", this.txtRegisterUsername.Text), "DROSE", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- this.tabControl.SelectedIndex = 0;
- }
- else
- {
- MessageBox.Show("Failed to create your account.", "Errose", MessageBoxButtons.OK, MessageBoxIcon.Hand);
- }
- }
- // Token: 0x060000BB RID: 187 RVA: 0x00005504 File Offset: 0x00003704
- public static DateTime FromUnixTime(long unixTime)
- {
- DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
- return dateTime.AddSeconds((double)unixTime);
- }
- // Token: 0x060000BC RID: 188 RVA: 0x00005534 File Offset: 0x00003734
- protected override void Dispose(bool disposing)
- {
- bool flag = disposing && this.components != null;
- if (flag)
- {
- this.components.Dispose();
- }
- base.Dispose(disposing);
- }
- // Token: 0x060000BD RID: 189 RVA: 0x0000556C File Offset: 0x0000376C
- private void InitializeComponent()
- {
- this.pnlTop = new Panel();
- this.btnExit = new Button();
- this.lblTitle = new Label();
- this.tabControl = new TabControl();
- this.tabLogin = new TabPage();
- this.btnLogin = new Button();
- this.txtPassword = new TextBox();
- this.txtUsername = new TextBox();
- this.tabRegister = new TabPage();
- this.txtRegisterLicense = new TextBox();
- this.btnCreateAccount = new Button();
- this.txtRegisterPassword = new TextBox();
- this.txtRegisterUsername = new TextBox();
- this.pnlTop.SuspendLayout();
- this.tabControl.SuspendLayout();
- this.tabLogin.SuspendLayout();
- this.tabRegister.SuspendLayout();
- base.SuspendLayout();
- this.pnlTop.BackColor = Color.Aqua;
- this.pnlTop.Controls.Add(this.btnExit);
- this.pnlTop.Controls.Add(this.lblTitle);
- this.pnlTop.Location = new Point(12, 12);
- this.pnlTop.Name = "pnlTop";
- this.pnlTop.Size = new Size(374, 43);
- this.pnlTop.TabIndex = 0;
- this.btnExit.FlatStyle = FlatStyle.Flat;
- this.btnExit.Font = new Font("Tahoma", 11.25f, FontStyle.Bold, GraphicsUnit.Point, 0);
- this.btnExit.Location = new Point(321, 5);
- this.btnExit.Name = "btnExit";
- this.btnExit.Size = new Size(46, 31);
- this.btnExit.TabIndex = 1;
- this.btnExit.Text = "X";
- this.btnExit.UseVisualStyleBackColor = true;
- this.btnExit.Click += this.btnExit_Click;
- this.lblTitle.AutoSize = true;
- this.lblTitle.Font = new Font("Tahoma", 15.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
- this.lblTitle.ForeColor = Color.Black;
- this.lblTitle.Location = new Point(106, 9);
- this.lblTitle.Name = "lblTitle";
- this.lblTitle.Size = new Size(163, 25);
- this.lblTitle.TabIndex = 0;
- this.lblTitle.Text = "DROSE Loader";
- this.tabControl.Controls.Add(this.tabLogin);
- this.tabControl.Controls.Add(this.tabRegister);
- this.tabControl.Font = new Font("Tahoma", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
- this.tabControl.Location = new Point(12, 61);
- this.tabControl.Name = "tabControl";
- this.tabControl.SelectedIndex = 0;
- this.tabControl.Size = new Size(374, 205);
- this.tabControl.TabIndex = 1;
- this.tabLogin.BackgroundImage = Resources.bg;
- this.tabLogin.BackgroundImageLayout = ImageLayout.Center;
- this.tabLogin.Controls.Add(this.btnLogin);
- this.tabLogin.Controls.Add(this.txtPassword);
- this.tabLogin.Controls.Add(this.txtUsername);
- this.tabLogin.Font = new Font("Tahoma", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
- this.tabLogin.Location = new Point(4, 22);
- this.tabLogin.Name = "tabLogin";
- this.tabLogin.Padding = new Padding(3);
- this.tabLogin.Size = new Size(366, 179);
- this.tabLogin.TabIndex = 0;
- this.tabLogin.Text = "Login";
- this.tabLogin.UseVisualStyleBackColor = true;
- this.btnLogin.BackColor = Color.FromArgb(64, 64, 64);
- this.btnLogin.FlatStyle = FlatStyle.Popup;
- this.btnLogin.Font = new Font("Tahoma", 15.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
- this.btnLogin.ForeColor = Color.Aqua;
- this.btnLogin.Location = new Point(31, 104);
- this.btnLogin.Name = "btnLogin";
- this.btnLogin.Size = new Size(305, 48);
- this.btnLogin.TabIndex = 2;
- this.btnLogin.Text = "Login to DROSE";
- this.btnLogin.UseVisualStyleBackColor = false;
- this.btnLogin.Click += this.btnLogin_Click;
- this.txtPassword.BackColor = Color.FromArgb(64, 64, 64);
- this.txtPassword.BorderStyle = BorderStyle.FixedSingle;
- this.txtPassword.Font = new Font("Tahoma", 14.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
- this.txtPassword.ForeColor = Color.Aqua;
- this.txtPassword.Location = new Point(31, 68);
- this.txtPassword.Name = "txtPassword";
- this.txtPassword.Size = new Size(305, 30);
- this.txtPassword.TabIndex = 1;
- this.txtPassword.TextAlign = HorizontalAlignment.Center;
- this.txtUsername.BackColor = Color.FromArgb(64, 64, 64);
- this.txtUsername.BorderStyle = BorderStyle.FixedSingle;
- this.txtUsername.Font = new Font("Tahoma", 14.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
- this.txtUsername.ForeColor = Color.Aqua;
- this.txtUsername.Location = new Point(31, 32);
- this.txtUsername.Name = "txtUsername";
- this.txtUsername.Size = new Size(305, 30);
- this.txtUsername.TabIndex = 0;
- this.txtUsername.TextAlign = HorizontalAlignment.Center;
- this.tabRegister.BackgroundImage = Resources.bg;
- this.tabRegister.BackgroundImageLayout = ImageLayout.Center;
- this.tabRegister.Controls.Add(this.txtRegisterLicense);
- this.tabRegister.Controls.Add(this.btnCreateAccount);
- this.tabRegister.Controls.Add(this.txtRegisterPassword);
- this.tabRegister.Controls.Add(this.txtRegisterUsername);
- this.tabRegister.Location = new Point(4, 22);
- this.tabRegister.Name = "tabRegister";
- this.tabRegister.Padding = new Padding(3);
- this.tabRegister.Size = new Size(366, 179);
- this.tabRegister.TabIndex = 1;
- this.tabRegister.Text = "Register";
- this.tabRegister.UseVisualStyleBackColor = true;
- this.txtRegisterLicense.BackColor = Color.FromArgb(64, 64, 64);
- this.txtRegisterLicense.BorderStyle = BorderStyle.FixedSingle;
- this.txtRegisterLicense.Font = new Font("Tahoma", 14.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
- this.txtRegisterLicense.ForeColor = Color.Aqua;
- this.txtRegisterLicense.Location = new Point(31, 83);
- this.txtRegisterLicense.Name = "txtRegisterLicense";
- this.txtRegisterLicense.Size = new Size(305, 30);
- this.txtRegisterLicense.TabIndex = 6;
- this.txtRegisterLicense.TextAlign = HorizontalAlignment.Center;
- this.btnCreateAccount.BackColor = Color.FromArgb(64, 64, 64);
- this.btnCreateAccount.FlatStyle = FlatStyle.Popup;
- this.btnCreateAccount.Font = new Font("Tahoma", 15.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
- this.btnCreateAccount.ForeColor = Color.Aqua;
- this.btnCreateAccount.Location = new Point(31, 119);
- this.btnCreateAccount.Name = "btnCreateAccount";
- this.btnCreateAccount.Size = new Size(305, 48);
- this.btnCreateAccount.TabIndex = 5;
- this.btnCreateAccount.Text = "Create Account";
- this.btnCreateAccount.UseVisualStyleBackColor = false;
- this.btnCreateAccount.Click += this.btnCreateAccount_Click;
- this.txtRegisterPassword.BackColor = Color.FromArgb(64, 64, 64);
- this.txtRegisterPassword.BorderStyle = BorderStyle.FixedSingle;
- this.txtRegisterPassword.Font = new Font("Tahoma", 14.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
- this.txtRegisterPassword.ForeColor = Color.Aqua;
- this.txtRegisterPassword.Location = new Point(31, 47);
- this.txtRegisterPassword.Name = "txtRegisterPassword";
- this.txtRegisterPassword.Size = new Size(305, 30);
- this.txtRegisterPassword.TabIndex = 4;
- this.txtRegisterPassword.TextAlign = HorizontalAlignment.Center;
- this.txtRegisterUsername.BackColor = Color.FromArgb(64, 64, 64);
- this.txtRegisterUsername.BorderStyle = BorderStyle.FixedSingle;
- this.txtRegisterUsername.Font = new Font("Tahoma", 14.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
- this.txtRegisterUsername.ForeColor = Color.Aqua;
- this.txtRegisterUsername.Location = new Point(31, 11);
- this.txtRegisterUsername.Name = "txtRegisterUsername";
- this.txtRegisterUsername.Size = new Size(305, 30);
- this.txtRegisterUsername.TabIndex = 3;
- this.txtRegisterUsername.TextAlign = HorizontalAlignment.Center;
- base.AutoScaleDimensions = new SizeF(6f, 13f);
- base.AutoScaleMode = AutoScaleMode.Font;
- this.BackColor = Color.FromArgb(64, 64, 64);
- base.ClientSize = new Size(398, 278);
- base.Controls.Add(this.tabControl);
- base.Controls.Add(this.pnlTop);
- this.DoubleBuffered = true;
- base.FormBorderStyle = FormBorderStyle.None;
- base.MaximizeBox = false;
- base.Name = "Login";
- base.ShowIcon = false;
- base.StartPosition = FormStartPosition.CenterScreen;
- this.pnlTop.ResumeLayout(false);
- this.pnlTop.PerformLayout();
- this.tabControl.ResumeLayout(false);
- this.tabLogin.ResumeLayout(false);
- this.tabLogin.PerformLayout();
- this.tabRegister.ResumeLayout(false);
- this.tabRegister.PerformLayout();
- base.ResumeLayout(false);
- }
- // Token: 0x04000128 RID: 296
- public static string _user;
- // Token: 0x04000129 RID: 297
- public static string _exp;
- // Token: 0x0400012A RID: 298
- private IContainer components = null;
- // Token: 0x0400012B RID: 299
- private Panel pnlTop;
- // Token: 0x0400012C RID: 300
- private Button btnExit;
- // Token: 0x0400012D RID: 301
- private Label lblTitle;
- // Token: 0x0400012E RID: 302
- private TabControl tabControl;
- // Token: 0x0400012F RID: 303
- private TabPage tabLogin;
- // Token: 0x04000130 RID: 304
- private TabPage tabRegister;
- // Token: 0x04000131 RID: 305
- private TextBox txtUsername;
- // Token: 0x04000132 RID: 306
- private Button btnLogin;
- // Token: 0x04000133 RID: 307
- private TextBox txtPassword;
- // Token: 0x04000134 RID: 308
- private TextBox txtRegisterLicense;
- // Token: 0x04000135 RID: 309
- private Button btnCreateAccount;
- // Token: 0x04000136 RID: 310
- private TextBox txtRegisterPassword;
- // Token: 0x04000137 RID: 311
- private TextBox txtRegisterUsername;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement