Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
- namespace DukeIsabellaMacDonald
- {
- public partial class SignIn : Form
- {
- public SignIn()
- {
- InitializeComponent();
- }
- private void label4_Click(object sender, EventArgs e)
- {
- private static string SignInUsername = "";
- public static string SignInPassword = "";
- String username = "Luna101";
- private TextBox Username;
- private TextBox Password;
- private PictureBox pictureBox1;
- private Label label1;
- private Label label2;
- private Button Exit;
- private Button Loggin;
- String password = "Kat46"; //username and password will change to the users username and password.
- public static void Main()
- {
- double Username, Password;
- try
- {
- Username = double.Parse(UsernameTextbox.Text);
- Password = double.Parse(PasswordTextBox.Text);
- }
- catch
- {
- MessageBox.Show("Please Enter Password");
- PasswordTextBox.Focus();
- PasswordTextBox.SelectAll();
- }
- catch
- {
- MessageBox.Show("Invalid Username or Password. Please Try Again");
- PasswordTextBox.Focus();
- UsernameTextBox.Focus();
- PasswordTextBox.SelectAll();
- UsernameTextBox.Selectall();
- }
- private void InitializeComponent()
- {
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SignIn));
- this.Username = new System.Windows.Forms.TextBox();
- this.Password = new System.Windows.Forms.TextBox();
- this.pictureBox1 = new System.Windows.Forms.PictureBox();
- this.label1 = new System.Windows.Forms.Label();
- this.Password = new System.Windows.Forms.Label();
- this.Exit = new System.Windows.Forms.Button();
- this.Loggin = new System.Windows.Forms.Button();
- ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
- this.SuspendLayout();
- //
- // textBox1
- //
- this.Username.Location = new System.Drawing.Point(269, 157);
- this.Username.Name = "textBox1";
- this.Username.Size = new System.Drawing.Size(197, 26);
- this.Username.TabIndex = 0;
- //
- // textBox2
- //
- this.Password.Location = new System.Drawing.Point(269, 61);
- this.Password.Name = "textBox2";
- this.Password.Size = new System.Drawing.Size(197, 26);
- this.Password.TabIndex = 1;
- //
- // pictureBox1
- //
- this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
- this.pictureBox1.Location = new System.Drawing.Point(269, 247);
- this.pictureBox1.Name = "pictureBox1";
- this.pictureBox1.Size = new System.Drawing.Size(313, 168);
- this.pictureBox1.TabIndex = 2;
- this.pictureBox1.TabStop = false;
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(124, 61);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(87, 20);
- this.label1.TabIndex = 3;
- this.label1.Text = "Username:";
- //
- // label2
- //
- this.Password.AutoSize = true;
- this.Password.Location = new System.Drawing.Point(124, 157);
- this.Password.Name = "label2";
- this.Password.Size = new System.Drawing.Size(82, 20);
- this.Password.TabIndex = 4;
- this.Password.Text = "Password:";
- //
- // button1
- //
- this.Exit.Location = new System.Drawing.Point(661, 61);
- this.Exit.Name = "button1";
- this.Exit.Size = new System.Drawing.Size(99, 50);
- this.Exit.TabIndex = 5;
- this.Exit.Text = "Exit";
- this.Exit.UseVisualStyleBackColor = true;
- //
- // button2
- //
- this.Loggin.Location = new System.Drawing.Point(661, 157);
- this.Loggin.Name = "button2";
- this.Loggin.Size = new System.Drawing.Size(99, 53);
- this.Loggin.TabIndex = 6;
- this.Loggin.Text = "Loggin";
- this.Loggin.UseVisualStyleBackColor = true;
- //
- // SignIn
- //
- this.ClientSize = new System.Drawing.Size(883, 427);
- this.Controls.Add(this.Loggin);
- this.Controls.Add(this.Exit);
- this.Controls.Add(this.Password);
- this.Controls.Add(this.label1);
- this.Controls.Add(this.pictureBox1);
- this.Controls.Add(this.Password);
- this.Controls.Add(this.Username);
- this.Name = "SignIn";
- this.Text = "Sign In";
- ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
- ResumeLayout(false);
- PerformLayout();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement