Web Developer

Beyond Good & Evil - Akuda Bar Box Code for Mdisk13 (VB.net)


Public Class Form1     Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load         Dim sFso = CreateObject("Scripting.FileSystemObject")         For i As Integer = 0 To 4             If sFso.FileExists("slot" & i & ".sav") Then                 Me.Controls("Button" & i).Enabled = True             Else                 Me.Controls("Button" & i).Enabled = False             End If         Next         sFso = Nothing     End Sub     Private Sub Button0_Click(sender As Object, e As EventArgs) Handles Button0.Click, Button1.Click, Button2.Click, Button3.Click, Button4.Click         Dim savegame As String = sender.Text         Dim alphabet As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"         Dim myFile As IO.FileStream         Dim cod As String = ""         myFile = New IO.FileStream(savegame, IO.FileMode.Open, IO.FileAccess.Read)         For k As Integer = 0 To 3             myFile.Seek(11608 + (k * 4), 0)             cod &= Mid(alphabet, myFile.ReadByte, 1)         Next         myFile = Nothing         mdiskCode.Text = cod         mdiskCode.Visible = True         Akuda.Visible = True     End Sub End Class