Ja hey Leute ich mache gerade sowas wie ein Betriebssystem wo ich gerne ein Account System machen möchte
Die Account Details sind dann in C:\ACCOUNTS so hätte ich das auch gernen nur das es halt funktioniert
Kann mir jemand helfen????
ich hatte schonmal einen Code der aber nicht gefunzt hat!
HILFE oder ein TUTORIAL wäre nett von euch!
Die Account Details sind dann in C:\ACCOUNTS so hätte ich das auch gernen nur das es halt funktioniert
Kann mir jemand helfen????
ich hatte schonmal einen Code der aber nicht gefunzt hat!
VB.NET-Quellcode
- Public Class Form1
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- If My.Computer.FileSystem.DirectoryExists("C:\ACCOUNTS") = True Then
- Else
- End If
- If TextBox1.Text = "" Then
- MsgBox("Error dein Account muss mindestens 1 Buchstaben haben!", MsgBoxStyle.Critical)
- Else
- MkDir("C:\ACCOUNTS" + TextBox1.Text)
- Dim username As New System.IO.StreamWriter("C:\ACCOUNTS" + TextBox1.Text + "\" + "username.txt")
- username.Write(TextBox1.Text)
- username.Close()
- Dim password As New System.IO.StreamWriter("C:\ACCOUNTS" + TextBox1.Text + "\" + "password.txt")
- password.Write(TextBox2.Text)
- password.Close()
- MsgBox("Account Erstellt", MsgBoxStyle.Information)
- End If
- End Sub
- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
- If TextBox1.Text = "" Then
- MsgBox("Error, You Need at least one Letter", MsgBoxStyle.Critical)
- Else
- If My.Computer.FileSystem.DirectoryExists("C:\ACCOUNTS" + TextBox1.Text + "\") Then
- Dim USERREAD As System.IO.StreamReader = New System.IO.StreamReader("C:\ACCOUNTS" + TextBox1.Text + "USERNAME.TXT")
- Dim userline As String
- Dim PASSREAD As System.IO.StreamReader = New System.IO.StreamReader("C:\ACCOUNTS" + TextBox1.Text + "PASSWORD.TXT")
- Dim passline As String
- Do
- passline = TextBox2.Text
- userline = USERREAD.ReadLine
- Console.WriteLine(passline)
- Console.WriteLine(userline)
- Loop Until userline Is Nothing
- If TextBox2.Text = "" Then
- MsgBox("Error, Please Input a Password", MsgBoxStyle.Critical)
- Else
- If passline = PASSREAD.ReadLine() = True Then
- MsgBox("Wilkommen in BeLuX 2011 " + TextBox1.Text)
- End If
- End If
- Else
- MsgBox("Der Username existiert nicht!", MsgBoxStyle.Critical)
- End If
- End If
- End Sub
- End Class
HILFE oder ein TUTORIAL wäre nett von euch!