aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS-TheRevival/MainForms/Terminal.vb
diff options
context:
space:
mode:
authorEverythingWindows <[email protected]>2022-11-02 08:52:31 +0700
committerEverythingWindows <[email protected]>2022-11-02 08:52:31 +0700
commite6f8b7c77bd3163cb84a077a54a4448b41fa63ce (patch)
tree2919b03cb0a4521c106c4317af11a4a0da688704 /ShiftOS-TheRevival/MainForms/Terminal.vb
parentcbc32f3aba8114e1bf2bc2d1db75a7056e5e575a (diff)
downloadshiftos-therevival-old-e6f8b7c77bd3163cb84a077a54a4448b41fa63ce.tar.gz
shiftos-therevival-old-e6f8b7c77bd3163cb84a077a54a4448b41fa63ce.tar.bz2
shiftos-therevival-old-e6f8b7c77bd3163cb84a077a54a4448b41fa63ce.zip
0.1.1 code
Diffstat (limited to 'ShiftOS-TheRevival/MainForms/Terminal.vb')
-rw-r--r--ShiftOS-TheRevival/MainForms/Terminal.vb32
1 files changed, 31 insertions, 1 deletions
diff --git a/ShiftOS-TheRevival/MainForms/Terminal.vb b/ShiftOS-TheRevival/MainForms/Terminal.vb
index aa88625..2b8abd0 100644
--- a/ShiftOS-TheRevival/MainForms/Terminal.vb
+++ b/ShiftOS-TheRevival/MainForms/Terminal.vb
@@ -2,6 +2,7 @@
Public command As String
Public DefaultPrompt As String
Public TrackPos As Integer
+ Public AdvancedCommand As Boolean
Private Sub Terminal_Load(sender As Object, e As EventArgs) Handles MyBase.Load
FormBorderStyle = FormBorderStyle.None
@@ -11,7 +12,11 @@
Strings.ComputerInfo(1) = "user"
PrintPrompt()
AssignPrompt()
+ Else
+
End If
+ TextBox1.Select(TextBox1.TextLength, 0)
+ TextBox1.ScrollToCaret()
End Sub
Public Sub PrintPrompt()
@@ -44,6 +49,31 @@
command = command.ToLower()
End Sub
+ Private Sub DoCommand()
+ AdvancedCommand = True
+ Select Case command
+ Case "clear"
+ TextBox1.Text = Nothing
+ AdvancedCommand = False
+ Case "ver"
+ TextBox1.Text = TextBox1.Text & Environment.NewLine & "ShiftOS TheRevival version 0.1.1"
+ AdvancedCommand = False
+ Case "shutdown", "shut down"
+ ShiftOSMenu.Show()
+ Close()
+ End Select
+
+ If AdvancedCommand = True Then
+ If command Like "print *" Then
+ TextBox1.Text = TextBox1.Text & Environment.NewLine & command.Substring(6)
+ Dim printed As String = command.Replace("print ", "")
+ ''It has the same issue, only displays in lowercase
+ 'TextBox1.Text = TextBox1.Text & Environment.NewLine & printed
+ End If
+ AdvancedCommand = False
+ End If
+ End Sub
+
Private Sub txtterm_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
If e.KeyCode = Keys.T AndAlso e.Control Then
Me.Hide()
@@ -85,7 +115,7 @@
If e.KeyCode = Keys.Enter Then
e.SuppressKeyPress = True
ReadCommand()
- 'DoCommand()
+ DoCommand()
If command = "clear" Then
PrintPrompt()