2022-11-17 04:03:57 +00:00
|
|
|
|
Module Com_Manual
|
2022-11-09 00:02:59 +00:00
|
|
|
|
Public Sub Manual(Command As String)
|
|
|
|
|
'MAN command starts with this kinda format
|
|
|
|
|
'ShiftOS Help Manual
|
|
|
|
|
'
|
|
|
|
|
''command' Usage: [switch/value if needed]
|
|
|
|
|
'
|
|
|
|
|
'Summary of the command's action
|
|
|
|
|
'
|
|
|
|
|
'Example usage : command
|
2022-11-13 14:22:42 +00:00
|
|
|
|
NewLine("ShiftOS Help Manual")
|
|
|
|
|
NewLine(Nothing)
|
2022-11-09 00:02:59 +00:00
|
|
|
|
'Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & command.Substring(4)
|
|
|
|
|
Dim mancommand As String = Command.Replace("man ", "")
|
|
|
|
|
Dim TempUsage As String = "'" & mancommand & "' Usage: "
|
|
|
|
|
Select Case mancommand
|
2022-11-14 05:11:31 +00:00
|
|
|
|
'In process to convert every command from printing from code to printing from text file
|
2022-11-09 00:02:59 +00:00
|
|
|
|
Case "bc"
|
|
|
|
|
If Strings.AvailableFeature(9) = "1" Then
|
|
|
|
|
TempUsage = TempUsage & "bc"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_bc & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
End If
|
|
|
|
|
Case "cd"
|
|
|
|
|
If Strings.AvailableFeature(16) = "1" Then
|
|
|
|
|
TempUsage = TempUsage & "cd [DIRECTORY]"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_cd & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
End If
|
|
|
|
|
Case "clear"
|
|
|
|
|
If Strings.AvailableFeature(1) = "1" Then
|
|
|
|
|
TempUsage = TempUsage & "clear"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_clear & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
End If
|
|
|
|
|
Case "color"
|
|
|
|
|
TempUsage = TempUsage & "color [bg][fg]"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_color & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
Case "colors"
|
|
|
|
|
TempUsage = TempUsage & "colors"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_colors & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
Case "cowsay"
|
|
|
|
|
If Strings.AvailableFeature(22) = 1 Then
|
|
|
|
|
TempUsage = TempUsage & "cowsay [STRING]"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_cowsay & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
End If
|
|
|
|
|
Case "codepoint"
|
|
|
|
|
TempUsage = TempUsage & "codepoint"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_codepoint & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
Case "del"
|
|
|
|
|
If Strings.AvailableFeature(16) = 1 Then
|
|
|
|
|
TempUsage = TempUsage & "del [FILENAME.TXT]"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_del & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
End If
|
|
|
|
|
Case "dir"
|
|
|
|
|
If Strings.AvailableFeature(16) = "1" Then
|
|
|
|
|
TempUsage = TempUsage & "dir"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_dir & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
End If
|
|
|
|
|
Case "guess"
|
|
|
|
|
TempUsage = TempUsage & "guess"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_guess & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
Case "help"
|
|
|
|
|
TempUsage = TempUsage & "help"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_help & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
Case "hostname"
|
|
|
|
|
If Strings.AvailableFeature(20) = 1 Then
|
|
|
|
|
TempUsage = TempUsage & "hostname [HOSTNAME]"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_hostname & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
End If
|
|
|
|
|
Case "infobar"
|
|
|
|
|
If Strings.AvailableFeature(4) = 1 Then
|
|
|
|
|
TempUsage = TempUsage & "infobar [ON|OFF] [OPTION]"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_infobar & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
End If
|
|
|
|
|
Case "man"
|
|
|
|
|
If Strings.AvailableFeature(0) = "1" Then
|
|
|
|
|
TempUsage = TempUsage & "man [command]"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_man & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
End If
|
|
|
|
|
Case "mkdir"
|
|
|
|
|
If Strings.AvailableFeature(16) = "1" Then
|
|
|
|
|
TempUsage = TempUsage & "mkdir [DIRECTORY]"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_mkdir & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
End If
|
|
|
|
|
Case "print"
|
|
|
|
|
If Strings.AvailableFeature(2) = "1" Then
|
|
|
|
|
TempUsage = TempUsage & "print [text]"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_print & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
End If
|
|
|
|
|
Case "pwd"
|
|
|
|
|
If Strings.AvailableFeature(16) = "1" Then
|
|
|
|
|
TempUsage = TempUsage & "pwd"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_pwd & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
End If
|
|
|
|
|
Case "reboot"
|
|
|
|
|
TempUsage = TempUsage & "reboot"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_reboot & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
Case "rmdir"
|
|
|
|
|
If Strings.AvailableFeature(16) = "1" Then
|
|
|
|
|
TempUsage = TempUsage & "rmdir [DIRECTORY]"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_rmdir & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
End If
|
|
|
|
|
Case "shiftfetch"
|
|
|
|
|
If Strings.AvailableFeature(8) = "1" Then
|
|
|
|
|
TempUsage = TempUsage & "shiftfetch"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_shiftfetch & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
End If
|
|
|
|
|
Case "shiftorium"
|
|
|
|
|
TempUsage = TempUsage & "shiftorium [option] [featureName]"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_shiftorium & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
Case "shutdown"
|
|
|
|
|
TempUsage = TempUsage & "shutdown"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_shutdown & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
Case "textpad"
|
|
|
|
|
If Strings.AvailableFeature(17) = "1" Then
|
|
|
|
|
TempUsage = TempUsage & "textpad [FILENAME.TXT]"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_textpad & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
End If
|
|
|
|
|
Case "time"
|
|
|
|
|
If Strings.AvailableFeature(17) = "1" Then
|
|
|
|
|
TempUsage = TempUsage & "time"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_time & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
End If
|
|
|
|
|
Case "username"
|
|
|
|
|
If Strings.AvailableFeature(19) = "1" Then
|
|
|
|
|
TempUsage = TempUsage & "username"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_username & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
End If
|
|
|
|
|
Case "ver"
|
|
|
|
|
TempUsage = TempUsage & "ver"
|
2022-11-13 08:15:05 +00:00
|
|
|
|
Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_ver & Environment.NewLine
|
|
|
|
|
Console.BadCommand = False
|
2022-11-09 00:02:59 +00:00
|
|
|
|
Case Else
|
2022-11-13 14:22:42 +00:00
|
|
|
|
NewLine("MAN : Invalid command")
|
2022-11-09 00:02:59 +00:00
|
|
|
|
End Select
|
|
|
|
|
End Sub
|
2022-11-08 23:30:53 +00:00
|
|
|
|
End Module
|