From 415ee1e40d41886cb7ccf23ee004c7fa67dd7418 Mon Sep 17 00:00:00 2001 From: EverythingWindows Date: Wed, 16 Nov 2022 08:28:22 +0700 Subject: More enhanced code management and DesktopEnvironment experiments --- ShiftOS-TheRevival/API/ConsoleAPI.vb | 10 + ShiftOS-TheRevival/API/TerminalAPI.vb | 11 +- ShiftOS-TheRevival/Functions/InGame/Terminate.vb | 15 + ShiftOS-TheRevival/MainForms/Console.vb | 3 +- .../DesktopEnvironment/master/Desktop.Designer.vb | 43 +++ .../DesktopEnvironment/master/Desktop.resx | 120 ++++++++ .../MainForms/DesktopEnvironment/master/Desktop.vb | 3 + .../DesktopEnvironment/master/DesktopManager.vb | 12 + ShiftOS-TheRevival/ShiftOS-TheRevival.vbproj | 49 ++-- .../Terminal Applications/External/App_TextPad.vb | 34 --- .../External/TerminalExternalApps.vb | 301 --------------------- .../Terminal Applications/Internal/Com_05tray.vb | 7 - .../Internal/Com_Codepoint.vb | 5 - .../Terminal Applications/Internal/Com_Cowsay.vb | 85 ------ .../Terminal Applications/Internal/Com_Date.vb | 40 --- .../Terminal Applications/Internal/Com_Help.vb | 110 -------- .../Terminal Applications/Internal/Com_Hostname.vb | 6 - .../Terminal Applications/Internal/Com_Infobar.vb | 25 -- .../Terminal Applications/Internal/Com_Pwd.vb | 5 - .../Terminal Applications/Internal/Com_Rev.vb | 5 - .../Internal/Com_Shiftfetch.vb | 32 --- .../Internal/Com_Shiftorium.vb | 18 -- .../Terminal Applications/Internal/Com_Su.vb | 10 - .../Terminal Applications/Internal/Com_Time.vb | 25 -- .../Terminal Applications/Internal/Com_Username.vb | 6 - .../Terminal Applications/Internal/Com_Ver.vb | 5 - .../Internal/TerminalInternalApps.vb | 168 ------------ .../TerminalApplications/External/App_TextPad.vb | 34 +++ .../External/TerminalExternalApps.vb | 301 +++++++++++++++++++++ .../TerminalApplications/Internal/Com_05tray.vb | 7 + .../TerminalApplications/Internal/Com_Codepoint.vb | 5 + .../TerminalApplications/Internal/Com_Cowsay.vb | 85 ++++++ .../TerminalApplications/Internal/Com_Date.vb | 40 +++ .../TerminalApplications/Internal/Com_Help.vb | 110 ++++++++ .../TerminalApplications/Internal/Com_Hostname.vb | 6 + .../TerminalApplications/Internal/Com_Infobar.vb | 25 ++ .../TerminalApplications/Internal/Com_Pwd.vb | 5 + .../TerminalApplications/Internal/Com_Rev.vb | 5 + .../Internal/Com_Shiftfetch.vb | 32 +++ .../Internal/Com_Shiftorium.vb | 18 ++ .../TerminalApplications/Internal/Com_Su.vb | 10 + .../TerminalApplications/Internal/Com_Time.vb | 25 ++ .../TerminalApplications/Internal/Com_Username.vb | 6 + .../TerminalApplications/Internal/Com_Ver.vb | 5 + .../Internal/TerminalInternalApps.vb | 168 ++++++++++++ 45 files changed, 1126 insertions(+), 914 deletions(-) create mode 100644 ShiftOS-TheRevival/Functions/InGame/Terminate.vb create mode 100644 ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.Designer.vb create mode 100644 ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.resx create mode 100644 ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.vb create mode 100644 ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/DesktopManager.vb delete mode 100644 ShiftOS-TheRevival/Terminal Applications/External/App_TextPad.vb delete mode 100644 ShiftOS-TheRevival/Terminal Applications/External/TerminalExternalApps.vb delete mode 100644 ShiftOS-TheRevival/Terminal Applications/Internal/Com_05tray.vb delete mode 100644 ShiftOS-TheRevival/Terminal Applications/Internal/Com_Codepoint.vb delete mode 100644 ShiftOS-TheRevival/Terminal Applications/Internal/Com_Cowsay.vb delete mode 100644 ShiftOS-TheRevival/Terminal Applications/Internal/Com_Date.vb delete mode 100644 ShiftOS-TheRevival/Terminal Applications/Internal/Com_Help.vb delete mode 100644 ShiftOS-TheRevival/Terminal Applications/Internal/Com_Hostname.vb delete mode 100644 ShiftOS-TheRevival/Terminal Applications/Internal/Com_Infobar.vb delete mode 100644 ShiftOS-TheRevival/Terminal Applications/Internal/Com_Pwd.vb delete mode 100644 ShiftOS-TheRevival/Terminal Applications/Internal/Com_Rev.vb delete mode 100644 ShiftOS-TheRevival/Terminal Applications/Internal/Com_Shiftfetch.vb delete mode 100644 ShiftOS-TheRevival/Terminal Applications/Internal/Com_Shiftorium.vb delete mode 100644 ShiftOS-TheRevival/Terminal Applications/Internal/Com_Su.vb delete mode 100644 ShiftOS-TheRevival/Terminal Applications/Internal/Com_Time.vb delete mode 100644 ShiftOS-TheRevival/Terminal Applications/Internal/Com_Username.vb delete mode 100644 ShiftOS-TheRevival/Terminal Applications/Internal/Com_Ver.vb delete mode 100644 ShiftOS-TheRevival/Terminal Applications/Internal/TerminalInternalApps.vb create mode 100644 ShiftOS-TheRevival/TerminalApplications/External/App_TextPad.vb create mode 100644 ShiftOS-TheRevival/TerminalApplications/External/TerminalExternalApps.vb create mode 100644 ShiftOS-TheRevival/TerminalApplications/Internal/Com_05tray.vb create mode 100644 ShiftOS-TheRevival/TerminalApplications/Internal/Com_Codepoint.vb create mode 100644 ShiftOS-TheRevival/TerminalApplications/Internal/Com_Cowsay.vb create mode 100644 ShiftOS-TheRevival/TerminalApplications/Internal/Com_Date.vb create mode 100644 ShiftOS-TheRevival/TerminalApplications/Internal/Com_Help.vb create mode 100644 ShiftOS-TheRevival/TerminalApplications/Internal/Com_Hostname.vb create mode 100644 ShiftOS-TheRevival/TerminalApplications/Internal/Com_Infobar.vb create mode 100644 ShiftOS-TheRevival/TerminalApplications/Internal/Com_Pwd.vb create mode 100644 ShiftOS-TheRevival/TerminalApplications/Internal/Com_Rev.vb create mode 100644 ShiftOS-TheRevival/TerminalApplications/Internal/Com_Shiftfetch.vb create mode 100644 ShiftOS-TheRevival/TerminalApplications/Internal/Com_Shiftorium.vb create mode 100644 ShiftOS-TheRevival/TerminalApplications/Internal/Com_Su.vb create mode 100644 ShiftOS-TheRevival/TerminalApplications/Internal/Com_Time.vb create mode 100644 ShiftOS-TheRevival/TerminalApplications/Internal/Com_Username.vb create mode 100644 ShiftOS-TheRevival/TerminalApplications/Internal/Com_Ver.vb create mode 100644 ShiftOS-TheRevival/TerminalApplications/Internal/TerminalInternalApps.vb diff --git a/ShiftOS-TheRevival/API/ConsoleAPI.vb b/ShiftOS-TheRevival/API/ConsoleAPI.vb index 7021e2e..c7b83d8 100644 --- a/ShiftOS-TheRevival/API/ConsoleAPI.vb +++ b/ShiftOS-TheRevival/API/ConsoleAPI.vb @@ -1,4 +1,14 @@ Module ConsoleAPI + + Public Sub Console_Windowed() + Console.WindowState = FormWindowState.Normal + End Sub + + Public Sub Console_Full() + Console.FormBorderStyle = FormBorderStyle.None + Console.WindowState = FormWindowState.Maximized + End Sub + Public Sub NewLine(str As String) Console.TextBox1.Text = Console.TextBox1.Text & Environment.NewLine & str End Sub diff --git a/ShiftOS-TheRevival/API/TerminalAPI.vb b/ShiftOS-TheRevival/API/TerminalAPI.vb index c77524b..e9b7bde 100644 --- a/ShiftOS-TheRevival/API/TerminalAPI.vb +++ b/ShiftOS-TheRevival/API/TerminalAPI.vb @@ -170,13 +170,10 @@ Console.BadCommand = False Undeveloped() Case "shutdown", "shut down" - NewLine("Saving game...") - If Strings.OnceInfo(6) = "story" Then - SaveGame() - End If - Cursor.Show() - ShiftOSMenu.Show() - Console.Close() + TerminateShiftOS() + Case "startx" + StartX() + Console_Windowed() Case "textpad" If Strings.AvailableFeature(17) = "1" Then TextPad_WarnFile() diff --git a/ShiftOS-TheRevival/Functions/InGame/Terminate.vb b/ShiftOS-TheRevival/Functions/InGame/Terminate.vb new file mode 100644 index 0000000..9654185 --- /dev/null +++ b/ShiftOS-TheRevival/Functions/InGame/Terminate.vb @@ -0,0 +1,15 @@ +Module Terminate + Public Sub TerminateShiftOS() + NewLine("Stopping the Window Manager...") + StopX() + Console_Full() + If Strings.OnceInfo(6) = "story" Then + NewLine("Saving game...") + SaveGame() + End If + Cursor.Show() + NewLine("Shutting down...") + ShiftOSMenu.Show() + Console.Close() + End Sub +End Module diff --git a/ShiftOS-TheRevival/MainForms/Console.vb b/ShiftOS-TheRevival/MainForms/Console.vb index 79dae40..0e38d0e 100644 --- a/ShiftOS-TheRevival/MainForms/Console.vb +++ b/ShiftOS-TheRevival/MainForms/Console.vb @@ -16,8 +16,7 @@ Public Class Console Public ShOSKey As String Private Sub Console_Load(sender As Object, e As EventArgs) Handles MyBase.Load - FormBorderStyle = FormBorderStyle.None - WindowState = FormWindowState.Maximized + Console_Full() Cursor.Hide() InitializeTerminal() End Sub diff --git a/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.Designer.vb b/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.Designer.vb new file mode 100644 index 0000000..ac5d776 --- /dev/null +++ b/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.Designer.vb @@ -0,0 +1,43 @@ + _ +Partial Class Desktop + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.SuspendLayout() + ' + 'Desktop + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.BackColor = System.Drawing.Color.Red + Me.ClientSize = New System.Drawing.Size(800, 450) + Me.ForeColor = System.Drawing.Color.White + Me.Name = "Desktop" + Me.ShowIcon = False + Me.ShowInTaskbar = False + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Desktop" + Me.TopMost = True + Me.ResumeLayout(False) + + End Sub +End Class diff --git a/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.resx b/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.vb b/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.vb new file mode 100644 index 0000000..4ddf223 --- /dev/null +++ b/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.vb @@ -0,0 +1,3 @@ +Public Class Desktop + +End Class \ No newline at end of file diff --git a/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/DesktopManager.vb b/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/DesktopManager.vb new file mode 100644 index 0000000..8250340 --- /dev/null +++ b/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/DesktopManager.vb @@ -0,0 +1,12 @@ +Module DesktopManager + Public Sub StartX() + Desktop.Show() + Desktop.TopMost = False + Desktop.FormBorderStyle = FormBorderStyle.None + Desktop.WindowState = FormWindowState.Maximized + End Sub + + Public Sub StopX() + Desktop.Close() + End Sub +End Module diff --git a/ShiftOS-TheRevival/ShiftOS-TheRevival.vbproj b/ShiftOS-TheRevival/ShiftOS-TheRevival.vbproj index 9052206..cb0c8b3 100644 --- a/ShiftOS-TheRevival/ShiftOS-TheRevival.vbproj +++ b/ShiftOS-TheRevival/ShiftOS-TheRevival.vbproj @@ -93,6 +93,7 @@ + BugSlap.vb @@ -112,6 +113,13 @@ Form + + Desktop.vb + + + Form + + Epilepsy.vb @@ -149,24 +157,24 @@ - - + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -184,7 +192,7 @@ Settings.settings True - + @@ -196,6 +204,9 @@ DebugWindow.vb + + Desktop.vb + Epilepsy.vb @@ -233,6 +244,8 @@ + + diff --git a/ShiftOS-TheRevival/Terminal Applications/External/App_TextPad.vb b/ShiftOS-TheRevival/Terminal Applications/External/App_TextPad.vb deleted file mode 100644 index 80e9599..0000000 --- a/ShiftOS-TheRevival/Terminal Applications/External/App_TextPad.vb +++ /dev/null @@ -1,34 +0,0 @@ -Imports System.IO - -Module App_TextPad - Public Sub TextPad_CheckExist(TxtFileName As String) - If File.Exists(Console.CurrentDirectory & "\" & TxtFileName) = True Then - Console.TextBox1.Text = My.Computer.FileSystem.ReadAllText(Console.CurrentDirectory & "\" & TxtFileName) - End If - End Sub - - Public Sub TextPad_GenerateCP_SavedFile() - Select Case Console.TextBox1.TextLength - Case 1 To 9 - Dim GetCP As New Random - Dim GotCP As Integer = GetCP.Next(1, 3) - ChangeCP(True, GotCP) - Case 10 To 99 - Dim GetCP As New Random - Dim GotCP As Integer = GetCP.Next(4, 26) - ChangeCP(True, GotCP) - Case 100 To 999 - Dim GetCP As New Random - Dim GotCP As Integer = GetCP.Next(27, 251) - ChangeCP(True, GotCP) - Case 1000 To 9999 - Dim GetCP As New Random - Dim GotCP As Integer = GetCP.Next(252, 2501) - ChangeCP(True, GotCP) - End Select - End Sub - - Public Sub TextPad_WarnFile() - NewLine("Type any filename after 'textpad'!, ex: textpad text.txt") - End Sub -End Module diff --git a/ShiftOS-TheRevival/Terminal Applications/External/TerminalExternalApps.vb b/ShiftOS-TheRevival/Terminal Applications/External/TerminalExternalApps.vb deleted file mode 100644 index 24a6435..0000000 --- a/ShiftOS-TheRevival/Terminal Applications/External/TerminalExternalApps.vb +++ /dev/null @@ -1,301 +0,0 @@ -Imports System.IO - -Module TerminalExternalApps - Public ShouldChange As Boolean = False - Public KeyInput As Keys - 'This is for GTN's RAM - Public TheNumber As Integer = 0 - Public FreezeText As String - 'Basic Calculator's RAM - Public BC_ReadNumbers As Integer - Public BC_Numbers1 As String - Public BC_Numbers2 As String - Public BC_ThriceMoreValue As Integer - Public BC_ThriceMoreCount As Integer - Public BC_CurrentNumber As String - Public BC_Result As Integer - Public BC_Operation2 As String - 'TextPad's RAM - Public TextPad_FileName As String - Public TextPad_TempText As New Timer - - Public Sub ChangeCP(Addition As Boolean, NeededCP As Integer) - Dim TempCP As Integer = Convert.ToInt32(Strings.ComputerInfo(2)) - If Addition = True Then - TempCP = TempCP + NeededCP - Else - TempCP = TempCP - NeededCP - End If - Strings.ComputerInfo(2) = Convert.ToString(TempCP) - End Sub - - Public Sub AppHost(App As Object, UseToolBar As Boolean) - Select Case App - Case "bc" - Console.DefaultPrompt = "> " - ResetLine("bc (Basic Calcultator)") - NewLine("Copyright, Free Software Foundation.") - NewLine("ShiftOS port by DevX.") - NewLine("This is free software with ABSOLUTELY NO WARRANTY.") - NewLine(Nothing) - Console.CurrentInterpreter = "bc" - ShouldChange = True - Case "guess" 'Guess the Number - Console.DefaultPrompt = "Your answer: " - NewLine("Guess the Number") - NewLine("Guess the correct number between 1 and 50 and you'll get anything between 1 to 10 Codepoints") - NewLine("Type 'exit' to terminate this game") - Console.CurrentInterpreter = "guess" - GTN_GenerateNumber() - ShouldChange = True - 'Revisit Later - 'Case "pause" 'Pause function - ' Terminal.TextBox1.ReadOnly = True - ' Terminal.DefaultPrompt = "Press any key to continue..." - ' Terminal.CurrentInterpreter = "pause" - ' FreezeText = Terminal.TextBox1.Text - ' ShouldChange = True - Case "shiftoriumfx" 'ShiftoriumFX : Advanced Shiftorium - Console.DefaultPrompt = "Navigate> " - Console.CurrentInterpreter = "shiftoriumfx" - ShiftoriumFX_DisplayPackages() - NewLine(Nothing) - NewLine("Type any package you want to investigate") - ShouldChange = True - Case "textpad" - Console.DefaultPrompt = Nothing - Console.TextBox1.Text = Nothing - Console.ToolBarUse = True - Console.CheckFeature() - Console.CurrentInterpreter = "textpad" - TextPad_CheckExist(command) - Console.ToolBar.Text = "TextPad - " & command & Environment.NewLine & "Ctrl-Q Exit | Ctrl-N New | Ctrl-O Open | Ctrl-S Save | F12 Save As" - Console.ReleaseCursor = True - TextRebind() - End Select - If Console.ReleaseCursor = True Then - 'Strings.OnceInfo(5) = Terminal.TrackPos - 'Terminal.TrackPos = Nothing - End If - If ShouldChange = True Then - Console.ChangeInterpreter = True - ShouldChange = False - End If - End Sub - - Public Sub CaptureKeyBinding(KeysInput As Keys) - Select Case KeysInput - Case (Keys.S + Keys.Control) - Select Case Console.CurrentInterpreter - Case "textpad" - If File.Exists(Console.CurrentDirectory & "\" & command) = True Then - Dim TempCompare As String = File.ReadAllText(Console.CurrentDirectory & "\" & command) - If Console.TextBox1.Text = TempCompare Then - - Else - Dim BeforeCP As Integer = Strings.ComputerInfo(2) - SaveFile(command) - TextPad_GenerateCP_SavedFile() - Dim AfterCP As Integer = Strings.ComputerInfo(2) - BeforeCP - Console.ToolBar.Text = "TextPad - " & command & " - You've got " & AfterCP & " Codepoints" & Environment.NewLine & "Ctrl-Q Exit | Ctrl-N New | Ctrl-O Open | Ctrl-S Save | F12 Save As" - End If - Else - Dim BeforeCP As Integer = Strings.ComputerInfo(2) - SaveFile(command) - TextPad_GenerateCP_SavedFile() - Dim AfterCP As Integer = Strings.ComputerInfo(2) - BeforeCP - Console.ToolBar.Text = "TextPad - " & command & " - You've got " & AfterCP & " Codepoints" & Environment.NewLine & "Ctrl-Q Exit | Ctrl-N New | Ctrl-O Open | Ctrl-S Save | F12 Save As" - End If - End Select - Case (Keys.N + Keys.Control) - Select Case Console.CurrentInterpreter - Case "textpad" - Console.TextBox1.Text = Nothing - End Select - End Select - End Sub - - Public Sub TerminateApp(KeyInput As Keys) - Select Case Console.CurrentInterpreter - Case "textpad" - Dim BeforeCP As Integer = Strings.ComputerInfo(2) - If File.Exists(Console.CurrentDirectory & "\" & command) = True Then - Dim TextCompare As String = My.Computer.FileSystem.ReadAllText(Console.CurrentDirectory & "\" & command) - If Console.TextBox1.Text = TextCompare Then - Console.TextBox1.Text = Nothing - Else - SaveFile(command) - TextPad_GenerateCP_SavedFile() - Dim AfterCP As Integer = Strings.ComputerInfo(2) - BeforeCP - Console.TextBox1.Text = "You've got " & AfterCP & " Codepoints" - End If - Else - SaveFile(command) - TextPad_GenerateCP_SavedFile() - Dim AfterCP As Integer = Strings.ComputerInfo(2) - BeforeCP - Console.TextBox1.Text = "You've got " & AfterCP & " Codepoints" - End If - Console.ToolBarUse = False - Console.ChangeInterpreter = False - Console.ReleaseCursor = False - Console.CurrentInterpreter = "terminal" - Console.CheckFeature() - Terminal_AssignPrompt() - Terminal_PrintPrompt() - TextRebind() - Case Else - Console.ToolBarUse = False - Console.ChangeInterpreter = False - Console.ReleaseCursor = False - Console.CurrentInterpreter = "terminal" - Console.CheckFeature() - Terminal_AssignPrompt() - Terminal_PrintPrompt() - TextRebind() - End Select - End Sub - - Public Sub DoChildCommand() - Select Case Console.CurrentInterpreter - Case "guess" - Select Case command - Case "exit" - TerminateApp(Nothing) - Case Else - Try - GTN_CheckNumber() - Catch ex As Exception - NewLine("Invalid value!") - End Try - End Select - Case "shiftoriumfx" - Select Case command - Case "" - - Case "exit" - TerminateApp(Nothing) - Case Else - ShiftoriumFX_DisplayPackages() - NewLine(Nothing) - NewLine("Type any package you want to investigate") - NewLine("Invalid package or bad command") - End Select - Case "bc" - Select Case command - Case "jim" - NewLine("69, the funni number") - NewLine("gotcha!") - Case "ojas" - NewLine("dis calculator is very gud") - NewLine("it counts from another universe") - Case "exit" - TerminateApp(Nothing) - Case Else - BC_ReadNumbers = 0 - BC_ThriceMoreValue = 1 - BC_Numbers1 = Nothing - BC_Numbers2 = Nothing - BC_Operation2 = Nothing - BC_CurrentNumber = Nothing - BC_Result = Nothing - Dim GetText As String - Try - Do - GetText = command.Chars(BC_ReadNumbers) - Select Case GetText - Case "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" - BC_CurrentNumber = BC_CurrentNumber & GetText - Case "+", "-", "*", "/", "^" - Dim BC_Numbers3 As Integer - Select Case BC_ThriceMoreValue - Case 1 - BC_Numbers1 = BC_CurrentNumber - BC_CurrentNumber = Nothing - BC_Operation2 = GetText - BC_ThriceMoreValue = BC_ThriceMoreValue + 1 - Case >= 2 - BC_Numbers2 = BC_CurrentNumber - BC_Counting(BC_Numbers1, BC_Numbers2, BC_Operation2) - BC_Numbers3 = BC_Result - BC_Numbers1 = BC_Numbers3 - BC_Numbers2 = Nothing - BC_CurrentNumber = Nothing - BC_ThriceMoreValue = BC_ThriceMoreValue + 1 - End Select - BC_Operation2 = GetText - Case "." - NewLine("Decimals aren't supported yet!") - Case Else - 'BC_Counting(BC_Numbers1, BC_Numbers2, BC_Operation2) - End Select - BC_ReadNumbers = BC_ReadNumbers + 1 - Loop - Catch ex As Exception - BC_Numbers2 = BC_CurrentNumber - BC_CurrentNumber = Nothing - End Try - BC_Counting(BC_Numbers1, BC_Numbers2, BC_Operation2) - BC_ThriceMoreValue = Nothing - NewLine(BC_Result) - End Select - End Select - End Sub - - Public Sub BC_Counting(FirstNum As Integer, SecondNum As Integer, Operation As String) - Select Case Operation - Case "+" - BC_Result = FirstNum + SecondNum - Case "-" - BC_Result = FirstNum - SecondNum - Case "*" - BC_Result = FirstNum * SecondNum - Case "/" - BC_Result = FirstNum / SecondNum - Case "^" - BC_Result = FirstNum ^ SecondNum - End Select - End Sub - - Public Sub GTN_GenerateNumber() - Dim RandNum As New Random - TheNumber = RandNum.Next(1, 51) - End Sub - - Public Sub GTN_CheckNumber() - Dim TheirNumber As Integer = Convert.ToInt32(command) - If TheirNumber > 0 And TheirNumber < 51 Then - If TheirNumber = TheNumber Then - Dim GetCP As New Random - Dim GotCP As Integer = GetCP.Next(1, 11) - ChangeCP(True, GotCP) - NewLine("You are correct!, you got " & GotCP & " Codepoint(s)") - NewLine("Guess the new number between 1 and 50.") - GTN_GenerateNumber() - Else - If TheirNumber < TheNumber Then - NewLine("Higher!") - ElseIf TheirNumber > TheNumber Then - NewLine("Lower!") - End If - End If - End If - End Sub - - Public Sub ShOSKey_InputCommand(lastcommand As String) - Console.ShOSKey = lastcommand - End Sub - - Public Sub ShOSKey_Display() - Console.TextBox1.Text = Console.TextBox1.Text & Console.ShOSKey - Try - Console.TrackPos = Console.ShOSKey.Length - Catch ex As Exception - Console.TrackPos = 0 - End Try - End Sub - - Public Sub ShiftoriumFX_DisplayPackages() - Console.TextBox1.Text = "Shiftorium FX!" & Environment.NewLine & "The place to shiftisize the ShiftOS" & Environment.NewLine & Environment.NewLine & "Available Package(s)" - Shiftorium_ListFeatures() - End Sub -End Module diff --git a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_05tray.vb b/ShiftOS-TheRevival/Terminal Applications/Internal/Com_05tray.vb deleted file mode 100644 index 70a8b79..0000000 --- a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_05tray.vb +++ /dev/null @@ -1,7 +0,0 @@ -Module Com_05tray - Public Sub _05tray() - Dim TempCP As Integer = Convert.ToInt32(Strings.ComputerInfo(2)) - TempCP = TempCP + 50 - Strings.ComputerInfo(2) = Convert.ToString(TempCP) - End Sub -End Module diff --git a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Codepoint.vb b/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Codepoint.vb deleted file mode 100644 index e23f372..0000000 --- a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Codepoint.vb +++ /dev/null @@ -1,5 +0,0 @@ -Module Com_Codepoint - Public Sub Codepoint() - NewLine(Strings.ComputerInfo(2) & " Codepoint(s) available in your wallet") - End Sub -End Module diff --git a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Cowsay.vb b/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Cowsay.vb deleted file mode 100644 index 2fd17c1..0000000 --- a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Cowsay.vb +++ /dev/null @@ -1,85 +0,0 @@ -Module Com_Cowsay - Public Sub Cowsay(Say As String) - Select Case Say.Length - Case 1 To 40 - Dim SubtractLength As Integer = Say.Length + 1 - NewLine(" ") - Do - AddLine("_") - SubtractLength = SubtractLength - 1 - If SubtractLength = 0 Then - AddLine("_") - SubtractLength = Say.Length + 1 - Exit Do - End If - Loop - NewLine("< " & Say & " >") - NewLine(" ") - Do - AddLine("-") - SubtractLength = SubtractLength - 1 - If SubtractLength = 0 Then - AddLine("-") - SubtractLength = Say.Length + 1 - Exit Do - End If - Loop - NewLine(" \ ^__^") - NewLine(" \ (oo)\_______") - NewLine(" (__)\ )\/\") - NewLine(" ||----w |") - NewLine(" || ||") - Case 41 To 80 - NewLine(" __________________________________________ ") - NewLine("/ " & Say.Substring(0, 40) & " \") - Say = Say.Substring(40, Say.Length - 40) - NewLine("\ " & Say) - Dim Spaces As Integer = 40 - Say.Length - Do - AddLine(" ") - If Spaces = 0 Then - AddLine("/") - Exit Do - End If - Spaces = Spaces - 1 - Loop - NewLine(" ------------------------------------------ ") - NewLine(" \ ^__^") - NewLine(" \ (oo)\_______") - NewLine(" (__)\ )\/\") - NewLine(" ||----w |") - NewLine(" || ||") - Case >= 81 - NewLine("cowsay: Character limit exceeded") - 'Dim SubtractLength As Integer = Say.Length + 1 - 'Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & " __________________________________________ " - 'Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "/ " & Say.Substring(0, 40) & " \" - 'Dim CurrentLength As Integer = 40 - 'Dim WhatSay As String - 'Dim Spaces As Integer - 'Do - ' Try - ' WhatSay = Say.Substring(CurrentLength, 40) - ' Catch ex As Exception - ' WhatSay = Say.Substring(CurrentLength, (CurrentLength + 40) - Say.Length) - ' End Try - ' Spaces = 40 - WhatSay.Length - ' If Spaces > 0 Then - ' Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "\ " & WhatSay - ' Do - ' Terminal.TextBox1.Text = Terminal.TextBox1.Text & " " - ' If Spaces = 0 Then - ' Terminal.TextBox1.Text = Terminal.TextBox1.Text & "/" - ' Exit Do - ' End If - ' Spaces = Spaces - 1 - ' Loop - ' Exit Do - ' Else - ' Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "| " & WhatSay & " |" - ' CurrentLength = CurrentLength + 40 - ' End If - 'Loop - End Select - End Sub -End Module diff --git a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Date.vb b/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Date.vb deleted file mode 100644 index 81f0822..0000000 --- a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Date.vb +++ /dev/null @@ -1,40 +0,0 @@ -Module Com_Date - Public Sub Terminal_Date() - If Strings.AvailableFeature(24) = 1 Then - NewLine("The date is " & Date.Now.DayOfYear & " days since the first day of the year") - AdvancedCommand = False - Console.BadCommand = False - ElseIf Strings.AvailableFeature(24) = 3 Then - If Strings.AvailableFeature(25) = 1 Then - Dim TheWeek As String = Date.Now.DayOfYear / 7 - NewLine("The date is " & TheWeek.Substring(0, 2) & " weeks since the first week of the year") - AdvancedCommand = False - Console.BadCommand = False - ElseIf Strings.AvailableFeature(25) = 3 Then - If Strings.AvailableFeature(26) = 1 Then - NewLine("The date is " & Date.Now.Month & " months since the first month of the year") - AdvancedCommand = False - Console.BadCommand = False - ElseIf Strings.AvailableFeature(26) = 3 Then - If Strings.AvailableFeature(27) = 1 Then - NewLine("The year is " & Date.Now.Year) - AdvancedCommand = False - Console.BadCommand = False - ElseIf Strings.AvailableFeature(27) = 3 Then - If Strings.AvailableFeature(28) = 1 Then - NewLine("The date is " & Date.Now.Day & "/" & Date.Now.Month) - AdvancedCommand = False - Console.BadCommand = False - ElseIf Strings.AvailableFeature(28) = 3 Then - If Strings.AvailableFeature(29) = 1 Then - NewLine("The date is " & Date.Now.Day & "/" & Date.Now.Month & "/" & Date.Now.Year) - AdvancedCommand = False - Console.BadCommand = False - End If - End If - End If - End If - End If - End If - End Sub -End Module diff --git a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Help.vb b/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Help.vb deleted file mode 100644 index 67d0d41..0000000 --- a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Help.vb +++ /dev/null @@ -1,110 +0,0 @@ -Module Com_Help - Public Sub Help() - NewLine("ShiftOS Help Manual") - NewLine(Nothing) - NewLine("You can type 'help' to get all available commands and its corresponding action.") - If Strings.AvailableFeature(0) = 1 Then - NewLine("To get help on each command, you can type 'man [command]'") - NewLine(Nothing) - Else - NewLine(Nothing) - End If - If Strings.AvailableFeature(9) = 1 Then - NewLine("BC Basic Calculator for simple calculation") - End If - If Strings.AvailableFeature(16) = 1 Then - NewLine("CD Changes directory to a selected one") - End If - If Strings.AvailableFeature(1) = 1 Then - NewLine("CLEAR Clear the terminal") - End If - NewLine("CODEPOINT Display Codepoint(s) from your wallet") - NewLine("COLOR Changes Terminal Text And Background color To the corresponding choice") - NewLine("COLORS Shows available colors support For the terminal") - If Strings.AvailableFeature(22) = 1 Then - NewLine("COWSAY Spawn a cow And saying anything you want") - End If - If Strings.AvailableFeature(24) = 1 Then - NewLine("DATE Displays date in days since first day of the year format") - ElseIf Strings.AvailableFeature(24) = 3 Then - If Strings.AvailableFeature(25) = 1 Then - NewLine("DATE Displays date in weeks since first week of the year format") - ElseIf Strings.AvailableFeature(25) = 3 Then - If Strings.AvailableFeature(26) = 1 Then - NewLine("DATE Displays date in months since first month of the year format") - ElseIf Strings.AvailableFeature(26) = 3 Then - If Strings.AvailableFeature(27) = 1 Then - NewLine("DATE Displays date in year format format") - ElseIf Strings.AvailableFeature(27) = 3 Then - If Strings.AvailableFeature(28) = 1 Then - NewLine("DATE Displays date in MM/YYYY format") - ElseIf Strings.AvailableFeature(28) = 3 Then - If Strings.AvailableFeature(29) = 1 Then - NewLine("DATE Displays date in general DD/MM/YYYY format") - End If - End If - End If - End If - End If - End If - If Strings.AvailableFeature(16) = 1 Then - NewLine("DEL Delete a selected file from the directory") - NewLine("DIR Displays subdirectories And files In a directory") - End If - NewLine("GUESS Runs 'Guess the Number' application") - NewLine("HELP Shows all commands available and its corresponding action") - If Strings.AvailableFeature(20) = 1 Then - NewLine("HOSTNAME Sets the name of current hostname/computer name with a new one") - End If - If Strings.AvailableFeature(4) = 1 Then - NewLine("INFOBAR Displays informations about current session such as current app, current user, current time, etc.") - End If - If Strings.AvailableFeature(0) = 1 Then - NewLine("MAN Shows a command, its corresponding action, and its example usage") - End If - If Strings.AvailableFeature(16) = 1 Then - NewLine("MKDIR Creating a directory") - End If - If Strings.AvailableFeature(16) = 1 Then - NewLine("PWD Display current directory navigated on ShiftOS") - End If - If Strings.AvailableFeature(2) = 1 Then - NewLine("PRINT Prints a corresponding text entered in the command") - End If - NewLine("REBOOT Terminate and re-run ShiftOS session") - If Strings.AvailableFeature(21) = 1 Then - NewLine("REV Turn any sentences you want and making it reversed") - End If - If Strings.AvailableFeature(16) = 1 Then - NewLine("RMDIR Deleting a directory") - End If - If Strings.AvailableFeature(8) = 1 Then - NewLine("SHIFTFETCH Shows informations about your computer") - End If - NewLine("SHIFTORIUM A software center for upgrading features on ShiftOS") - NewLine("SHUTDOWN Terminate ShiftOS session") - NewLine("SU Runs terminal as super user") - If Strings.AvailableFeature(17) = 1 Then - NewLine("TEXTPAD Simple text-editor for ShiftOS") - End If - If Strings.AvailableFeature(5) = 1 Then - NewLine("TIME Display the current time in the form of seconds since midnight") - ElseIf Strings.AvailableFeature(5) = 3 Then - If Strings.AvailableFeature(6) = 1 Then - NewLine("TIME Display the current time in the form of minutes since midnight") - ElseIf Strings.AvailableFeature(6) = 3 Then - If Strings.AvailableFeature(7) = 1 Then - NewLine("TIME Display the current time in the form of hours since midnight") - ElseIf Strings.AvailableFeature(7) = 3 Then - If Strings.AvailableFeature(12) = 1 Then - NewLine("TIME Display the current time in the form of PM and AM format") - End If - End If - End If - End If - If Strings.AvailableFeature(20) = 1 Then - NewLine("USERNAME Sets the name of current user with a new one") - End If - NewLine("VER Printing current version of ShiftOS TheRevival") - End Sub -End Module diff --git a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Hostname.vb b/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Hostname.vb deleted file mode 100644 index 8903069..0000000 --- a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Hostname.vb +++ /dev/null @@ -1,6 +0,0 @@ -Module Com_Hostname - Public Sub Hostname() - Strings.ComputerInfo(0) = command.Substring(command.LastIndexOf(" ") + 1, command.Length - (command.LastIndexOf(" ") + 1)) - Terminal_AssignPrompt() - End Sub -End Module diff --git a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Infobar.vb b/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Infobar.vb deleted file mode 100644 index c067125..0000000 --- a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Infobar.vb +++ /dev/null @@ -1,25 +0,0 @@ -Module Com_Infobar - Public Sub Infobar() - 'Infobar panel-ish and some sort - Dim infobarcommand As String = command.Replace("infobar ", "") - Dim advancedtool As Boolean = True - Select Case infobarcommand - Case "on" - Strings.OnceInfo(2) = "True" - Console.CheckFeature() - Console.BadCommand = False - advancedtool = False - Case "off" - Strings.OnceInfo(2) = "False" - Console.CheckFeature() - Console.BadCommand = False - advancedtool = False - End Select - If advancedtool = True Then - If infobarcommand Like "color *" Then - GetColor("infobar", infobarcommand.Substring(6, 1), infobarcommand.Substring(7, 1)) - Console.BadCommand = False - End If - End If - End Sub -End Module diff --git a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Pwd.vb b/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Pwd.vb deleted file mode 100644 index 2e97969..0000000 --- a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Pwd.vb +++ /dev/null @@ -1,5 +0,0 @@ -Module Com_Pwd - Public Sub Pwd() - NewLine(Console.CurrentDirectory.Replace(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS", "!")) - End Sub -End Module diff --git a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Rev.vb b/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Rev.vb deleted file mode 100644 index b78911f..0000000 --- a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Rev.vb +++ /dev/null @@ -1,5 +0,0 @@ -Module Com_Rev - Public Sub Reverse() - NewLine(StrReverse(RawCommand.Substring(4))) - End Sub -End Module diff --git a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Shiftfetch.vb b/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Shiftfetch.vb deleted file mode 100644 index 569d14d..0000000 --- a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Shiftfetch.vb +++ /dev/null @@ -1,32 +0,0 @@ -Module Com_Shiftfetch - Public Sub Shiftfetch() - If Strings.OnceInfo(0) = "Yes" Then - NewLine(" :^!7?JJJJJ?7!^: root@" & Strings.ComputerInfo(0)) - Else - NewLine(" :^!7?JJJJJ?7!^: " & Strings.ComputerInfo(1) & "@" & Strings.ComputerInfo(0)) - End If - NewLine(" .~?PB###BGP555PGB###BP?~. ----------------------") - NewLine(" .!P#&B57^..:: ^~~!!~^::~7YG!. OS: ShiftOS TheRevival") - NewLine(" .?#@G7: .^ :^::!5&#?. Host: " & Environment.MachineName) - NewLine(" .?#@5^ ! .^!!..J&#? Kernel: " & My.Resources.CurrentVersion) - NewLine(" B@G^ .J : 7?..J@G: Uptime : N/ A") - NewLine(" ~&@Y 7 ~PB&#Y:. ~G7 ~&&^ Packages: " & Strings.ComputerInfo(4)) - NewLine(" ^&@Y Y 5#5??YB@&B~ .GJ :&&: Shell: sos-justshell") - NewLine(" G@B ? 5P ^YB! .#! ~@G Window Manager: -") - NewLine(" ^@@! : @Y .:::^~:. 7# Y@^ Window Manager Theme: -") - NewLine(" 7@@: ! B@&BBBBGPPB@#Y. :&^ ^@? Terminal: shiftos-terminal") - NewLine(" ?@@: 7 :??7~:. 5@@5 :&^ .&? Terminal Font: Consolas, 11pt") - NewLine(" ~@@! !@ G#&B!. Y@@B 7#. Y~ CPU: " & My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0", "ProcessorNameString", Nothing)) - NewLine(" B@G B@J ...~&G. 7@@@? .#? 7 GPU: N/A") - Dim TripleDigitRAM As String - TripleDigitRAM = (My.Computer.Info.TotalPhysicalMemory / 1024 / 1024 / 1024) - NewLine(" ~&@? ^@Y !G#57~~!YB@#Y^ .GP .. Memory: " & TripleDigitRAM.Substring(0, 4) & " GB") - NewLine(" !@@7 ~#J 5#&&BG57^ ~BY Codepoint: " & Strings.ComputerInfo(2)) - NewLine(" ~#@Y .5P~ ^5G~ ") - NewLine(" .J&#! ^JY!:. ^?P5! ") - NewLine(" :J&B?..!JYY7!~::...::~!7Y5Y7: ") - NewLine(" .7PBP?^::~!?JJJJJJJ?7~: ") - NewLine(" .~?55Y?!^:... ") - NewLine(" .:~~^~^^::. ") - End Sub -End Module diff --git a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Shiftorium.vb b/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Shiftorium.vb deleted file mode 100644 index 47fecd1..0000000 --- a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Shiftorium.vb +++ /dev/null @@ -1,18 +0,0 @@ -Module Com_Shiftorium - Public Sub Shiftorium() - Dim prompt As String = command.Replace("shiftorium ", "") - NewLine("Shiftorium ShiftOS Center") - If prompt Like "info *" Then - Shiftoriums.prompt = command.Replace("shiftorium info ", "") - Shiftorium_InformationFeatures() - End If - If prompt Like "install *" Then - Shiftoriums.prompt = command.Replace("shiftorium install ", "") - Shiftorium_DetectInstallFeatures() - End If - If prompt = "list" Then - Shiftorium_ListFeatures() - Console.BadCommand = False - End If - End Sub -End Module diff --git a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Su.vb b/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Su.vb deleted file mode 100644 index 2602187..0000000 --- a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Su.vb +++ /dev/null @@ -1,10 +0,0 @@ -Module Com_Su - Public Sub Terminal_Su() - If Strings.OnceInfo(0) = "Yes" Then - NewLine("You already in root mode!") - Else - Strings.OnceInfo(0) = "Yes" - Terminal_AssignPrompt() - End If - End Sub -End Module diff --git a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Time.vb b/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Time.vb deleted file mode 100644 index 17cc2b3..0000000 --- a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Time.vb +++ /dev/null @@ -1,25 +0,0 @@ -Module Com_Time - Public Sub Terminal_Time() - If Strings.AvailableFeature(5) = 1 Then - NewLine(Math.Floor(Date.Now.Subtract(Date.Today).TotalSeconds) & " seconds passed since midnight") - ElseIf Strings.AvailableFeature(5) = 3 Then - If Strings.AvailableFeature(6) = 1 Then - NewLine(Math.Floor(Date.Now.Subtract(Date.Today).TotalMinutes) & " minutes passed since midnight") - ElseIf Strings.AvailableFeature(6) = 3 Then - If Strings.AvailableFeature(7) = 1 Then - NewLine(Math.Floor(Date.Now.Subtract(Date.Today).TotalHours) & " hours passed since midnight") - ElseIf Strings.AvailableFeature(7) = 3 Then - If Strings.AvailableFeature(12) = 1 Then - If Date.Now.Hour < 12 Then - NewLine("The time is " & TimeOfDay.Hour & " AM") - Else - NewLine("The time is " & TimeOfDay.Hour - 12 & " PM") - End If - ElseIf Strings.AvailableFeature(23) = 1 Then - NewLine("The time is " & TimeOfDay.Hour & ":" & TimeOfDay.Minute) - End If - End If - End If - End If - End Sub -End Module diff --git a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Username.vb b/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Username.vb deleted file mode 100644 index 0f8b4e7..0000000 --- a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Username.vb +++ /dev/null @@ -1,6 +0,0 @@ -Module Com_Username - Public Sub Username() - Strings.ComputerInfo(1) = command.Substring(command.LastIndexOf(" ") + 1, command.Length - (command.LastIndexOf(" ") + 1)) - Terminal_AssignPrompt() - End Sub -End Module diff --git a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Ver.vb b/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Ver.vb deleted file mode 100644 index 8b2de41..0000000 --- a/ShiftOS-TheRevival/Terminal Applications/Internal/Com_Ver.vb +++ /dev/null @@ -1,5 +0,0 @@ -Module Com_Ver - Public Sub Terminal_Version() - NewLine("ShiftOS TheRevival version " & My.Resources.CurrentVersion) - End Sub -End Module diff --git a/ShiftOS-TheRevival/Terminal Applications/Internal/TerminalInternalApps.vb b/ShiftOS-TheRevival/Terminal Applications/Internal/TerminalInternalApps.vb deleted file mode 100644 index f4bba89..0000000 --- a/ShiftOS-TheRevival/Terminal Applications/Internal/TerminalInternalApps.vb +++ /dev/null @@ -1,168 +0,0 @@ -Module TerminalInternalApps - Public Sub Cowsay_Say(Say As String) - - End Sub - - Public Sub DateTerm() - - End Sub - - 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 - NewLine("ShiftOS Help Manual") - NewLine(Nothing) - '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 - 'In process to convert every command from printing from code to printing from text file - Case "bc" - If Strings.AvailableFeature(9) = "1" Then - TempUsage = TempUsage & "bc" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_bc & Environment.NewLine - Console.BadCommand = False - End If - Case "cd" - If Strings.AvailableFeature(16) = "1" Then - TempUsage = TempUsage & "cd [DIRECTORY]" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_cd & Environment.NewLine - Console.BadCommand = False - End If - Case "clear" - If Strings.AvailableFeature(1) = "1" Then - TempUsage = TempUsage & "clear" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_clear & Environment.NewLine - Console.BadCommand = False - End If - Case "color" - TempUsage = TempUsage & "color [bg][fg]" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_color & Environment.NewLine - Console.BadCommand = False - Case "colors" - TempUsage = TempUsage & "colors" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_colors & Environment.NewLine - Console.BadCommand = False - Case "cowsay" - If Strings.AvailableFeature(22) = 1 Then - TempUsage = TempUsage & "cowsay [STRING]" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_cowsay & Environment.NewLine - Console.BadCommand = False - End If - Case "codepoint" - TempUsage = TempUsage & "codepoint" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_codepoint & Environment.NewLine - Console.BadCommand = False - Case "del" - If Strings.AvailableFeature(16) = 1 Then - TempUsage = TempUsage & "del [FILENAME.TXT]" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_del & Environment.NewLine - Console.BadCommand = False - End If - Case "dir" - If Strings.AvailableFeature(16) = "1" Then - TempUsage = TempUsage & "dir" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_dir & Environment.NewLine - Console.BadCommand = False - End If - Case "guess" - TempUsage = TempUsage & "guess" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_guess & Environment.NewLine - Console.BadCommand = False - Case "help" - TempUsage = TempUsage & "help" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_help & Environment.NewLine - Console.BadCommand = False - Case "hostname" - If Strings.AvailableFeature(20) = 1 Then - TempUsage = TempUsage & "hostname [HOSTNAME]" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_hostname & Environment.NewLine - Console.BadCommand = False - End If - Case "infobar" - If Strings.AvailableFeature(4) = 1 Then - TempUsage = TempUsage & "infobar [ON|OFF] [OPTION]" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_infobar & Environment.NewLine - Console.BadCommand = False - End If - Case "man" - If Strings.AvailableFeature(0) = "1" Then - TempUsage = TempUsage & "man [command]" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_man & Environment.NewLine - Console.BadCommand = False - End If - Case "mkdir" - If Strings.AvailableFeature(16) = "1" Then - TempUsage = TempUsage & "mkdir [DIRECTORY]" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_mkdir & Environment.NewLine - Console.BadCommand = False - End If - Case "print" - If Strings.AvailableFeature(2) = "1" Then - TempUsage = TempUsage & "print [text]" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_print & Environment.NewLine - Console.BadCommand = False - End If - Case "pwd" - If Strings.AvailableFeature(16) = "1" Then - TempUsage = TempUsage & "pwd" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_pwd & Environment.NewLine - Console.BadCommand = False - End If - Case "reboot" - TempUsage = TempUsage & "reboot" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_reboot & Environment.NewLine - Console.BadCommand = False - Case "rmdir" - If Strings.AvailableFeature(16) = "1" Then - TempUsage = TempUsage & "rmdir [DIRECTORY]" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_rmdir & Environment.NewLine - Console.BadCommand = False - End If - Case "shiftfetch" - If Strings.AvailableFeature(8) = "1" Then - TempUsage = TempUsage & "shiftfetch" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_shiftfetch & Environment.NewLine - Console.BadCommand = False - End If - Case "shiftorium" - TempUsage = TempUsage & "shiftorium [option] [featureName]" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_shiftorium & Environment.NewLine - Console.BadCommand = False - Case "shutdown" - TempUsage = TempUsage & "shutdown" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_shutdown & Environment.NewLine - Console.BadCommand = False - Case "textpad" - If Strings.AvailableFeature(17) = "1" Then - TempUsage = TempUsage & "textpad [FILENAME.TXT]" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_textpad & Environment.NewLine - Console.BadCommand = False - End If - Case "time" - If Strings.AvailableFeature(17) = "1" Then - TempUsage = TempUsage & "time" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_time & Environment.NewLine - Console.BadCommand = False - End If - Case "username" - If Strings.AvailableFeature(19) = "1" Then - TempUsage = TempUsage & "username" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_username & Environment.NewLine - Console.BadCommand = False - End If - Case "ver" - TempUsage = TempUsage & "ver" - Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_ver & Environment.NewLine - Console.BadCommand = False - Case Else - NewLine("MAN : Invalid command") - End Select - End Sub -End Module diff --git a/ShiftOS-TheRevival/TerminalApplications/External/App_TextPad.vb b/ShiftOS-TheRevival/TerminalApplications/External/App_TextPad.vb new file mode 100644 index 0000000..80e9599 --- /dev/null +++ b/ShiftOS-TheRevival/TerminalApplications/External/App_TextPad.vb @@ -0,0 +1,34 @@ +Imports System.IO + +Module App_TextPad + Public Sub TextPad_CheckExist(TxtFileName As String) + If File.Exists(Console.CurrentDirectory & "\" & TxtFileName) = True Then + Console.TextBox1.Text = My.Computer.FileSystem.ReadAllText(Console.CurrentDirectory & "\" & TxtFileName) + End If + End Sub + + Public Sub TextPad_GenerateCP_SavedFile() + Select Case Console.TextBox1.TextLength + Case 1 To 9 + Dim GetCP As New Random + Dim GotCP As Integer = GetCP.Next(1, 3) + ChangeCP(True, GotCP) + Case 10 To 99 + Dim GetCP As New Random + Dim GotCP As Integer = GetCP.Next(4, 26) + ChangeCP(True, GotCP) + Case 100 To 999 + Dim GetCP As New Random + Dim GotCP As Integer = GetCP.Next(27, 251) + ChangeCP(True, GotCP) + Case 1000 To 9999 + Dim GetCP As New Random + Dim GotCP As Integer = GetCP.Next(252, 2501) + ChangeCP(True, GotCP) + End Select + End Sub + + Public Sub TextPad_WarnFile() + NewLine("Type any filename after 'textpad'!, ex: textpad text.txt") + End Sub +End Module diff --git a/ShiftOS-TheRevival/TerminalApplications/External/TerminalExternalApps.vb b/ShiftOS-TheRevival/TerminalApplications/External/TerminalExternalApps.vb new file mode 100644 index 0000000..24a6435 --- /dev/null +++ b/ShiftOS-TheRevival/TerminalApplications/External/TerminalExternalApps.vb @@ -0,0 +1,301 @@ +Imports System.IO + +Module TerminalExternalApps + Public ShouldChange As Boolean = False + Public KeyInput As Keys + 'This is for GTN's RAM + Public TheNumber As Integer = 0 + Public FreezeText As String + 'Basic Calculator's RAM + Public BC_ReadNumbers As Integer + Public BC_Numbers1 As String + Public BC_Numbers2 As String + Public BC_ThriceMoreValue As Integer + Public BC_ThriceMoreCount As Integer + Public BC_CurrentNumber As String + Public BC_Result As Integer + Public BC_Operation2 As String + 'TextPad's RAM + Public TextPad_FileName As String + Public TextPad_TempText As New Timer + + Public Sub ChangeCP(Addition As Boolean, NeededCP As Integer) + Dim TempCP As Integer = Convert.ToInt32(Strings.ComputerInfo(2)) + If Addition = True Then + TempCP = TempCP + NeededCP + Else + TempCP = TempCP - NeededCP + End If + Strings.ComputerInfo(2) = Convert.ToString(TempCP) + End Sub + + Public Sub AppHost(App As Object, UseToolBar As Boolean) + Select Case App + Case "bc" + Console.DefaultPrompt = "> " + ResetLine("bc (Basic Calcultator)") + NewLine("Copyright, Free Software Foundation.") + NewLine("ShiftOS port by DevX.") + NewLine("This is free software with ABSOLUTELY NO WARRANTY.") + NewLine(Nothing) + Console.CurrentInterpreter = "bc" + ShouldChange = True + Case "guess" 'Guess the Number + Console.DefaultPrompt = "Your answer: " + NewLine("Guess the Number") + NewLine("Guess the correct number between 1 and 50 and you'll get anything between 1 to 10 Codepoints") + NewLine("Type 'exit' to terminate this game") + Console.CurrentInterpreter = "guess" + GTN_GenerateNumber() + ShouldChange = True + 'Revisit Later + 'Case "pause" 'Pause function + ' Terminal.TextBox1.ReadOnly = True + ' Terminal.DefaultPrompt = "Press any key to continue..." + ' Terminal.CurrentInterpreter = "pause" + ' FreezeText = Terminal.TextBox1.Text + ' ShouldChange = True + Case "shiftoriumfx" 'ShiftoriumFX : Advanced Shiftorium + Console.DefaultPrompt = "Navigate> " + Console.CurrentInterpreter = "shiftoriumfx" + ShiftoriumFX_DisplayPackages() + NewLine(Nothing) + NewLine("Type any package you want to investigate") + ShouldChange = True + Case "textpad" + Console.DefaultPrompt = Nothing + Console.TextBox1.Text = Nothing + Console.ToolBarUse = True + Console.CheckFeature() + Console.CurrentInterpreter = "textpad" + TextPad_CheckExist(command) + Console.ToolBar.Text = "TextPad - " & command & Environment.NewLine & "Ctrl-Q Exit | Ctrl-N New | Ctrl-O Open | Ctrl-S Save | F12 Save As" + Console.ReleaseCursor = True + TextRebind() + End Select + If Console.ReleaseCursor = True Then + 'Strings.OnceInfo(5) = Terminal.TrackPos + 'Terminal.TrackPos = Nothing + End If + If ShouldChange = True Then + Console.ChangeInterpreter = True + ShouldChange = False + End If + End Sub + + Public Sub CaptureKeyBinding(KeysInput As Keys) + Select Case KeysInput + Case (Keys.S + Keys.Control) + Select Case Console.CurrentInterpreter + Case "textpad" + If File.Exists(Console.CurrentDirectory & "\" & command) = True Then + Dim TempCompare As String = File.ReadAllText(Console.CurrentDirectory & "\" & command) + If Console.TextBox1.Text = TempCompare Then + + Else + Dim BeforeCP As Integer = Strings.ComputerInfo(2) + SaveFile(command) + TextPad_GenerateCP_SavedFile() + Dim AfterCP As Integer = Strings.ComputerInfo(2) - BeforeCP + Console.ToolBar.Text = "TextPad - " & command & " - You've got " & AfterCP & " Codepoints" & Environment.NewLine & "Ctrl-Q Exit | Ctrl-N New | Ctrl-O Open | Ctrl-S Save | F12 Save As" + End If + Else + Dim BeforeCP As Integer = Strings.ComputerInfo(2) + SaveFile(command) + TextPad_GenerateCP_SavedFile() + Dim AfterCP As Integer = Strings.ComputerInfo(2) - BeforeCP + Console.ToolBar.Text = "TextPad - " & command & " - You've got " & AfterCP & " Codepoints" & Environment.NewLine & "Ctrl-Q Exit | Ctrl-N New | Ctrl-O Open | Ctrl-S Save | F12 Save As" + End If + End Select + Case (Keys.N + Keys.Control) + Select Case Console.CurrentInterpreter + Case "textpad" + Console.TextBox1.Text = Nothing + End Select + End Select + End Sub + + Public Sub TerminateApp(KeyInput As Keys) + Select Case Console.CurrentInterpreter + Case "textpad" + Dim BeforeCP As Integer = Strings.ComputerInfo(2) + If File.Exists(Console.CurrentDirectory & "\" & command) = True Then + Dim TextCompare As String = My.Computer.FileSystem.ReadAllText(Console.CurrentDirectory & "\" & command) + If Console.TextBox1.Text = TextCompare Then + Console.TextBox1.Text = Nothing + Else + SaveFile(command) + TextPad_GenerateCP_SavedFile() + Dim AfterCP As Integer = Strings.ComputerInfo(2) - BeforeCP + Console.TextBox1.Text = "You've got " & AfterCP & " Codepoints" + End If + Else + SaveFile(command) + TextPad_GenerateCP_SavedFile() + Dim AfterCP As Integer = Strings.ComputerInfo(2) - BeforeCP + Console.TextBox1.Text = "You've got " & AfterCP & " Codepoints" + End If + Console.ToolBarUse = False + Console.ChangeInterpreter = False + Console.ReleaseCursor = False + Console.CurrentInterpreter = "terminal" + Console.CheckFeature() + Terminal_AssignPrompt() + Terminal_PrintPrompt() + TextRebind() + Case Else + Console.ToolBarUse = False + Console.ChangeInterpreter = False + Console.ReleaseCursor = False + Console.CurrentInterpreter = "terminal" + Console.CheckFeature() + Terminal_AssignPrompt() + Terminal_PrintPrompt() + TextRebind() + End Select + End Sub + + Public Sub DoChildCommand() + Select Case Console.CurrentInterpreter + Case "guess" + Select Case command + Case "exit" + TerminateApp(Nothing) + Case Else + Try + GTN_CheckNumber() + Catch ex As Exception + NewLine("Invalid value!") + End Try + End Select + Case "shiftoriumfx" + Select Case command + Case "" + + Case "exit" + TerminateApp(Nothing) + Case Else + ShiftoriumFX_DisplayPackages() + NewLine(Nothing) + NewLine("Type any package you want to investigate") + NewLine("Invalid package or bad command") + End Select + Case "bc" + Select Case command + Case "jim" + NewLine("69, the funni number") + NewLine("gotcha!") + Case "ojas" + NewLine("dis calculator is very gud") + NewLine("it counts from another universe") + Case "exit" + TerminateApp(Nothing) + Case Else + BC_ReadNumbers = 0 + BC_ThriceMoreValue = 1 + BC_Numbers1 = Nothing + BC_Numbers2 = Nothing + BC_Operation2 = Nothing + BC_CurrentNumber = Nothing + BC_Result = Nothing + Dim GetText As String + Try + Do + GetText = command.Chars(BC_ReadNumbers) + Select Case GetText + Case "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" + BC_CurrentNumber = BC_CurrentNumber & GetText + Case "+", "-", "*", "/", "^" + Dim BC_Numbers3 As Integer + Select Case BC_ThriceMoreValue + Case 1 + BC_Numbers1 = BC_CurrentNumber + BC_CurrentNumber = Nothing + BC_Operation2 = GetText + BC_ThriceMoreValue = BC_ThriceMoreValue + 1 + Case >= 2 + BC_Numbers2 = BC_CurrentNumber + BC_Counting(BC_Numbers1, BC_Numbers2, BC_Operation2) + BC_Numbers3 = BC_Result + BC_Numbers1 = BC_Numbers3 + BC_Numbers2 = Nothing + BC_CurrentNumber = Nothing + BC_ThriceMoreValue = BC_ThriceMoreValue + 1 + End Select + BC_Operation2 = GetText + Case "." + NewLine("Decimals aren't supported yet!") + Case Else + 'BC_Counting(BC_Numbers1, BC_Numbers2, BC_Operation2) + End Select + BC_ReadNumbers = BC_ReadNumbers + 1 + Loop + Catch ex As Exception + BC_Numbers2 = BC_CurrentNumber + BC_CurrentNumber = Nothing + End Try + BC_Counting(BC_Numbers1, BC_Numbers2, BC_Operation2) + BC_ThriceMoreValue = Nothing + NewLine(BC_Result) + End Select + End Select + End Sub + + Public Sub BC_Counting(FirstNum As Integer, SecondNum As Integer, Operation As String) + Select Case Operation + Case "+" + BC_Result = FirstNum + SecondNum + Case "-" + BC_Result = FirstNum - SecondNum + Case "*" + BC_Result = FirstNum * SecondNum + Case "/" + BC_Result = FirstNum / SecondNum + Case "^" + BC_Result = FirstNum ^ SecondNum + End Select + End Sub + + Public Sub GTN_GenerateNumber() + Dim RandNum As New Random + TheNumber = RandNum.Next(1, 51) + End Sub + + Public Sub GTN_CheckNumber() + Dim TheirNumber As Integer = Convert.ToInt32(command) + If TheirNumber > 0 And TheirNumber < 51 Then + If TheirNumber = TheNumber Then + Dim GetCP As New Random + Dim GotCP As Integer = GetCP.Next(1, 11) + ChangeCP(True, GotCP) + NewLine("You are correct!, you got " & GotCP & " Codepoint(s)") + NewLine("Guess the new number between 1 and 50.") + GTN_GenerateNumber() + Else + If TheirNumber < TheNumber Then + NewLine("Higher!") + ElseIf TheirNumber > TheNumber Then + NewLine("Lower!") + End If + End If + End If + End Sub + + Public Sub ShOSKey_InputCommand(lastcommand As String) + Console.ShOSKey = lastcommand + End Sub + + Public Sub ShOSKey_Display() + Console.TextBox1.Text = Console.TextBox1.Text & Console.ShOSKey + Try + Console.TrackPos = Console.ShOSKey.Length + Catch ex As Exception + Console.TrackPos = 0 + End Try + End Sub + + Public Sub ShiftoriumFX_DisplayPackages() + Console.TextBox1.Text = "Shiftorium FX!" & Environment.NewLine & "The place to shiftisize the ShiftOS" & Environment.NewLine & Environment.NewLine & "Available Package(s)" + Shiftorium_ListFeatures() + End Sub +End Module diff --git a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_05tray.vb b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_05tray.vb new file mode 100644 index 0000000..70a8b79 --- /dev/null +++ b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_05tray.vb @@ -0,0 +1,7 @@ +Module Com_05tray + Public Sub _05tray() + Dim TempCP As Integer = Convert.ToInt32(Strings.ComputerInfo(2)) + TempCP = TempCP + 50 + Strings.ComputerInfo(2) = Convert.ToString(TempCP) + End Sub +End Module diff --git a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Codepoint.vb b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Codepoint.vb new file mode 100644 index 0000000..e23f372 --- /dev/null +++ b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Codepoint.vb @@ -0,0 +1,5 @@ +Module Com_Codepoint + Public Sub Codepoint() + NewLine(Strings.ComputerInfo(2) & " Codepoint(s) available in your wallet") + End Sub +End Module diff --git a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Cowsay.vb b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Cowsay.vb new file mode 100644 index 0000000..2fd17c1 --- /dev/null +++ b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Cowsay.vb @@ -0,0 +1,85 @@ +Module Com_Cowsay + Public Sub Cowsay(Say As String) + Select Case Say.Length + Case 1 To 40 + Dim SubtractLength As Integer = Say.Length + 1 + NewLine(" ") + Do + AddLine("_") + SubtractLength = SubtractLength - 1 + If SubtractLength = 0 Then + AddLine("_") + SubtractLength = Say.Length + 1 + Exit Do + End If + Loop + NewLine("< " & Say & " >") + NewLine(" ") + Do + AddLine("-") + SubtractLength = SubtractLength - 1 + If SubtractLength = 0 Then + AddLine("-") + SubtractLength = Say.Length + 1 + Exit Do + End If + Loop + NewLine(" \ ^__^") + NewLine(" \ (oo)\_______") + NewLine(" (__)\ )\/\") + NewLine(" ||----w |") + NewLine(" || ||") + Case 41 To 80 + NewLine(" __________________________________________ ") + NewLine("/ " & Say.Substring(0, 40) & " \") + Say = Say.Substring(40, Say.Length - 40) + NewLine("\ " & Say) + Dim Spaces As Integer = 40 - Say.Length + Do + AddLine(" ") + If Spaces = 0 Then + AddLine("/") + Exit Do + End If + Spaces = Spaces - 1 + Loop + NewLine(" ------------------------------------------ ") + NewLine(" \ ^__^") + NewLine(" \ (oo)\_______") + NewLine(" (__)\ )\/\") + NewLine(" ||----w |") + NewLine(" || ||") + Case >= 81 + NewLine("cowsay: Character limit exceeded") + 'Dim SubtractLength As Integer = Say.Length + 1 + 'Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & " __________________________________________ " + 'Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "/ " & Say.Substring(0, 40) & " \" + 'Dim CurrentLength As Integer = 40 + 'Dim WhatSay As String + 'Dim Spaces As Integer + 'Do + ' Try + ' WhatSay = Say.Substring(CurrentLength, 40) + ' Catch ex As Exception + ' WhatSay = Say.Substring(CurrentLength, (CurrentLength + 40) - Say.Length) + ' End Try + ' Spaces = 40 - WhatSay.Length + ' If Spaces > 0 Then + ' Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "\ " & WhatSay + ' Do + ' Terminal.TextBox1.Text = Terminal.TextBox1.Text & " " + ' If Spaces = 0 Then + ' Terminal.TextBox1.Text = Terminal.TextBox1.Text & "/" + ' Exit Do + ' End If + ' Spaces = Spaces - 1 + ' Loop + ' Exit Do + ' Else + ' Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "| " & WhatSay & " |" + ' CurrentLength = CurrentLength + 40 + ' End If + 'Loop + End Select + End Sub +End Module diff --git a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Date.vb b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Date.vb new file mode 100644 index 0000000..81f0822 --- /dev/null +++ b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Date.vb @@ -0,0 +1,40 @@ +Module Com_Date + Public Sub Terminal_Date() + If Strings.AvailableFeature(24) = 1 Then + NewLine("The date is " & Date.Now.DayOfYear & " days since the first day of the year") + AdvancedCommand = False + Console.BadCommand = False + ElseIf Strings.AvailableFeature(24) = 3 Then + If Strings.AvailableFeature(25) = 1 Then + Dim TheWeek As String = Date.Now.DayOfYear / 7 + NewLine("The date is " & TheWeek.Substring(0, 2) & " weeks since the first week of the year") + AdvancedCommand = False + Console.BadCommand = False + ElseIf Strings.AvailableFeature(25) = 3 Then + If Strings.AvailableFeature(26) = 1 Then + NewLine("The date is " & Date.Now.Month & " months since the first month of the year") + AdvancedCommand = False + Console.BadCommand = False + ElseIf Strings.AvailableFeature(26) = 3 Then + If Strings.AvailableFeature(27) = 1 Then + NewLine("The year is " & Date.Now.Year) + AdvancedCommand = False + Console.BadCommand = False + ElseIf Strings.AvailableFeature(27) = 3 Then + If Strings.AvailableFeature(28) = 1 Then + NewLine("The date is " & Date.Now.Day & "/" & Date.Now.Month) + AdvancedCommand = False + Console.BadCommand = False + ElseIf Strings.AvailableFeature(28) = 3 Then + If Strings.AvailableFeature(29) = 1 Then + NewLine("The date is " & Date.Now.Day & "/" & Date.Now.Month & "/" & Date.Now.Year) + AdvancedCommand = False + Console.BadCommand = False + End If + End If + End If + End If + End If + End If + End Sub +End Module diff --git a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Help.vb b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Help.vb new file mode 100644 index 0000000..67d0d41 --- /dev/null +++ b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Help.vb @@ -0,0 +1,110 @@ +Module Com_Help + Public Sub Help() + NewLine("ShiftOS Help Manual") + NewLine(Nothing) + NewLine("You can type 'help' to get all available commands and its corresponding action.") + If Strings.AvailableFeature(0) = 1 Then + NewLine("To get help on each command, you can type 'man [command]'") + NewLine(Nothing) + Else + NewLine(Nothing) + End If + If Strings.AvailableFeature(9) = 1 Then + NewLine("BC Basic Calculator for simple calculation") + End If + If Strings.AvailableFeature(16) = 1 Then + NewLine("CD Changes directory to a selected one") + End If + If Strings.AvailableFeature(1) = 1 Then + NewLine("CLEAR Clear the terminal") + End If + NewLine("CODEPOINT Display Codepoint(s) from your wallet") + NewLine("COLOR Changes Terminal Text And Background color To the corresponding choice") + NewLine("COLORS Shows available colors support For the terminal") + If Strings.AvailableFeature(22) = 1 Then + NewLine("COWSAY Spawn a cow And saying anything you want") + End If + If Strings.AvailableFeature(24) = 1 Then + NewLine("DATE Displays date in days since first day of the year format") + ElseIf Strings.AvailableFeature(24) = 3 Then + If Strings.AvailableFeature(25) = 1 Then + NewLine("DATE Displays date in weeks since first week of the year format") + ElseIf Strings.AvailableFeature(25) = 3 Then + If Strings.AvailableFeature(26) = 1 Then + NewLine("DATE Displays date in months since first month of the year format") + ElseIf Strings.AvailableFeature(26) = 3 Then + If Strings.AvailableFeature(27) = 1 Then + NewLine("DATE Displays date in year format format") + ElseIf Strings.AvailableFeature(27) = 3 Then + If Strings.AvailableFeature(28) = 1 Then + NewLine("DATE Displays date in MM/YYYY format") + ElseIf Strings.AvailableFeature(28) = 3 Then + If Strings.AvailableFeature(29) = 1 Then + NewLine("DATE Displays date in general DD/MM/YYYY format") + End If + End If + End If + End If + End If + End If + If Strings.AvailableFeature(16) = 1 Then + NewLine("DEL Delete a selected file from the directory") + NewLine("DIR Displays subdirectories And files In a directory") + End If + NewLine("GUESS Runs 'Guess the Number' application") + NewLine("HELP Shows all commands available and its corresponding action") + If Strings.AvailableFeature(20) = 1 Then + NewLine("HOSTNAME Sets the name of current hostname/computer name with a new one") + End If + If Strings.AvailableFeature(4) = 1 Then + NewLine("INFOBAR Displays informations about current session such as current app, current user, current time, etc.") + End If + If Strings.AvailableFeature(0) = 1 Then + NewLine("MAN Shows a command, its corresponding action, and its example usage") + End If + If Strings.AvailableFeature(16) = 1 Then + NewLine("MKDIR Creating a directory") + End If + If Strings.AvailableFeature(16) = 1 Then + NewLine("PWD Display current directory navigated on ShiftOS") + End If + If Strings.AvailableFeature(2) = 1 Then + NewLine("PRINT Prints a corresponding text entered in the command") + End If + NewLine("REBOOT Terminate and re-run ShiftOS session") + If Strings.AvailableFeature(21) = 1 Then + NewLine("REV Turn any sentences you want and making it reversed") + End If + If Strings.AvailableFeature(16) = 1 Then + NewLine("RMDIR Deleting a directory") + End If + If Strings.AvailableFeature(8) = 1 Then + NewLine("SHIFTFETCH Shows informations about your computer") + End If + NewLine("SHIFTORIUM A software center for upgrading features on ShiftOS") + NewLine("SHUTDOWN Terminate ShiftOS session") + NewLine("SU Runs terminal as super user") + If Strings.AvailableFeature(17) = 1 Then + NewLine("TEXTPAD Simple text-editor for ShiftOS") + End If + If Strings.AvailableFeature(5) = 1 Then + NewLine("TIME Display the current time in the form of seconds since midnight") + ElseIf Strings.AvailableFeature(5) = 3 Then + If Strings.AvailableFeature(6) = 1 Then + NewLine("TIME Display the current time in the form of minutes since midnight") + ElseIf Strings.AvailableFeature(6) = 3 Then + If Strings.AvailableFeature(7) = 1 Then + NewLine("TIME Display the current time in the form of hours since midnight") + ElseIf Strings.AvailableFeature(7) = 3 Then + If Strings.AvailableFeature(12) = 1 Then + NewLine("TIME Display the current time in the form of PM and AM format") + End If + End If + End If + End If + If Strings.AvailableFeature(20) = 1 Then + NewLine("USERNAME Sets the name of current user with a new one") + End If + NewLine("VER Printing current version of ShiftOS TheRevival") + End Sub +End Module diff --git a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Hostname.vb b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Hostname.vb new file mode 100644 index 0000000..8903069 --- /dev/null +++ b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Hostname.vb @@ -0,0 +1,6 @@ +Module Com_Hostname + Public Sub Hostname() + Strings.ComputerInfo(0) = command.Substring(command.LastIndexOf(" ") + 1, command.Length - (command.LastIndexOf(" ") + 1)) + Terminal_AssignPrompt() + End Sub +End Module diff --git a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Infobar.vb b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Infobar.vb new file mode 100644 index 0000000..c067125 --- /dev/null +++ b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Infobar.vb @@ -0,0 +1,25 @@ +Module Com_Infobar + Public Sub Infobar() + 'Infobar panel-ish and some sort + Dim infobarcommand As String = command.Replace("infobar ", "") + Dim advancedtool As Boolean = True + Select Case infobarcommand + Case "on" + Strings.OnceInfo(2) = "True" + Console.CheckFeature() + Console.BadCommand = False + advancedtool = False + Case "off" + Strings.OnceInfo(2) = "False" + Console.CheckFeature() + Console.BadCommand = False + advancedtool = False + End Select + If advancedtool = True Then + If infobarcommand Like "color *" Then + GetColor("infobar", infobarcommand.Substring(6, 1), infobarcommand.Substring(7, 1)) + Console.BadCommand = False + End If + End If + End Sub +End Module diff --git a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Pwd.vb b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Pwd.vb new file mode 100644 index 0000000..2e97969 --- /dev/null +++ b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Pwd.vb @@ -0,0 +1,5 @@ +Module Com_Pwd + Public Sub Pwd() + NewLine(Console.CurrentDirectory.Replace(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS", "!")) + End Sub +End Module diff --git a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Rev.vb b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Rev.vb new file mode 100644 index 0000000..b78911f --- /dev/null +++ b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Rev.vb @@ -0,0 +1,5 @@ +Module Com_Rev + Public Sub Reverse() + NewLine(StrReverse(RawCommand.Substring(4))) + End Sub +End Module diff --git a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Shiftfetch.vb b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Shiftfetch.vb new file mode 100644 index 0000000..569d14d --- /dev/null +++ b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Shiftfetch.vb @@ -0,0 +1,32 @@ +Module Com_Shiftfetch + Public Sub Shiftfetch() + If Strings.OnceInfo(0) = "Yes" Then + NewLine(" :^!7?JJJJJ?7!^: root@" & Strings.ComputerInfo(0)) + Else + NewLine(" :^!7?JJJJJ?7!^: " & Strings.ComputerInfo(1) & "@" & Strings.ComputerInfo(0)) + End If + NewLine(" .~?PB###BGP555PGB###BP?~. ----------------------") + NewLine(" .!P#&B57^..:: ^~~!!~^::~7YG!. OS: ShiftOS TheRevival") + NewLine(" .?#@G7: .^ :^::!5&#?. Host: " & Environment.MachineName) + NewLine(" .?#@5^ ! .^!!..J&#? Kernel: " & My.Resources.CurrentVersion) + NewLine(" B@G^ .J : 7?..J@G: Uptime : N/ A") + NewLine(" ~&@Y 7 ~PB&#Y:. ~G7 ~&&^ Packages: " & Strings.ComputerInfo(4)) + NewLine(" ^&@Y Y 5#5??YB@&B~ .GJ :&&: Shell: sos-justshell") + NewLine(" G@B ? 5P ^YB! .#! ~@G Window Manager: -") + NewLine(" ^@@! : @Y .:::^~:. 7# Y@^ Window Manager Theme: -") + NewLine(" 7@@: ! B@&BBBBGPPB@#Y. :&^ ^@? Terminal: shiftos-terminal") + NewLine(" ?@@: 7 :??7~:. 5@@5 :&^ .&? Terminal Font: Consolas, 11pt") + NewLine(" ~@@! !@ G#&B!. Y@@B 7#. Y~ CPU: " & My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0", "ProcessorNameString", Nothing)) + NewLine(" B@G B@J ...~&G. 7@@@? .#? 7 GPU: N/A") + Dim TripleDigitRAM As String + TripleDigitRAM = (My.Computer.Info.TotalPhysicalMemory / 1024 / 1024 / 1024) + NewLine(" ~&@? ^@Y !G#57~~!YB@#Y^ .GP .. Memory: " & TripleDigitRAM.Substring(0, 4) & " GB") + NewLine(" !@@7 ~#J 5#&&BG57^ ~BY Codepoint: " & Strings.ComputerInfo(2)) + NewLine(" ~#@Y .5P~ ^5G~ ") + NewLine(" .J&#! ^JY!:. ^?P5! ") + NewLine(" :J&B?..!JYY7!~::...::~!7Y5Y7: ") + NewLine(" .7PBP?^::~!?JJJJJJJ?7~: ") + NewLine(" .~?55Y?!^:... ") + NewLine(" .:~~^~^^::. ") + End Sub +End Module diff --git a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Shiftorium.vb b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Shiftorium.vb new file mode 100644 index 0000000..47fecd1 --- /dev/null +++ b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Shiftorium.vb @@ -0,0 +1,18 @@ +Module Com_Shiftorium + Public Sub Shiftorium() + Dim prompt As String = command.Replace("shiftorium ", "") + NewLine("Shiftorium ShiftOS Center") + If prompt Like "info *" Then + Shiftoriums.prompt = command.Replace("shiftorium info ", "") + Shiftorium_InformationFeatures() + End If + If prompt Like "install *" Then + Shiftoriums.prompt = command.Replace("shiftorium install ", "") + Shiftorium_DetectInstallFeatures() + End If + If prompt = "list" Then + Shiftorium_ListFeatures() + Console.BadCommand = False + End If + End Sub +End Module diff --git a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Su.vb b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Su.vb new file mode 100644 index 0000000..2602187 --- /dev/null +++ b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Su.vb @@ -0,0 +1,10 @@ +Module Com_Su + Public Sub Terminal_Su() + If Strings.OnceInfo(0) = "Yes" Then + NewLine("You already in root mode!") + Else + Strings.OnceInfo(0) = "Yes" + Terminal_AssignPrompt() + End If + End Sub +End Module diff --git a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Time.vb b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Time.vb new file mode 100644 index 0000000..17cc2b3 --- /dev/null +++ b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Time.vb @@ -0,0 +1,25 @@ +Module Com_Time + Public Sub Terminal_Time() + If Strings.AvailableFeature(5) = 1 Then + NewLine(Math.Floor(Date.Now.Subtract(Date.Today).TotalSeconds) & " seconds passed since midnight") + ElseIf Strings.AvailableFeature(5) = 3 Then + If Strings.AvailableFeature(6) = 1 Then + NewLine(Math.Floor(Date.Now.Subtract(Date.Today).TotalMinutes) & " minutes passed since midnight") + ElseIf Strings.AvailableFeature(6) = 3 Then + If Strings.AvailableFeature(7) = 1 Then + NewLine(Math.Floor(Date.Now.Subtract(Date.Today).TotalHours) & " hours passed since midnight") + ElseIf Strings.AvailableFeature(7) = 3 Then + If Strings.AvailableFeature(12) = 1 Then + If Date.Now.Hour < 12 Then + NewLine("The time is " & TimeOfDay.Hour & " AM") + Else + NewLine("The time is " & TimeOfDay.Hour - 12 & " PM") + End If + ElseIf Strings.AvailableFeature(23) = 1 Then + NewLine("The time is " & TimeOfDay.Hour & ":" & TimeOfDay.Minute) + End If + End If + End If + End If + End Sub +End Module diff --git a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Username.vb b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Username.vb new file mode 100644 index 0000000..0f8b4e7 --- /dev/null +++ b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Username.vb @@ -0,0 +1,6 @@ +Module Com_Username + Public Sub Username() + Strings.ComputerInfo(1) = command.Substring(command.LastIndexOf(" ") + 1, command.Length - (command.LastIndexOf(" ") + 1)) + Terminal_AssignPrompt() + End Sub +End Module diff --git a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Ver.vb b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Ver.vb new file mode 100644 index 0000000..8b2de41 --- /dev/null +++ b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Ver.vb @@ -0,0 +1,5 @@ +Module Com_Ver + Public Sub Terminal_Version() + NewLine("ShiftOS TheRevival version " & My.Resources.CurrentVersion) + End Sub +End Module diff --git a/ShiftOS-TheRevival/TerminalApplications/Internal/TerminalInternalApps.vb b/ShiftOS-TheRevival/TerminalApplications/Internal/TerminalInternalApps.vb new file mode 100644 index 0000000..f4bba89 --- /dev/null +++ b/ShiftOS-TheRevival/TerminalApplications/Internal/TerminalInternalApps.vb @@ -0,0 +1,168 @@ +Module TerminalInternalApps + Public Sub Cowsay_Say(Say As String) + + End Sub + + Public Sub DateTerm() + + End Sub + + 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 + NewLine("ShiftOS Help Manual") + NewLine(Nothing) + '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 + 'In process to convert every command from printing from code to printing from text file + Case "bc" + If Strings.AvailableFeature(9) = "1" Then + TempUsage = TempUsage & "bc" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_bc & Environment.NewLine + Console.BadCommand = False + End If + Case "cd" + If Strings.AvailableFeature(16) = "1" Then + TempUsage = TempUsage & "cd [DIRECTORY]" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_cd & Environment.NewLine + Console.BadCommand = False + End If + Case "clear" + If Strings.AvailableFeature(1) = "1" Then + TempUsage = TempUsage & "clear" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_clear & Environment.NewLine + Console.BadCommand = False + End If + Case "color" + TempUsage = TempUsage & "color [bg][fg]" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_color & Environment.NewLine + Console.BadCommand = False + Case "colors" + TempUsage = TempUsage & "colors" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_colors & Environment.NewLine + Console.BadCommand = False + Case "cowsay" + If Strings.AvailableFeature(22) = 1 Then + TempUsage = TempUsage & "cowsay [STRING]" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_cowsay & Environment.NewLine + Console.BadCommand = False + End If + Case "codepoint" + TempUsage = TempUsage & "codepoint" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_codepoint & Environment.NewLine + Console.BadCommand = False + Case "del" + If Strings.AvailableFeature(16) = 1 Then + TempUsage = TempUsage & "del [FILENAME.TXT]" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_del & Environment.NewLine + Console.BadCommand = False + End If + Case "dir" + If Strings.AvailableFeature(16) = "1" Then + TempUsage = TempUsage & "dir" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_dir & Environment.NewLine + Console.BadCommand = False + End If + Case "guess" + TempUsage = TempUsage & "guess" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_guess & Environment.NewLine + Console.BadCommand = False + Case "help" + TempUsage = TempUsage & "help" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_help & Environment.NewLine + Console.BadCommand = False + Case "hostname" + If Strings.AvailableFeature(20) = 1 Then + TempUsage = TempUsage & "hostname [HOSTNAME]" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_hostname & Environment.NewLine + Console.BadCommand = False + End If + Case "infobar" + If Strings.AvailableFeature(4) = 1 Then + TempUsage = TempUsage & "infobar [ON|OFF] [OPTION]" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_infobar & Environment.NewLine + Console.BadCommand = False + End If + Case "man" + If Strings.AvailableFeature(0) = "1" Then + TempUsage = TempUsage & "man [command]" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_man & Environment.NewLine + Console.BadCommand = False + End If + Case "mkdir" + If Strings.AvailableFeature(16) = "1" Then + TempUsage = TempUsage & "mkdir [DIRECTORY]" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_mkdir & Environment.NewLine + Console.BadCommand = False + End If + Case "print" + If Strings.AvailableFeature(2) = "1" Then + TempUsage = TempUsage & "print [text]" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_print & Environment.NewLine + Console.BadCommand = False + End If + Case "pwd" + If Strings.AvailableFeature(16) = "1" Then + TempUsage = TempUsage & "pwd" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_pwd & Environment.NewLine + Console.BadCommand = False + End If + Case "reboot" + TempUsage = TempUsage & "reboot" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_reboot & Environment.NewLine + Console.BadCommand = False + Case "rmdir" + If Strings.AvailableFeature(16) = "1" Then + TempUsage = TempUsage & "rmdir [DIRECTORY]" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_rmdir & Environment.NewLine + Console.BadCommand = False + End If + Case "shiftfetch" + If Strings.AvailableFeature(8) = "1" Then + TempUsage = TempUsage & "shiftfetch" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_shiftfetch & Environment.NewLine + Console.BadCommand = False + End If + Case "shiftorium" + TempUsage = TempUsage & "shiftorium [option] [featureName]" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_shiftorium & Environment.NewLine + Console.BadCommand = False + Case "shutdown" + TempUsage = TempUsage & "shutdown" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_shutdown & Environment.NewLine + Console.BadCommand = False + Case "textpad" + If Strings.AvailableFeature(17) = "1" Then + TempUsage = TempUsage & "textpad [FILENAME.TXT]" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_textpad & Environment.NewLine + Console.BadCommand = False + End If + Case "time" + If Strings.AvailableFeature(17) = "1" Then + TempUsage = TempUsage & "time" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_time & Environment.NewLine + Console.BadCommand = False + End If + Case "username" + If Strings.AvailableFeature(19) = "1" Then + TempUsage = TempUsage & "username" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_username & Environment.NewLine + Console.BadCommand = False + End If + Case "ver" + TempUsage = TempUsage & "ver" + Console.TextBox1.Text = Console.TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_ver & Environment.NewLine + Console.BadCommand = False + Case Else + NewLine("MAN : Invalid command") + End Select + End Sub +End Module -- cgit v1.2.3