Advertisement
Guest User

Untitled

a guest
Sep 27th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. Public Shared Function ParseArguments(ByVal args() As String) As Boolean
  2. Dim run As Boolean = True
  3. Dim arg As String
  4. For Each arg In args
  5. Select Case Mid(arg, 1, 2)
  6. Case "-u"
  7. m_username = Mid(arg, 3)
  8. Case "-p"
  9. m_password = Mid(arg, 3)
  10. Case "-h"
  11. m_host = Mid(arg, 3)
  12. Case "-f"
  13. m_hostfile = Mid(arg, 3)
  14. Case "-v"
  15. Select Case Mid(arg, 3, 1).ToUpper
  16. Case "E"
  17. m_visualstyle = VisualStyles.Enable
  18. Case "D"
  19. m_visualstyle = VisualStyles.Disable
  20. Case Else
  21. m_visualstyle = VisualStyles.Auto
  22. End Select
  23. Case "-b"
  24. m_startupbenchmark = True
  25. Case "-m"
  26. m_allowmultipleinstances = True
  27. Case Else
  28. End Select
  29. Next
  30.  
  31. Return run
  32. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement