'This source code has been developed by Cuong Pham (cuong@nmsu.edu) & Mary Lucero
'Any use of this software MUST contain this message.
Public Class FrLogin
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents TxUser As System.Windows.Forms.TextBox
    Friend WithEvents TxPass As System.Windows.Forms.TextBox
    Friend WithEvents ButLogin As System.Windows.Forms.Button
    Friend WithEvents ButExit As System.Windows.Forms.Button
    Friend WithEvents ButHelp As System.Windows.Forms.Button
    Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(FrLogin))
        Me.Label1 = New System.Windows.Forms.Label
        Me.TxUser = New System.Windows.Forms.TextBox
        Me.Label2 = New System.Windows.Forms.Label
        Me.TxPass = New System.Windows.Forms.TextBox
        Me.ButLogin = New System.Windows.Forms.Button
        Me.ButExit = New System.Windows.Forms.Button
        Me.ButHelp = New System.Windows.Forms.Button
        Me.PictureBox1 = New System.Windows.Forms.PictureBox
        Me.SuspendLayout()
        '
        'Label1
        '
        Me.Label1.Location = New System.Drawing.Point(16, 24)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(96, 32)
        Me.Label1.TabIndex = 0
        Me.Label1.Text = "Username"
        '
        'TxUser
        '
        Me.TxUser.Location = New System.Drawing.Point(117, 22)
        Me.TxUser.Name = "TxUser"
        Me.TxUser.Size = New System.Drawing.Size(171, 20)
        Me.TxUser.TabIndex = 1
        Me.TxUser.Text = "TextBox1"
        '
        'Label2
        '
        Me.Label2.Location = New System.Drawing.Point(16, 58)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(96, 24)
        Me.Label2.TabIndex = 2
        Me.Label2.Text = "Password"
        '
        'TxPass
        '
        Me.TxPass.Location = New System.Drawing.Point(117, 58)
        Me.TxPass.Name = "TxPass"
        Me.TxPass.PasswordChar = Microsoft.VisualBasic.ChrW(42)
        Me.TxPass.Size = New System.Drawing.Size(176, 20)
        Me.TxPass.TabIndex = 3
        Me.TxPass.Text = "TextBox2"
        '
        'ButLogin
        '
        Me.ButLogin.Location = New System.Drawing.Point(19, 103)
        Me.ButLogin.Name = "ButLogin"
        Me.ButLogin.Size = New System.Drawing.Size(88, 32)
        Me.ButLogin.TabIndex = 4
        Me.ButLogin.Text = "Log on"
        '
        'ButExit
        '
        Me.ButExit.Location = New System.Drawing.Point(115, 104)
        Me.ButExit.Name = "ButExit"
        Me.ButExit.Size = New System.Drawing.Size(80, 32)
        Me.ButExit.TabIndex = 5
        Me.ButExit.Text = "Exit"
        '
        'ButHelp
        '
        Me.ButHelp.Location = New System.Drawing.Point(203, 104)
        Me.ButHelp.Name = "ButHelp"
        Me.ButHelp.Size = New System.Drawing.Size(88, 32)
        Me.ButHelp.TabIndex = 6
        Me.ButHelp.Text = "Help"
        '
        'PictureBox1
        '
        Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image)
        Me.PictureBox1.Location = New System.Drawing.Point(304, 5)
        Me.PictureBox1.Name = "PictureBox1"
        Me.PictureBox1.Size = New System.Drawing.Size(64, 67)
        Me.PictureBox1.TabIndex = 7
        Me.PictureBox1.TabStop = False
        '
        'FrLogin
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(376, 150)
        Me.Controls.Add(Me.PictureBox1)
        Me.Controls.Add(Me.ButHelp)
        Me.Controls.Add(Me.ButExit)
        Me.Controls.Add(Me.ButLogin)
        Me.Controls.Add(Me.TxPass)
        Me.Controls.Add(Me.Label2)
        Me.Controls.Add(Me.TxUser)
        Me.Controls.Add(Me.Label1)
        Me.Name = "FrLogin"
        Me.Text = "Log on the Strainbook system"
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private Sub ButHelp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButHelp.Click
        MsgBox("This is the Strainbook system version 1.0, by Mary, Cuong, Ruth")
    End Sub

    Private Sub FrLogin_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        TxPass.Focus()
        TxUser.Text = "Mary"
        TxPass.Text = ""
        'TxPass.Focus()
    End Sub

    Private Sub ButLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButLogin.Click
        If ((Trim(TxUser.Text) = "Ruth" And Trim(TxPass.Text) = "Ruth") Or (Trim(TxUser.Text) = "cuong" And Trim(TxPass.Text) = "cuong") Or (Trim(TxUser.Text) = "Mary" And Trim(TxPass.Text) = "Mary") Or (Trim(TxUser.Text) = "Admin" And Trim(TxPass.Text) = "Admin")) Then
            Dim frMenu1 As New FrMenu
            frMenu1.Show()
            Me.Hide()
        Else
            MsgBox("You entered incorrect username or password, Please enter again")
            TxUser.Focus()
        End If
    End Sub

    Private Sub TxUser_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TxUser.TextChanged

    End Sub

    Private Sub TxUser_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TxUser.KeyPress

    End Sub

    Private Sub ButExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButExit.Click
        End
    End Sub
End Class
