]> fbox.kageds.com Git - NEATEST.git/blob - NEA/mainwindow.xaml.vb
Change icon in Games Table from Attachment to OLE Object
[NEATEST.git] / NEA / mainwindow.xaml.vb
1 
2 Class MainWindow
3 Private Sub BtnLogIn_Click(sender As Object, e As RoutedEventArgs) Handles btnLogIn.Click
4 Dim ds As New NEADataSet
5 Dim dr As System.Data.DataRow
6 Dim da As New NEADataSetTableAdapters.UsersTableAdapter
7 Dim dt As System.Data.DataTable
8 dt = ds.Tables("Users")
9 da.fill(dt)
10 For Each dr In dt.Rows
11 If String.Compare(dr("Username"), txtUserName.Text) = 0 And String.Compare(dr("Password"), txtPassword.Text) = 0 Then
12 If chkRememberMe.IsChecked = True Then
13 Dim file As System.IO.StreamWriter
14 file = My.Computer.FileSystem.OpenTextFileWriter("CheckedBox.txt", True)
15 file.WriteLine("Checked")
16 file.Close()
17 Dim A = New Store()
18 A.Show()
19 Me.Close()
20 Else
21 Dim A = New Store()
22 A.Show()
23 Dim P = New fmProfile()
24 P.Show()
25 Me.Close()
26 End If
27 GoTo LineBreak
28 End If
29 Next
30 MsgBox("Your username or password is incorrect!", vbExclamation)
31 LineBreak:
32 ds.Dispose()
33 End Sub
34
35 Private Sub BtnSignUp_Click(sender As Object, e As RoutedEventArgs) Handles btnSignUp.Click
36 Dim A = New Signup()
37 A.show()
38 Me.Close()
39 End Sub
40
41 ' Private Sub txtUserName_MouseEnter(sender As Object, e As MouseEventArgs) Handles txtUserName.MouseEnter
42 ' If txtUserName.Text = "Username" Then
43 ' txtUserName.Text = ""
44 ' End If
45 'End Sub
46 '
47 ' Private Sub txtUserName_MouseLeave(sender As Object, e As MouseEventArgs) Handles txtUserName.MouseLeave
48 ' If txtUserName.Text = "" Then
49 ' txtUserName.Text = "Username"
50 'End If
51 'End Sub
52
53 ' Private Sub txtPassword_MouseEnter(sender As Object, e As MouseEventArgs) Handles txtPassword.MouseEnter
54 ' If txtPassword.Text = "Password" Then
55 ' txtPassword.Text = ""
56 ' End If
57 'End Sub
58
59 ' Private Sub txtPassword_MouseLeave(sender As Object, e As MouseEventArgs) Handles txtPassword.MouseLeave
60 ' If txtPassword.Text = "" Then
61 ' txtPassword.Text = "Password"
62 'End If
63 ' End Sub
64 End Class