mirror of
https://github.com/EverythingWindows/ShiftOS-TheRevival-Old.git
synced 2025-01-22 03:11:48 -05:00
CodepointSystem module, ColorSystem module, Completing TerminalInternalApps migrating to modules
This commit is contained in:
parent
e08f5e8e55
commit
b6ad60f568
9 changed files with 72 additions and 76 deletions
|
@ -8,7 +8,7 @@
|
|||
If Strings.AvailableFeature(18) = 1 Then
|
||||
ShOSKey_InputCommand(command)
|
||||
End If
|
||||
Console.DoCommand()
|
||||
Terminal_DoCommand()
|
||||
Terminal_PrintPrompt()
|
||||
TextRebind()
|
||||
End Sub
|
||||
|
@ -67,7 +67,7 @@
|
|||
Dim i As Integer = 1
|
||||
While i <= linenum
|
||||
command = sr.ReadLine()
|
||||
Console.DoCommand()
|
||||
Terminal_DoCommand()
|
||||
NewLine(Nothing)
|
||||
i = i + 1
|
||||
End While
|
||||
|
@ -106,7 +106,7 @@
|
|||
AdvancedCommand = False
|
||||
Console.BadCommand = False
|
||||
Case "colors"
|
||||
DisplayColors()
|
||||
Colors()
|
||||
AdvancedCommand = False
|
||||
Console.BadCommand = False
|
||||
Case "date"
|
||||
|
|
11
ShiftOS-TheRevival/Functions/InGame/CodepointSystem.vb
Normal file
11
ShiftOS-TheRevival/Functions/InGame/CodepointSystem.vb
Normal file
|
@ -0,0 +1,11 @@
|
|||
Module CodepointSystem
|
||||
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
|
||||
End Module
|
|
@ -1,4 +1,4 @@
|
|||
Module TerminalColorSystem
|
||||
Module ColorSystem
|
||||
'GUIDE to COLORS in TERMINAL
|
||||
'Using the same Hexadecimal numbering as what Command Prompt used to:
|
||||
'0 = Black 8 = Gray
|
||||
|
@ -12,53 +12,6 @@
|
|||
Public BgColor As Color
|
||||
Public FgColor As Color
|
||||
|
||||
Public Sub DisplayColors()
|
||||
NewLine("TERMINAL SUPPORTED COLORS")
|
||||
NewLine(Nothing)
|
||||
NewLine(Nothing)
|
||||
If Strings.AvailableFeature(10) = "1" Then
|
||||
NewLine("0 = Black 8 = Gray")
|
||||
Else
|
||||
NewLine("0 = Black 8 = ???")
|
||||
End If
|
||||
If Strings.AvailableFeature(14) = "1" Then
|
||||
NewLine("1 = Blue 9 = Light Blue")
|
||||
NewLine("2 = Green A = Light Green")
|
||||
Else
|
||||
If Strings.AvailableFeature(13) = "1" Then
|
||||
NewLine("1 = ??? 9 = Light Blue")
|
||||
NewLine("2 = Green A = ???")
|
||||
Else
|
||||
NewLine("1 = ??? 9 = ???")
|
||||
NewLine("2 = ??? A = ???")
|
||||
End If
|
||||
End If
|
||||
If Strings.AvailableFeature(15) = "1" Then
|
||||
NewLine("3 = Aqua B = Light Aqua")
|
||||
Else
|
||||
NewLine("3 = ??? B = ???")
|
||||
End If
|
||||
If Strings.AvailableFeature(14) = "1" Then
|
||||
NewLine("4 = Red C = Light Red")
|
||||
ElseIf Strings.AvailableFeature(13) = "1" Then
|
||||
NewLine("4 = ??? C = Light Red")
|
||||
Else
|
||||
NewLine("4 = ??? C = ???")
|
||||
End If
|
||||
If Strings.AvailableFeature(15) = "1" Then
|
||||
NewLine("5 = Purple D = Light Purple")
|
||||
NewLine("6 = Yellow E = Yellow")
|
||||
Else
|
||||
NewLine("5 = ??? D = ???")
|
||||
NewLine("6 = ??? E = ???")
|
||||
End If
|
||||
If Strings.AvailableFeature(10) = "1" Then
|
||||
NewLine("7 = Dark Gray F = White")
|
||||
Else
|
||||
NewLine("7 = ??? F = White")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub GetColor(App As String, Bg As String, Fg As String)
|
||||
Select Case App
|
||||
Case "terminal"
|
|
@ -96,10 +96,6 @@ Public Class Console
|
|||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub DoCommand()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub txtterm_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
|
||||
KeyInput = e.KeyData
|
||||
Select Case e.KeyData
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Functions\InGame\CodepointSystem.vb" />
|
||||
<Compile Include="Functions\InGame\Terminate.vb" />
|
||||
<Compile Include="MainForms\BugSlap.Designer.vb">
|
||||
<DependentUpon>BugSlap.vb</DependentUpon>
|
||||
|
@ -160,13 +161,16 @@
|
|||
<Compile Include="API\TerminalAPI.vb" />
|
||||
<Compile Include="TerminalApplications\External\App_TextPad.vb" />
|
||||
<Compile Include="TerminalApplications\External\TerminalExternalApps.vb" />
|
||||
<Compile Include="Functions\InGame\TerminalColorSystem.vb" />
|
||||
<Compile Include="Functions\InGame\ColorSystem.vb" />
|
||||
<Compile Include="TerminalApplications\Internal\Com_05tray.vb" />
|
||||
<Compile Include="TerminalApplications\Internal\Com_Codepoint.vb" />
|
||||
<Compile Include="TerminalApplications\Internal\Com_Color.vb" />
|
||||
<Compile Include="TerminalApplications\Internal\Com_Colors.vb" />
|
||||
<Compile Include="TerminalApplications\Internal\Com_Cowsay.vb" />
|
||||
<Compile Include="TerminalApplications\Internal\Com_Help.vb" />
|
||||
<Compile Include="TerminalApplications\Internal\Com_Hostname.vb" />
|
||||
<Compile Include="TerminalApplications\Internal\Com_Infobar.vb" />
|
||||
<Compile Include="TerminalApplications\Internal\Com_Manual.vb" />
|
||||
<Compile Include="TerminalApplications\Internal\Com_Pwd.vb" />
|
||||
<Compile Include="TerminalApplications\Internal\Com_Rev.vb" />
|
||||
<Compile Include="TerminalApplications\Internal\Com_Shiftfetch.vb" />
|
||||
|
@ -175,7 +179,6 @@
|
|||
<Compile Include="TerminalApplications\Internal\Com_Username.vb" />
|
||||
<Compile Include="TerminalApplications\Internal\Com_Ver.vb" />
|
||||
<Compile Include="TerminalApplications\Internal\Com_Date.vb" />
|
||||
<Compile Include="TerminalApplications\Internal\TerminalInternalApps.vb" />
|
||||
<Compile Include="Functions\OutGame\TheUpdater.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
|
|
|
@ -19,16 +19,6 @@ Module TerminalExternalApps
|
|||
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"
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
Module Com_Color
|
||||
|
||||
End Module
|
|
@ -0,0 +1,48 @@
|
|||
Module Com_Colors
|
||||
Public Sub Colors()
|
||||
NewLine("TERMINAL SUPPORTED COLORS")
|
||||
NewLine(Nothing)
|
||||
NewLine(Nothing)
|
||||
If Strings.AvailableFeature(10) = "1" Then
|
||||
NewLine("0 = Black 8 = Gray")
|
||||
Else
|
||||
NewLine("0 = Black 8 = ???")
|
||||
End If
|
||||
If Strings.AvailableFeature(14) = "1" Then
|
||||
NewLine("1 = Blue 9 = Light Blue")
|
||||
NewLine("2 = Green A = Light Green")
|
||||
Else
|
||||
If Strings.AvailableFeature(13) = "1" Then
|
||||
NewLine("1 = ??? 9 = Light Blue")
|
||||
NewLine("2 = Green A = ???")
|
||||
Else
|
||||
NewLine("1 = ??? 9 = ???")
|
||||
NewLine("2 = ??? A = ???")
|
||||
End If
|
||||
End If
|
||||
If Strings.AvailableFeature(15) = "1" Then
|
||||
NewLine("3 = Aqua B = Light Aqua")
|
||||
Else
|
||||
NewLine("3 = ??? B = ???")
|
||||
End If
|
||||
If Strings.AvailableFeature(14) = "1" Then
|
||||
NewLine("4 = Red C = Light Red")
|
||||
ElseIf Strings.AvailableFeature(13) = "1" Then
|
||||
NewLine("4 = ??? C = Light Red")
|
||||
Else
|
||||
NewLine("4 = ??? C = ???")
|
||||
End If
|
||||
If Strings.AvailableFeature(15) = "1" Then
|
||||
NewLine("5 = Purple D = Light Purple")
|
||||
NewLine("6 = Yellow E = Yellow")
|
||||
Else
|
||||
NewLine("5 = ??? D = ???")
|
||||
NewLine("6 = ??? E = ???")
|
||||
End If
|
||||
If Strings.AvailableFeature(10) = "1" Then
|
||||
NewLine("7 = Dark Gray F = White")
|
||||
Else
|
||||
NewLine("7 = ??? F = White")
|
||||
End If
|
||||
End Sub
|
||||
End Module
|
|
@ -1,12 +1,4 @@
|
|||
Module TerminalInternalApps
|
||||
Public Sub Cowsay_Say(Say As String)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub DateTerm()
|
||||
|
||||
End Sub
|
||||
|
||||
Module Com_Manual
|
||||
Public Sub Manual(Command As String)
|
||||
'MAN command starts with this kinda format
|
||||
'ShiftOS Help Manual
|
Loading…
Reference in a new issue