GroceryApp/App.config
GroceryApp/bin/Debug/GroceryApp.exe
GroceryApp/bin/Debug/GroceryApp.exe.config
GroceryApp/bin/Debug/GroceryApp.pdb
GroceryApp/bin/Debug/GroceryApp.xml
GroceryApp
A strongly-typed resource class, for looking up localized strings, etc.
Returns the cached ResourceManager instance used by this class.
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
GroceryApp/Class1.vb
Public Class Class1
End Class
GroceryApp/GroceryApp.vbproj
Debug
AnyCPU
{33B57008-8AE6-4E7B-B70B-95667F64BD61}
WinExe
GroceryApp.My.MyApplication
GroceryApp
GroceryApp
512
WindowsForms
v4.6.1
true
AnyCPU
true
full
true
true
bin\Debug\
GroceryApp.xml
42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
AnyCPU
pdbonly
false
true
true
bin\Release\
GroceryApp.xml
42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
On
Binary
Off
On
Form
LoginForm.vb
Form
True
Application.myapp
True
True
Resources.resx
True
Settings.settings
True
LoginForm.vb
VbMyResourcesResXFileCodeGenerator
Resources.Designer.vb
My.Resources
Designer
MyApplicationCodeGenerator
Application.Designer.vb
SettingsSingleFileGenerator
My
Settings.Designer.vb
GroceryApp/LoginException.vb
Public Class LoginException
End Class
GroceryApp/LoginForm.Designer.vb
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class LoginForm
Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
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.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.lblUsername = New System.Windows.Forms.Label()
...
2. Overrides the current thread's CurrentUICulture property for
all
resource lookups using this strongly typed resource class.
GroceryApp/Class1.vb
Public Class Class1
End Class
GroceryApp/GroceryApp.vbproj
Debug
AnyCPU
{33B57008-8AE6-4E7B-B70B-95667F64BD61}
WinExe
GroceryApp.My.MyApplication
GroceryApp
GroceryApp
512
WindowsForms
v4.6.1
true
AnyCPU
true
6. GroceryApp/LoginException.vb
Public Class LoginException
End Class
GroceryApp/LoginForm.Designer.vb
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGene
rated()> _
Partial Class LoginForm
Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As
Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
7. Finally
MyBase.Dispose(disposing)
End Try
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.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.lblUsername = New System.Windows.Forms.Label()
Me.lblPassword = New System.Windows.Forms.Label()
Me.txtUsername = New System.Windows.Forms.TextBox()
Me.txtPassword = New System.Windows.Forms.TextBox()
8. Me.btnLogin = New System.Windows.Forms.Button()
Me.btnCancel = New System.Windows.Forms.Button()
Me.SuspendLayout()
'
'lblUsername
'
Me.lblUsername.AutoSize = True
Me.lblUsername.Location = New
System.Drawing.Point(12, 9)
Me.lblUsername.Name = "lblUsername"
Me.lblUsername.Size = New System.Drawing.Size(55, 13)
Me.lblUsername.TabIndex = 0
Me.lblUsername.Text = "Username"
'
'lblPassword
'
Me.lblPassword.AutoSize = True
Me.lblPassword.Location = New
System.Drawing.Point(12, 42)
12. Me.Text = "Please Login"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents lblUsername As Label
Friend WithEvents lblPassword As Label
Friend WithEvents txtUsername As TextBox
Friend WithEvents txtPassword As TextBox
Friend WithEvents btnLogin As Button
Friend WithEvents btnCancel As Button
End Class
GroceryApp/LoginForm.resx
15. End If
End Sub
Private Sub btnCancel_Click(sender As Object, e As
EventArgs) Handles btnCancel.Click
Application.Exit()
End Sub
End Class
GroceryApp/Main.vb
Module Main
Friend blnLoggedIn As Boolean
Dim arrUsernames() As String = {"Admin, Clerk, Manager"}
Dim arrPasswords() As String = {"[email protected],
pa$$word, and passw0rd"}
Sub Login(username As String, password As String)
blnLoggedIn = False
If VerifyUsername(username) And
16. VerifyPassword(password) Then
'Find index for username
Dim userIndex As Integer
For loopIndex = 0 To arrUsernames.Length - 1
If arrUsernames(loopIndex) = username Then
userIndex = loopIndex
Exit For
End If
Next
'Check for password match
If arrPasswords(userIndex) = password Then
blnLoggedIn = True
Else
MessageBox.Show(“Incorrect password.”)
End If
End If
End Sub
17. Function VerifyUsername(username As String) As Boolean
End Function
Function VerifyPassword(password As String) As Boolean
End Function
End Module
GroceryApp/My Project/Application.Designer.vb
'--------------------------------------------------------------------------
----
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will
be lost if
' the code is regenerated.
19. Explorer), and make changes on the Application tab.
'
Partial Friend Class MyApplication
<Global.System.Diagnostics.DebuggerStepThroughAttribute()>
_
Public Sub New()
MyBase.New(Global.Microsoft.VisualBasic.ApplicationService
s.AuthenticationMode.Windows)
Me.IsSingleInstance = false
Me.EnableVisualStyles = true
Me.SaveMySettingsOnExit = true
Me.ShutDownStyle =
23. 'The following GUID is for the ID of the typelib if this project
is exposed to COM
<Assembly: Guid("2600cfc5-1670-4424-a56c-537970240804")>
' Version information for an assembly consists of the following
four values:
'
' Major Version
' Minor Version
' Build Number
' Revision
'
' You can specify all the values or you can default the Build and
Revision Numbers
24. ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>
GroceryApp/My Project/Resources.Designer.vb
'--------------------------------------------------------------------------
----
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
25. ' Changes to this file may cause incorrect behavior and will
be lost if
' the code is regenerated.
' </auto-generated>
'--------------------------------------------------------------------------
----
Option Strict On
Option Explicit On
Namespace My.Resources
'This class was auto-generated by the
26. StronglyTypedResourceBuilder
'class via a tool like ResGen or Visual Studio.
'To add or remove a member, edit your .ResX file then rerun
ResGen
'with the /str option, or rebuild your VS project.
'''<summary>
''' A strongly-typed resource class, for looking up localized
strings, etc.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("S
ystem.Resources.Tools.StronglyTypedResourceBuilder",
"4.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
29. End Get
End Property
'''<summary>
''' Overrides the current thread's CurrentUICulture
property for all
''' resource lookups using this strongly typed resource
class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Gl
obal.System.ComponentModel.EditorBrowsableState.Advanced)
> _
Friend Property Culture() As
Global.System.Globalization.CultureInfo
30. Get
Return resourceCulture
End Get
Set(ByVal value As
Global.System.Globalization.CultureInfo)
resourceCulture = value
End Set
End Property
End Module
End Namespace
GroceryApp/My Project/Resources.resx
34. be lost if
' the code is regenerated.
' </auto-generated>
'--------------------------------------------------------------------------
----
Option Strict On
Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGenerated
36. #Region "My.Settings Auto-Save Functionality"
#If _MyType = "WindowsForms" Then
Private Shared addedHandler As Boolean
Private Shared addedHandlerLockObject As New Object
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),
Global.System.ComponentModel.EditorBrowsableAttribute(Glo
bal.System.ComponentModel.EditorBrowsableState.Advanced)>
_
Private Shared Sub AutoSaveSettings(ByVal sender As
Global.System.Object, ByVal e As Global.System.EventArgs)
If My.Application.SaveMySettingsOnExit Then
My.Settings.Save()
37. End If
End Sub
#End If
#End Region
Public Shared ReadOnly Property [Default]() As
MySettings
Get
#If _MyType = "WindowsForms" Then
If Not addedHandler Then
SyncLock addedHandlerLockObject
If Not addedHandler Then
40. Get
Return Global.GroceryApp.My.MySettings.Default
End Get
End Property
End Module
End Namespace
GroceryApp/My Project/Settings.settings
GroceryApp/obj/Debug/DesignTimeResolveAssemblyReference
s.cache
GroceryApp/obj/Debug/DesignTimeResolveAssemblyReference
sInput.cache
GroceryApp/obj/Debug/GroceryApp.exe
44. Overrides the current thread's CurrentUICulture property for
all
resource lookups using this strongly typed resource class.
GroceryApp/obj/Debug/TempPE/My
Project.Resources.Designer.vb.dll
GroceryApp.sln
Microsoft Visual Studio