Advertisement
ambosdavid

portfolio VS Transcript PASTE//P

Mar 25th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.66 KB | None | 0 0
  1. Imports System.IO
  2. Public Class Form1
  3.  
  4. Dim dirPath As String = "..\..\..\..\"
  5. Private Sub cmdExit_Click(sender As Object, e As EventArgs) Handles cmdExit.Click
  6. Application.Exit()
  7. End Sub
  8.  
  9. Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  10. Try ' Error detection
  11. ' List of VB.NET project folders
  12. Dim dirs As List(Of String) = New List(Of String)(Directory.EnumerateDirectories(dirPath))
  13. For Each folder In dirs ' Obtain the name of every VB.NET folder
  14. lstAll.Items.Add(folder.Substring(folder.LastIndexOf("\") + 1)) ' Add folder name to list
  15. Next
  16. Catch UAEx As UnauthorizedAccessException ' Error correction I
  17. MsgBox(UAEx.Message) ' Display the error but don't crash of 2
  18. Catch PathEx As PathTooLongException ' Error correction II
  19. MsgBox(PathEx.Message) ' Display the error but don't crash of 2
  20. End Try
  21. ' This Section is reserved for all items excluded from the portfolio due to reasons provided. ~David Ambos.
  22. lstAll.Items.Remove("portfolio") ' portfolio-ception is not needed.
  23. lstAll.Items.Remove("barCodeCheckDigit") ' incomplete
  24. lstAll.Items.Remove("ticTacToe") ' incomplete
  25. lstAll.Items.Remove("statesCapitalsZ") ' Files cannot be found internally or externally, therefore, deemed pointless.
  26. lstAll.Items.Remove("musicPlayerZ") ' View next one.
  27. lstAll.Items.Remove("musicPlayer") ' Great Project , but files cannot be found internally or externally either. ( Pointless )
  28. lstAll.Items.Remove("userAccounts2") '
  29. lstAll.Items.Remove("sideScrollingSanta") ' incomplete
  30. lstAll.Items.Remove("UserAccountsCodePM") ' incomplete
  31. lstAll.Items.Remove("billOfRights") ' File.IO not found , Can be fixed. (58%)
  32. lstAll.Items.Remove("babyBlackJack") ' Never honestly or firmly started.
  33. End Sub
  34.  
  35. Private Sub cmdGo_Click(sender As Object, e As EventArgs) Handles cmdGo.Click
  36. Try ' Error detection
  37. Dim proc As New System.Diagnostics.Process() ' Setup
  38. Dim a As String = lstAll.SelectedItem ' Project to run
  39. Dim b As String = dirPath & a & "\" & a & "\bin\debug\" & a & ".exe" ' Project and filename to run
  40. proc = Process.Start(b, "") ' Run project
  41. Catch PathEx As PathTooLongException ' Error correction
  42. MsgBox(PathEx.Message) ' Display the error but don't crash
  43. End Try
  44. End Sub
  45.  
  46. Private Sub lstAll_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstAll.SelectedIndexChanged
  47.  
  48. End Sub
  49. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement