Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.IO
- Public Class Form1
- Dim dirPath As String = "..\..\..\..\"
- Private Sub cmdExit_Click(sender As Object, e As EventArgs) Handles cmdExit.Click
- Application.Exit()
- End Sub
- Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- Try ' Error detection
- ' List of VB.NET project folders
- Dim dirs As List(Of String) = New List(Of String)(Directory.EnumerateDirectories(dirPath))
- For Each folder In dirs ' Obtain the name of every VB.NET folder
- lstAll.Items.Add(folder.Substring(folder.LastIndexOf("\") + 1)) ' Add folder name to list
- Next
- Catch UAEx As UnauthorizedAccessException ' Error correction I
- MsgBox(UAEx.Message) ' Display the error but don't crash of 2
- Catch PathEx As PathTooLongException ' Error correction II
- MsgBox(PathEx.Message) ' Display the error but don't crash of 2
- End Try
- ' This Section is reserved for all items excluded from the portfolio due to reasons provided. ~David Ambos.
- lstAll.Items.Remove("portfolio") ' portfolio-ception is not needed.
- lstAll.Items.Remove("barCodeCheckDigit") ' incomplete
- lstAll.Items.Remove("ticTacToe") ' incomplete
- lstAll.Items.Remove("statesCapitalsZ") ' Files cannot be found internally or externally, therefore, deemed pointless.
- lstAll.Items.Remove("musicPlayerZ") ' View next one.
- lstAll.Items.Remove("musicPlayer") ' Great Project , but files cannot be found internally or externally either. ( Pointless )
- lstAll.Items.Remove("userAccounts2") '
- lstAll.Items.Remove("sideScrollingSanta") ' incomplete
- lstAll.Items.Remove("UserAccountsCodePM") ' incomplete
- lstAll.Items.Remove("billOfRights") ' File.IO not found , Can be fixed. (58%)
- lstAll.Items.Remove("babyBlackJack") ' Never honestly or firmly started.
- End Sub
- Private Sub cmdGo_Click(sender As Object, e As EventArgs) Handles cmdGo.Click
- Try ' Error detection
- Dim proc As New System.Diagnostics.Process() ' Setup
- Dim a As String = lstAll.SelectedItem ' Project to run
- Dim b As String = dirPath & a & "\" & a & "\bin\debug\" & a & ".exe" ' Project and filename to run
- proc = Process.Start(b, "") ' Run project
- Catch PathEx As PathTooLongException ' Error correction
- MsgBox(PathEx.Message) ' Display the error but don't crash
- End Try
- End Sub
- Private Sub lstAll_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstAll.SelectedIndexChanged
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement