mirror of
https://github.com/EverythingWindows/ShiftOS-TheRevival-Old.git
synced 2025-01-22 18:02:16 +00:00
PAUSE function
This commit is contained in:
parent
60b6ce686d
commit
06623f4cb1
7 changed files with 140 additions and 78 deletions
|
@ -10,11 +10,11 @@ Public Class Terminal
|
|||
Public StoryToTell As String
|
||||
Public ChangeInterpreter As Boolean = False
|
||||
Public CurrentInterpreter As String = "terminal"
|
||||
Public CommandCache(4) As String
|
||||
|
||||
Private Sub Terminal_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
FormBorderStyle = FormBorderStyle.None
|
||||
WindowState = FormWindowState.Maximized
|
||||
Cursor.Hide()
|
||||
InitializeTerminal()
|
||||
End Sub
|
||||
|
||||
|
@ -148,6 +148,10 @@ Public Class Terminal
|
|||
If Strings.AvailableFeature(2) = 1 Then
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "PRINT Prints a corresponding text entered in the command"
|
||||
End If
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "REBOOT Terminate and re-run ShiftOS session"
|
||||
If Strings.AvailableFeature(8) = 1 Then
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "SHIFTFETCH Shows informations about your computer"
|
||||
End If
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "SHIFTORIUM A software center for upgrading features on ShiftOS"
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "SHUTDOWN Terminate ShiftOS session"
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "SU Runs terminal as super user"
|
||||
|
@ -166,6 +170,11 @@ Public Class Terminal
|
|||
TextBox1.Text = TextBox1.Text & Environment.NewLine
|
||||
AdvancedCommand = False
|
||||
BadCommand = False
|
||||
Case "pause"
|
||||
ChangeInterpreter = True
|
||||
AppHost("pause")
|
||||
AdvancedCommand = False
|
||||
BadCommand = False
|
||||
Case "reboot"
|
||||
TextBox1.Text = Nothing
|
||||
AdvancedCommand = False
|
||||
|
@ -218,6 +227,7 @@ Public Class Terminal
|
|||
BadCommand = False
|
||||
Undeveloped()
|
||||
Case "shutdown", "shut down"
|
||||
Cursor.Show()
|
||||
ShiftOSMenu.Show()
|
||||
Close()
|
||||
Case "time"
|
||||
|
@ -287,6 +297,16 @@ Public Class Terminal
|
|||
TextBox1.Text = TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_print & Environment.NewLine
|
||||
BadCommand = False
|
||||
End If
|
||||
Case "reboot"
|
||||
TempUsage = TempUsage & "reboot"
|
||||
TextBox1.Text = TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_reboot & Environment.NewLine
|
||||
BadCommand = False
|
||||
Case "shiftfetch"
|
||||
If Strings.AvailableFeature(8) = "1" Then
|
||||
TempUsage = TempUsage & "shiftfetch"
|
||||
TextBox1.Text = TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_shiftfetch & Environment.NewLine
|
||||
BadCommand = False
|
||||
End If
|
||||
Case "shiftorium"
|
||||
TempUsage = TempUsage & "shiftorium [option] [featureName]"
|
||||
TextBox1.Text = TextBox1.Text & TempUsage & Environment.NewLine & Environment.NewLine & My.Resources.man_shiftorium & Environment.NewLine
|
||||
|
@ -338,6 +358,9 @@ Public Class Terminal
|
|||
End Sub
|
||||
|
||||
Private Sub txtterm_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
|
||||
If CurrentInterpreter = "pause" Then
|
||||
TerminateApp()
|
||||
Else
|
||||
If e.KeyCode = Keys.T AndAlso e.Control Then
|
||||
Me.Hide()
|
||||
e.SuppressKeyPress = True
|
||||
|
@ -420,6 +443,7 @@ Public Class Terminal
|
|||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
TextBox1.Select(TextBox1.TextLength, 0)
|
||||
TextBox1.ScrollToCaret()
|
||||
|
|
|
@ -21,7 +21,12 @@
|
|||
Terminal.CurrentInterpreter = "guess"
|
||||
GTN_GenerateNumber()
|
||||
ShouldChange = True
|
||||
Case "shiftoriumfx"
|
||||
Case "pause" 'Pause function
|
||||
Terminal.DefaultPrompt = "Press any key to continue..."
|
||||
Terminal.CurrentInterpreter = "pause"
|
||||
Terminal.TextBox1.ReadOnly = True
|
||||
ShouldChange = True
|
||||
Case "shiftoriumfx" 'ShiftoriumFX : Advanced Shiftorium
|
||||
Terminal.DefaultPrompt = "Navigate> "
|
||||
Terminal.CurrentInterpreter = "shiftoriumfx"
|
||||
ShiftoriumFX_DisplayPackages()
|
||||
|
@ -39,6 +44,7 @@
|
|||
Terminal.CurrentInterpreter = "terminal"
|
||||
Terminal.PrintPrompt()
|
||||
Terminal.AssignPrompt()
|
||||
Terminal.TextBox1.ReadOnly = False
|
||||
End Sub
|
||||
|
||||
Public Sub DoChildCommand()
|
||||
|
@ -54,9 +60,11 @@
|
|||
Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "Invalid value!"
|
||||
End Try
|
||||
End Select
|
||||
Case "pause"
|
||||
TerminateApp()
|
||||
Case "shiftoriumfx"
|
||||
Select Case Terminal.command
|
||||
Case ""
|
||||
'Case ""
|
||||
|
||||
Case "exit"
|
||||
TerminateApp()
|
||||
|
|
23
ShiftOS-TheRevival/My Project/Resources.Designer.vb
generated
23
ShiftOS-TheRevival/My Project/Resources.Designer.vb
generated
|
@ -70,7 +70,7 @@ Namespace My.Resources
|
|||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to 0.2.1.
|
||||
''' Looks up a localized string similar to 0.2.2.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property CurrentVersion() As String
|
||||
Get
|
||||
|
@ -128,7 +128,7 @@ Namespace My.Resources
|
|||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to .
|
||||
''' Looks up a localized string similar to Prints a corresponding text entered in the command.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property man_print() As String
|
||||
Get
|
||||
|
@ -136,6 +136,25 @@ Namespace My.Resources
|
|||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Terminate ShiftOS session and re-running the session.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property man_reboot() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("man_reboot", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Command-line system information tool for ShiftOS
|
||||
'''Ported from Neofetch.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property man_shiftfetch() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("man_shiftfetch", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to A software center for upgrading features in ShiftOS
|
||||
'''
|
||||
|
|
|
@ -142,6 +142,12 @@
|
|||
<data name="man_print" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\man manuals\print.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="man_reboot" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\man manuals\reboot.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="man_shiftfetch" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\man manuals\shiftfetch.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="man_shiftorium" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\man manuals\shiftorium.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
|
|
1
ShiftOS-TheRevival/Resources/man Manuals/reboot.txt
Normal file
1
ShiftOS-TheRevival/Resources/man Manuals/reboot.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Terminate ShiftOS session and re-running the session
|
2
ShiftOS-TheRevival/Resources/man Manuals/shiftfetch.txt
Normal file
2
ShiftOS-TheRevival/Resources/man Manuals/shiftfetch.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Command-line system information tool for ShiftOS
|
||||
Ported from Neofetch
|
|
@ -202,6 +202,8 @@
|
|||
<Content Include="Resources\man Manuals\help.txt" />
|
||||
<Content Include="Resources\man Manuals\man.txt" />
|
||||
<Content Include="Resources\man Manuals\print.txt" />
|
||||
<Content Include="Resources\man Manuals\reboot.txt" />
|
||||
<Content Include="Resources\man Manuals\shiftfetch.txt" />
|
||||
<Content Include="Resources\man Manuals\shiftorium.txt" />
|
||||
<Content Include="Resources\man Manuals\shutdown.txt" />
|
||||
<Content Include="Resources\man Manuals\ver.txt" />
|
||||
|
|
Loading…
Reference in a new issue