diff options
| author | EverythingWindows <[email protected]> | 2022-11-17 13:36:07 +0700 |
|---|---|---|
| committer | EverythingWindows <[email protected]> | 2022-11-17 13:36:07 +0700 |
| commit | 4beaaa1988db67f89ed55d52738fe0d465d6482f (patch) | |
| tree | f9a55f7d23bfd3570f9aca794c5c88805ce7ae67 /ShiftOS-TheRevival/MainForms | |
| parent | 9d0b741e7b1ced233cd791f51e1c975b60d43acd (diff) | |
| download | shiftos-therevival-old-4beaaa1988db67f89ed55d52738fe0d465d6482f.tar.gz shiftos-therevival-old-4beaaa1988db67f89ed55d52738fe0d465d6482f.tar.bz2 shiftos-therevival-old-4beaaa1988db67f89ed55d52738fe0d465d6482f.zip | |
further isolate any terminal-related function from console
Diffstat (limited to 'ShiftOS-TheRevival/MainForms')
| -rw-r--r-- | ShiftOS-TheRevival/MainForms/Console.Designer.vb | 2 | ||||
| -rw-r--r-- | ShiftOS-TheRevival/MainForms/Console.resx | 3 | ||||
| -rw-r--r-- | ShiftOS-TheRevival/MainForms/Console.vb | 77 |
3 files changed, 6 insertions, 76 deletions
diff --git a/ShiftOS-TheRevival/MainForms/Console.Designer.vb b/ShiftOS-TheRevival/MainForms/Console.Designer.vb index 3e07714..3d73ced 100644 --- a/ShiftOS-TheRevival/MainForms/Console.Designer.vb +++ b/ShiftOS-TheRevival/MainForms/Console.Designer.vb @@ -28,6 +28,7 @@ Partial Class Console Me.InfoBar = New System.Windows.Forms.TextBox() Me.InfoBarTimer = New System.Windows.Forms.Timer(Me.components) Me.ToolBar = New System.Windows.Forms.TextBox() + Me.ShortcutHandler = New System.ComponentModel.BackgroundWorker() Me.SuspendLayout() ' 'TextBox1 @@ -102,4 +103,5 @@ Partial Class Console Friend WithEvents InfoBar As TextBox Friend WithEvents InfoBarTimer As Timer Friend WithEvents ToolBar As TextBox + Friend WithEvents ShortcutHandler As System.ComponentModel.BackgroundWorker End Class diff --git a/ShiftOS-TheRevival/MainForms/Console.resx b/ShiftOS-TheRevival/MainForms/Console.resx index 4224eae..38ebc49 100644 --- a/ShiftOS-TheRevival/MainForms/Console.resx +++ b/ShiftOS-TheRevival/MainForms/Console.resx @@ -123,4 +123,7 @@ <metadata name="InfoBarTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>153, 17</value> </metadata> + <metadata name="ShortcutHandler.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>274, 17</value> + </metadata> </root>
\ No newline at end of file diff --git a/ShiftOS-TheRevival/MainForms/Console.vb b/ShiftOS-TheRevival/MainForms/Console.vb index 5dca6dc..41d17fb 100644 --- a/ShiftOS-TheRevival/MainForms/Console.vb +++ b/ShiftOS-TheRevival/MainForms/Console.vb @@ -7,7 +7,7 @@ Public Class Console Public DisplayStory As Integer 'Keep record for displaying the DevX's or other's monologue Public StoryToTell As String 'Which chapter that you're going to be in Public ChangeInterpreter As Boolean = False 'Default interpreter is Terminal, if it's changed to True, there'll be other program used by Console - Public CurrentInterpreter As String = "terminal" 'Shows what program is using Console + Public CurrentInterpreter As String 'Shows what program is using Console Public CurrentDirectory As String 'Current Directory for ShiftOS Explorer Public Pseudodir As String 'Pseudo-directory for ShiftFS Public StayAtChapter As Boolean = False 'If this set to true, then intro for chapters are mostly going to be in @@ -21,81 +21,6 @@ Public Class Console InitializeTerminal() End Sub - Public Sub InitializeTerminal() - Strings.OnceInfo(1) = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS" - Strings.OnceInfo(4) = "!" - Strings.OnceInfo(7) = Width - Strings.OnceInfo(8) = Height - If Strings.IsFree = True Then - Strings.ComputerInfo(0) = "shiftos" - Strings.ComputerInfo(1) = "user" - CheckFeature() - Terminal_PrintPrompt() - Terminal_AssignPrompt() - Else - If StayAtChapter = True Then - LoadGame() - CheckFeature() - Terminal_PrintPrompt() - Terminal_AssignPrompt() - Else - If Strings.ComputerInfo(3) = "0" Then - TextBox1.ReadOnly = True - StayAtChapter = True - StoryOnlyTimer.Start() - Else - LoadGame() - CheckFeature() - Terminal_PrintPrompt() - Terminal_AssignPrompt() - End If - End If - End If - CurrentDirectory = Strings.OnceInfo(1) - Pseudodir = CurrentDirectory.Replace(Strings.OnceInfo(1), "!\") - TextRebind() - End Sub - - Public Sub CheckFeature() - If Strings.AvailableFeature(4) = "1" Then - If ToolBarUse = True Then - If Strings.OnceInfo(2) = "True" Then - InfoBarTimer.Start() - TextBox1.Dock = DockStyle.None - ToolBar.Visible = True - ToolBar.SendToBack() - InfoBar.Visible = True - InfoBar.SendToBack() - TextBox1.Dock = DockStyle.Fill - Else - TextBox1.Dock = DockStyle.None - InfoBar.Visible = False - ToolBar.Visible = True - ToolBar.SendToBack() - TextBox1.Dock = DockStyle.Fill - End If - Else - If Strings.OnceInfo(2) = "True" Then - InfoBarTimer.Start() - TextBox1.Dock = DockStyle.None - InfoBar.Visible = True - InfoBar.SendToBack() - ToolBar.Visible = False - TextBox1.Dock = DockStyle.Fill - Else - TextBox1.Dock = DockStyle.None - InfoBar.Visible = False - ToolBar.Visible = False - TextBox1.Dock = DockStyle.Fill - End If - End If - Else - TextBox1.Dock = DockStyle.None - InfoBar.Visible = False - TextBox1.Dock = DockStyle.Fill - End If - End Sub - Private Sub txtterm_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown KeyInput = e.KeyData InputKey = e.KeyData |
