mirror of
https://github.com/EverythingWindows/ShiftOS-TheRevival-Old.git
synced 2025-01-22 18:02:16 +00:00
0.2.3 final code
This commit is contained in:
parent
2a3e5ec4d5
commit
1ca1bed37d
9 changed files with 233 additions and 109 deletions
|
@ -1,4 +1,6 @@
|
||||||
Module SaveLoadSystem
|
Imports System.IO
|
||||||
|
|
||||||
|
Module SaveLoadSystem
|
||||||
|
|
||||||
Public Sub NewGameMode()
|
Public Sub NewGameMode()
|
||||||
Strings.ComputerInfo(2) = "0"
|
Strings.ComputerInfo(2) = "0"
|
||||||
|
@ -61,4 +63,18 @@
|
||||||
Strings.AvailableFeature(14) = "2"
|
Strings.AvailableFeature(14) = "2"
|
||||||
Strings.AvailableFeature(15) = "2"
|
Strings.AvailableFeature(15) = "2"
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Sub SaveGame()
|
||||||
|
If Strings.OnceInfo(6) = "story" Then
|
||||||
|
File.WriteAllLines(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\saved\ComputerInfo.sos", Strings.ComputerInfo)
|
||||||
|
File.WriteAllLines(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\saved\AvailableFeature.sos", Strings.AvailableFeature)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub LoadGame()
|
||||||
|
If Strings.OnceInfo(6) = "story" Then
|
||||||
|
Strings.ComputerInfo = File.ReadAllLines(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\saved\ComputerInfo.sos")
|
||||||
|
Strings.AvailableFeature = File.ReadAllLines(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\saved\AvailableFeature.sos")
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Module
|
End Module
|
||||||
|
|
|
@ -61,6 +61,7 @@ Partial Class ShiftOSMenu
|
||||||
'btn_Aboot
|
'btn_Aboot
|
||||||
'
|
'
|
||||||
Me.btn_Aboot.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
Me.btn_Aboot.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||||
|
Me.btn_Aboot.Font = New System.Drawing.Font("Segoe UI", 8.25!)
|
||||||
Me.btn_Aboot.ForeColor = System.Drawing.Color.White
|
Me.btn_Aboot.ForeColor = System.Drawing.Color.White
|
||||||
Me.btn_Aboot.Location = New System.Drawing.Point(22, 166)
|
Me.btn_Aboot.Location = New System.Drawing.Point(22, 166)
|
||||||
Me.btn_Aboot.Name = "btn_Aboot"
|
Me.btn_Aboot.Name = "btn_Aboot"
|
||||||
|
@ -82,6 +83,7 @@ Partial Class ShiftOSMenu
|
||||||
'btn_StoryMode
|
'btn_StoryMode
|
||||||
'
|
'
|
||||||
Me.btn_StoryMode.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
Me.btn_StoryMode.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||||
|
Me.btn_StoryMode.Font = New System.Drawing.Font("Segoe UI", 8.25!)
|
||||||
Me.btn_StoryMode.ForeColor = System.Drawing.Color.White
|
Me.btn_StoryMode.ForeColor = System.Drawing.Color.White
|
||||||
Me.btn_StoryMode.Location = New System.Drawing.Point(22, 108)
|
Me.btn_StoryMode.Location = New System.Drawing.Point(22, 108)
|
||||||
Me.btn_StoryMode.Name = "btn_StoryMode"
|
Me.btn_StoryMode.Name = "btn_StoryMode"
|
||||||
|
@ -93,6 +95,7 @@ Partial Class ShiftOSMenu
|
||||||
'btn_FreeRoam
|
'btn_FreeRoam
|
||||||
'
|
'
|
||||||
Me.btn_FreeRoam.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
Me.btn_FreeRoam.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||||
|
Me.btn_FreeRoam.Font = New System.Drawing.Font("Segoe UI", 8.25!)
|
||||||
Me.btn_FreeRoam.ForeColor = System.Drawing.Color.White
|
Me.btn_FreeRoam.ForeColor = System.Drawing.Color.White
|
||||||
Me.btn_FreeRoam.Location = New System.Drawing.Point(22, 137)
|
Me.btn_FreeRoam.Location = New System.Drawing.Point(22, 137)
|
||||||
Me.btn_FreeRoam.Name = "btn_FreeRoam"
|
Me.btn_FreeRoam.Name = "btn_FreeRoam"
|
||||||
|
@ -104,6 +107,7 @@ Partial Class ShiftOSMenu
|
||||||
'btn_Exit
|
'btn_Exit
|
||||||
'
|
'
|
||||||
Me.btn_Exit.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
Me.btn_Exit.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||||
|
Me.btn_Exit.Font = New System.Drawing.Font("Segoe UI", 8.25!)
|
||||||
Me.btn_Exit.ForeColor = System.Drawing.Color.White
|
Me.btn_Exit.ForeColor = System.Drawing.Color.White
|
||||||
Me.btn_Exit.Location = New System.Drawing.Point(22, 195)
|
Me.btn_Exit.Location = New System.Drawing.Point(22, 195)
|
||||||
Me.btn_Exit.Name = "btn_Exit"
|
Me.btn_Exit.Name = "btn_Exit"
|
||||||
|
|
|
@ -26,8 +26,8 @@ Public Class ShiftOSMenu
|
||||||
'Catch ex As Exception
|
'Catch ex As Exception
|
||||||
' MsgBox("Why? Because of " & ex.Message)
|
' MsgBox("Why? Because of " & ex.Message)
|
||||||
'End Try
|
'End Try
|
||||||
|
CheckInstall()
|
||||||
CheckUpdate()
|
CheckUpdate()
|
||||||
'CheckInstall()
|
|
||||||
BannerChange.Start()
|
BannerChange.Start()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ Public Class ShiftOSMenu
|
||||||
Case "Free Roam Mode"
|
Case "Free Roam Mode"
|
||||||
Try
|
Try
|
||||||
Strings.IsFree = True
|
Strings.IsFree = True
|
||||||
|
Strings.OnceInfo(6) = "free"
|
||||||
FreeRoamMode()
|
FreeRoamMode()
|
||||||
Terminal.Show()
|
Terminal.Show()
|
||||||
Close()
|
Close()
|
||||||
|
@ -51,6 +52,11 @@ Public Class ShiftOSMenu
|
||||||
End Try
|
End Try
|
||||||
Case "Continue"
|
Case "Continue"
|
||||||
MsgBox("This feature is in development")
|
MsgBox("This feature is in development")
|
||||||
|
Strings.IsFree = False
|
||||||
|
Strings.OnceInfo(6) = "story"
|
||||||
|
Terminal.Show()
|
||||||
|
Terminal.StayAtChapter = True
|
||||||
|
Close()
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
@ -63,6 +69,7 @@ Public Class ShiftOSMenu
|
||||||
btn_Exit.Visible = False
|
btn_Exit.Visible = False
|
||||||
Case "New Game"
|
Case "New Game"
|
||||||
Strings.IsFree = False
|
Strings.IsFree = False
|
||||||
|
Strings.OnceInfo(6) = "story"
|
||||||
MsgBox("This feature is in development, be sure to watch out for bugs")
|
MsgBox("This feature is in development, be sure to watch out for bugs")
|
||||||
IntroStory.Show()
|
IntroStory.Show()
|
||||||
NewGameMode()
|
NewGameMode()
|
||||||
|
@ -82,12 +89,12 @@ Public Class ShiftOSMenu
|
||||||
|
|
||||||
Private Sub CheckUpdate()
|
Private Sub CheckUpdate()
|
||||||
Try
|
Try
|
||||||
If File.Exists("C:\SOS_NewVer.txt") = True Then
|
If File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\SOS_NewVer.txt") = True Then
|
||||||
File.Delete("C:\SOS_NewVer.txt")
|
File.Delete(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\SOS_NewVer.txt")
|
||||||
End If
|
End If
|
||||||
My.Computer.Network.DownloadFile("http://148.251.124.62:8080/ShiftOS/data/NewVer.txt", "C:\SOS_NewVer.txt")
|
My.Computer.Network.DownloadFile("http://148.251.124.62:8080/ShiftOS/data/NewVer.txt", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\SOS_NewVer.txt")
|
||||||
Dim CurrentVersion As String = My.Resources.CurrentVersion
|
Dim CurrentVersion As String = My.Resources.CurrentVersion
|
||||||
Dim NewVersion As String = File.ReadAllText("C:\SOS_NewVer.txt")
|
Dim NewVersion As String = File.ReadAllText(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\SOS_NewVer.txt")
|
||||||
If CurrentVersion = NewVersion Then
|
If CurrentVersion = NewVersion Then
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
@ -107,25 +114,33 @@ Public Class ShiftOSMenu
|
||||||
|
|
||||||
Private Sub CheckInstall()
|
Private Sub CheckInstall()
|
||||||
If Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS") = True Then
|
If Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS") = True Then
|
||||||
Dim WhatVersion As String = File.ReadAllText(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\version.txt")
|
'Dim WhatVersion As String = File.ReadAllText(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\version.txt")
|
||||||
If WhatVersion = My.Resources.CurrentVersion Then
|
'If WhatVersion = My.Resources.CurrentVersion Then
|
||||||
|
|
||||||
Else
|
'Else
|
||||||
btn_Aboot.Enabled = False
|
' btn_Aboot.Enabled = False
|
||||||
btn_Exit.Enabled = False
|
' btn_Exit.Enabled = False
|
||||||
btn_FreeRoam.Enabled = False
|
' btn_FreeRoam.Enabled = False
|
||||||
btn_StoryMode.Enabled = False
|
' btn_StoryMode.Enabled = False
|
||||||
ShouldUpdate = True
|
' ShouldUpdate = True
|
||||||
ShiftOSUpdater.Show()
|
' ShiftOSUpdater.Show()
|
||||||
End If
|
'End If
|
||||||
Else
|
Else
|
||||||
If Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS") = True Then
|
If Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS") = True Then
|
||||||
If Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS") = True Then
|
If Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS") = True Then
|
||||||
Directory.CreateDirectory(My.Computer.FileSystem.GetTempFileName & "\ShiftOS\ShiftFS")
|
|
||||||
|
Else
|
||||||
|
Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS")
|
||||||
|
End If
|
||||||
|
If Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\saved") = True Then
|
||||||
|
|
||||||
|
Else
|
||||||
|
Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\saved")
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Directory.CreateDirectory(My.Computer.FileSystem.GetTempFileName & "\ShiftOS")
|
Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS")
|
||||||
Directory.CreateDirectory(My.Computer.FileSystem.GetTempFileName & "\ShiftOS\ShiftFS")
|
Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS")
|
||||||
|
Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\saved")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Public Shared OSInfo() As String
|
Public Shared OSInfo() As String
|
||||||
Public Shared ComputerInfo(4) As String
|
Public Shared ComputerInfo(4) As String
|
||||||
Public Shared IsFree As Boolean
|
Public Shared IsFree As Boolean
|
||||||
Public Shared OnceInfo(4) As String
|
Public Shared OnceInfo(6) As String
|
||||||
Public Shared AvailableFeature(15) As String
|
Public Shared AvailableFeature(15) As String
|
||||||
Public Shared CLIInterpreter As String
|
Public Shared CLIInterpreter As String
|
||||||
Public Shared SaveFile As String
|
Public Shared SaveFile As String
|
||||||
|
@ -32,6 +32,8 @@
|
||||||
'2 = Infobar Boolean (0.2.3) (default : True)
|
'2 = Infobar Boolean (0.2.3) (default : True)
|
||||||
'3 = Color for Terminal (0.2.3) (default : 0F)
|
'3 = Color for Terminal (0.2.3) (default : 0F)
|
||||||
'4 = RootDirectoryString (0.2.3) (default : !)
|
'4 = RootDirectoryString (0.2.3) (default : !)
|
||||||
|
'5 = Terminal TrackPos (0.2.3) (default : 0)
|
||||||
|
'6 = GameMode (0.2.3) (dependant)
|
||||||
'
|
'
|
||||||
'ComputerInfo Strings:
|
'ComputerInfo Strings:
|
||||||
'0 = Computer Name (0.1) (default : shiftos)
|
'0 = Computer Name (0.1) (default : shiftos)
|
||||||
|
|
19
ShiftOS-TheRevival/MainForms/Terminal.Designer.vb
generated
19
ShiftOS-TheRevival/MainForms/Terminal.Designer.vb
generated
|
@ -27,6 +27,7 @@ Partial Class Terminal
|
||||||
Me.StoryOnlyTimer = New System.Windows.Forms.Timer(Me.components)
|
Me.StoryOnlyTimer = New System.Windows.Forms.Timer(Me.components)
|
||||||
Me.InfoBar = New System.Windows.Forms.TextBox()
|
Me.InfoBar = New System.Windows.Forms.TextBox()
|
||||||
Me.InfoBarTimer = New System.Windows.Forms.Timer(Me.components)
|
Me.InfoBarTimer = New System.Windows.Forms.Timer(Me.components)
|
||||||
|
Me.ToolBar = New System.Windows.Forms.TextBox()
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
'TextBox1
|
'TextBox1
|
||||||
|
@ -36,10 +37,10 @@ Partial Class Terminal
|
||||||
Me.TextBox1.Dock = System.Windows.Forms.DockStyle.Fill
|
Me.TextBox1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
Me.TextBox1.Font = New System.Drawing.Font("Consolas", 11.0!)
|
Me.TextBox1.Font = New System.Drawing.Font("Consolas", 11.0!)
|
||||||
Me.TextBox1.ForeColor = System.Drawing.Color.White
|
Me.TextBox1.ForeColor = System.Drawing.Color.White
|
||||||
Me.TextBox1.Location = New System.Drawing.Point(0, 0)
|
Me.TextBox1.Location = New System.Drawing.Point(0, 36)
|
||||||
Me.TextBox1.Multiline = True
|
Me.TextBox1.Multiline = True
|
||||||
Me.TextBox1.Name = "TextBox1"
|
Me.TextBox1.Name = "TextBox1"
|
||||||
Me.TextBox1.Size = New System.Drawing.Size(800, 432)
|
Me.TextBox1.Size = New System.Drawing.Size(800, 396)
|
||||||
Me.TextBox1.TabIndex = 0
|
Me.TextBox1.TabIndex = 0
|
||||||
'
|
'
|
||||||
'StoryOnlyTimer
|
'StoryOnlyTimer
|
||||||
|
@ -63,6 +64,18 @@ Partial Class Terminal
|
||||||
'InfoBarTimer
|
'InfoBarTimer
|
||||||
'
|
'
|
||||||
'
|
'
|
||||||
|
'ToolBar
|
||||||
|
'
|
||||||
|
Me.ToolBar.BorderStyle = System.Windows.Forms.BorderStyle.None
|
||||||
|
Me.ToolBar.Dock = System.Windows.Forms.DockStyle.Top
|
||||||
|
Me.ToolBar.Font = New System.Drawing.Font("Consolas", 11.0!)
|
||||||
|
Me.ToolBar.Location = New System.Drawing.Point(0, 0)
|
||||||
|
Me.ToolBar.Multiline = True
|
||||||
|
Me.ToolBar.Name = "ToolBar"
|
||||||
|
Me.ToolBar.Size = New System.Drawing.Size(800, 36)
|
||||||
|
Me.ToolBar.TabIndex = 1
|
||||||
|
Me.ToolBar.Visible = False
|
||||||
|
'
|
||||||
'Terminal
|
'Terminal
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
|
@ -71,6 +84,7 @@ Partial Class Terminal
|
||||||
Me.ClientSize = New System.Drawing.Size(800, 450)
|
Me.ClientSize = New System.Drawing.Size(800, 450)
|
||||||
Me.Controls.Add(Me.TextBox1)
|
Me.Controls.Add(Me.TextBox1)
|
||||||
Me.Controls.Add(Me.InfoBar)
|
Me.Controls.Add(Me.InfoBar)
|
||||||
|
Me.Controls.Add(Me.ToolBar)
|
||||||
Me.ForeColor = System.Drawing.Color.White
|
Me.ForeColor = System.Drawing.Color.White
|
||||||
Me.Name = "Terminal"
|
Me.Name = "Terminal"
|
||||||
Me.Text = "Terminal"
|
Me.Text = "Terminal"
|
||||||
|
@ -83,4 +97,5 @@ Partial Class Terminal
|
||||||
Friend WithEvents StoryOnlyTimer As Timer
|
Friend WithEvents StoryOnlyTimer As Timer
|
||||||
Friend WithEvents InfoBar As TextBox
|
Friend WithEvents InfoBar As TextBox
|
||||||
Friend WithEvents InfoBarTimer As Timer
|
Friend WithEvents InfoBarTimer As Timer
|
||||||
|
Friend WithEvents ToolBar As TextBox
|
||||||
End Class
|
End Class
|
||||||
|
|
|
@ -13,6 +13,8 @@ Public Class Terminal
|
||||||
Public CurrentDirectory As String
|
Public CurrentDirectory As String
|
||||||
Public Pseudodir As String
|
Public Pseudodir As String
|
||||||
Public StayAtChapter As Boolean = False
|
Public StayAtChapter As Boolean = False
|
||||||
|
Public ToolBarUse As Boolean = False
|
||||||
|
Public ReleaseCursor As Boolean = False
|
||||||
|
|
||||||
Private Sub Terminal_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
Private Sub Terminal_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
FormBorderStyle = FormBorderStyle.None
|
FormBorderStyle = FormBorderStyle.None
|
||||||
|
@ -34,6 +36,7 @@ Public Class Terminal
|
||||||
If StayAtChapter = True Then
|
If StayAtChapter = True Then
|
||||||
Strings.ComputerInfo(0) = "shiftos"
|
Strings.ComputerInfo(0) = "shiftos"
|
||||||
Strings.ComputerInfo(1) = "user"
|
Strings.ComputerInfo(1) = "user"
|
||||||
|
LoadGame()
|
||||||
CheckFeature()
|
CheckFeature()
|
||||||
PrintPrompt()
|
PrintPrompt()
|
||||||
AssignPrompt()
|
AssignPrompt()
|
||||||
|
@ -45,6 +48,7 @@ Public Class Terminal
|
||||||
Else
|
Else
|
||||||
Strings.ComputerInfo(0) = "shiftos"
|
Strings.ComputerInfo(0) = "shiftos"
|
||||||
Strings.ComputerInfo(1) = "user"
|
Strings.ComputerInfo(1) = "user"
|
||||||
|
LoadGame()
|
||||||
CheckFeature()
|
CheckFeature()
|
||||||
PrintPrompt()
|
PrintPrompt()
|
||||||
AssignPrompt()
|
AssignPrompt()
|
||||||
|
@ -59,16 +63,36 @@ Public Class Terminal
|
||||||
|
|
||||||
Public Sub CheckFeature()
|
Public Sub CheckFeature()
|
||||||
If Strings.AvailableFeature(4) = "1" Then
|
If Strings.AvailableFeature(4) = "1" Then
|
||||||
If Strings.OnceInfo(2) = "True" Then
|
If ToolBarUse = True Then
|
||||||
InfoBarTimer.Start()
|
If Strings.OnceInfo(2) = "True" Then
|
||||||
TextBox1.Dock = DockStyle.None
|
InfoBarTimer.Start()
|
||||||
InfoBar.Visible = True
|
TextBox1.Dock = DockStyle.None
|
||||||
InfoBar.SendToBack()
|
ToolBar.Visible = True
|
||||||
TextBox1.Dock = DockStyle.Fill
|
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
|
Else
|
||||||
TextBox1.Dock = DockStyle.None
|
If Strings.OnceInfo(2) = "True" Then
|
||||||
InfoBar.Visible = False
|
InfoBarTimer.Start()
|
||||||
TextBox1.Dock = DockStyle.Fill
|
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
|
End If
|
||||||
Else
|
Else
|
||||||
TextBox1.Dock = DockStyle.None
|
TextBox1.Dock = DockStyle.None
|
||||||
|
@ -117,7 +141,10 @@ Public Class Terminal
|
||||||
|
|
||||||
Private Sub ReadCommand()
|
Private Sub ReadCommand()
|
||||||
command = TextBox1.Lines(TextBox1.Lines.Length - 1)
|
command = TextBox1.Lines(TextBox1.Lines.Length - 1)
|
||||||
command = command.Replace(DefaultPrompt, "")
|
If DefaultPrompt = Nothing Then
|
||||||
|
Else
|
||||||
|
command = command.Replace(DefaultPrompt, "")
|
||||||
|
End If
|
||||||
command = command.ToLower()
|
command = command.ToLower()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
@ -131,7 +158,7 @@ Public Class Terminal
|
||||||
Case "bc"
|
Case "bc"
|
||||||
If Strings.AvailableFeature(9) = "1" Then
|
If Strings.AvailableFeature(9) = "1" Then
|
||||||
ChangeInterpreter = True
|
ChangeInterpreter = True
|
||||||
AppHost("bc")
|
AppHost("bc", False)
|
||||||
AdvancedCommand = False
|
AdvancedCommand = False
|
||||||
BadCommand = False
|
BadCommand = False
|
||||||
End If
|
End If
|
||||||
|
@ -155,7 +182,7 @@ Public Class Terminal
|
||||||
BadCommand = False
|
BadCommand = False
|
||||||
Case "guess"
|
Case "guess"
|
||||||
ChangeInterpreter = True
|
ChangeInterpreter = True
|
||||||
AppHost("guess")
|
AppHost("guess", False)
|
||||||
AdvancedCommand = False
|
AdvancedCommand = False
|
||||||
BadCommand = False
|
BadCommand = False
|
||||||
'Undeveloped()
|
'Undeveloped()
|
||||||
|
@ -215,7 +242,10 @@ Public Class Terminal
|
||||||
AdvancedCommand = False
|
AdvancedCommand = False
|
||||||
BadCommand = False
|
BadCommand = False
|
||||||
Case "textpad"
|
Case "textpad"
|
||||||
|
ChangeInterpreter = True
|
||||||
|
AppHost("textpad", True)
|
||||||
|
AdvancedCommand = False
|
||||||
|
BadCommand = False
|
||||||
Case "reboot"
|
Case "reboot"
|
||||||
TextBox1.Text = Nothing
|
TextBox1.Text = Nothing
|
||||||
AdvancedCommand = False
|
AdvancedCommand = False
|
||||||
|
@ -261,6 +291,9 @@ Public Class Terminal
|
||||||
BadCommand = False
|
BadCommand = False
|
||||||
Undeveloped()
|
Undeveloped()
|
||||||
Case "shutdown", "shut down"
|
Case "shutdown", "shut down"
|
||||||
|
If Strings.OnceInfo(6) = "story" Then
|
||||||
|
SaveGame()
|
||||||
|
End If
|
||||||
Cursor.Show()
|
Cursor.Show()
|
||||||
ShiftOSMenu.Show()
|
ShiftOSMenu.Show()
|
||||||
Close()
|
Close()
|
||||||
|
@ -459,6 +492,8 @@ Public Class Terminal
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub txtterm_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
|
Private Sub txtterm_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
|
||||||
|
|
||||||
|
|
||||||
Select Case e.KeyData
|
Select Case e.KeyData
|
||||||
Case (Keys.Control + Keys.Q)
|
Case (Keys.Control + Keys.Q)
|
||||||
If CurrentInterpreter = "terminal" Then
|
If CurrentInterpreter = "terminal" Then
|
||||||
|
@ -476,84 +511,102 @@ Public Class Terminal
|
||||||
' TerminateApp()
|
' TerminateApp()
|
||||||
' End If
|
' End If
|
||||||
'End Select
|
'End Select
|
||||||
Select Case e.KeyCode
|
If ReleaseCursor = True Then
|
||||||
Case Keys.ShiftKey
|
|
||||||
TrackPos = TrackPos - 1
|
|
||||||
Case Keys.Alt
|
|
||||||
TrackPos = TrackPos - 1
|
|
||||||
Case Keys.CapsLock
|
|
||||||
TrackPos = TrackPos - 1
|
|
||||||
Case Keys.ControlKey
|
|
||||||
TrackPos = TrackPos - 1
|
|
||||||
Case Keys.LWin
|
|
||||||
TrackPos = TrackPos - 1
|
|
||||||
Case Keys.RWin
|
|
||||||
TrackPos = TrackPos - 1
|
|
||||||
Case Keys.Right
|
|
||||||
If TextBox1.SelectionStart = TextBox1.TextLength Then
|
|
||||||
TrackPos = TrackPos - 1
|
|
||||||
End If
|
|
||||||
Case Keys.Left
|
|
||||||
If TrackPos < 1 Then
|
|
||||||
e.SuppressKeyPress = True
|
|
||||||
TrackPos = TrackPos - 1
|
|
||||||
Else
|
|
||||||
TrackPos = TrackPos - 2
|
|
||||||
End If
|
|
||||||
Case Keys.Up
|
|
||||||
e.SuppressKeyPress = True
|
|
||||||
TrackPos = TrackPos - 1
|
|
||||||
Case Keys.Down
|
|
||||||
e.SuppressKeyPress = True
|
|
||||||
TrackPos = TrackPos - 1
|
|
||||||
End Select
|
|
||||||
|
|
||||||
If e.KeyCode = Keys.Enter Then
|
|
||||||
e.SuppressKeyPress = True
|
|
||||||
If TextBox1.ReadOnly = True Then
|
|
||||||
|
|
||||||
Else
|
|
||||||
ReadCommand()
|
|
||||||
If ChangeInterpreter = True Then
|
|
||||||
DoChildCommand()
|
|
||||||
PrintPrompt()
|
|
||||||
TextBox1.Select(TextBox1.Text.Length, 0)
|
|
||||||
Else
|
|
||||||
DoCommand()
|
|
||||||
PrintPrompt()
|
|
||||||
TextBox1.Select(TextBox1.Text.Length, 0)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'If command = "clear" Then
|
|
||||||
' PrintPrompt()
|
|
||||||
' TextBox1.Select(TextBox1.Text.Length, 0)
|
|
||||||
|
|
||||||
'Else
|
|
||||||
' PrintPrompt()
|
|
||||||
' TextBox1.Select(TextBox1.Text.Length, 0)
|
|
||||||
'End If
|
|
||||||
|
|
||||||
TrackPos = 0
|
|
||||||
Else
|
Else
|
||||||
If e.KeyCode = Keys.Back Then
|
If ReleaseCursor = True Then
|
||||||
Else
|
|
||||||
TrackPos = TrackPos + 1
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If e.KeyCode = Keys.Back Then
|
|
||||||
If TrackPos < 1 Then
|
|
||||||
e.SuppressKeyPress = True
|
|
||||||
Else
|
Else
|
||||||
If TextBox1.SelectedText.Length < 1 Then
|
Select Case e.KeyCode
|
||||||
|
Case Keys.ShiftKey
|
||||||
|
TrackPos = TrackPos - 1
|
||||||
|
Case Keys.Alt
|
||||||
|
TrackPos = TrackPos - 1
|
||||||
|
Case Keys.CapsLock
|
||||||
|
TrackPos = TrackPos - 1
|
||||||
|
Case Keys.ControlKey
|
||||||
|
TrackPos = TrackPos - 1
|
||||||
|
Case Keys.Right
|
||||||
|
If TextBox1.SelectionStart = TextBox1.TextLength Then
|
||||||
|
TrackPos = TrackPos - 1
|
||||||
|
End If
|
||||||
|
Case Keys.Left
|
||||||
|
If TrackPos < 1 Then
|
||||||
|
e.SuppressKeyPress = True
|
||||||
|
TrackPos = TrackPos - 1
|
||||||
|
Else
|
||||||
|
TrackPos = TrackPos - 2
|
||||||
|
End If
|
||||||
|
Case Keys.Up
|
||||||
|
e.SuppressKeyPress = True
|
||||||
|
TrackPos = TrackPos - 1
|
||||||
|
Case Keys.Down
|
||||||
|
e.SuppressKeyPress = True
|
||||||
|
TrackPos = TrackPos - 1
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
Select Case e.KeyCode
|
||||||
|
Case Keys.LWin
|
||||||
TrackPos = TrackPos - 1
|
TrackPos = TrackPos - 1
|
||||||
|
Case Keys.RWin
|
||||||
|
TrackPos = TrackPos - 1
|
||||||
|
End Select
|
||||||
|
|
||||||
|
If e.KeyCode = Keys.Enter Then
|
||||||
|
e.SuppressKeyPress = True
|
||||||
|
If TextBox1.ReadOnly = True Then
|
||||||
|
|
||||||
Else
|
Else
|
||||||
e.SuppressKeyPress = True
|
ReadCommand()
|
||||||
|
If ChangeInterpreter = True Then
|
||||||
|
DoChildCommand()
|
||||||
|
PrintPrompt()
|
||||||
|
TextBox1.Select(TextBox1.Text.Length, 0)
|
||||||
|
Else
|
||||||
|
DoCommand()
|
||||||
|
PrintPrompt()
|
||||||
|
TextBox1.Select(TextBox1.Text.Length, 0)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
'If command = "clear" Then
|
||||||
|
' PrintPrompt()
|
||||||
|
' TextBox1.Select(TextBox1.Text.Length, 0)
|
||||||
|
|
||||||
|
'Else
|
||||||
|
' PrintPrompt()
|
||||||
|
' TextBox1.Select(TextBox1.Text.Length, 0)
|
||||||
|
'End If
|
||||||
|
|
||||||
|
TrackPos = 0
|
||||||
|
Else
|
||||||
|
If ReleaseCursor = True Then
|
||||||
|
|
||||||
|
Else
|
||||||
|
If e.KeyCode = Keys.Back Then
|
||||||
|
Else
|
||||||
|
TrackPos = TrackPos + 1
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
|
If ReleaseCursor = True Then
|
||||||
|
|
||||||
|
Else
|
||||||
|
If e.KeyCode = Keys.Back Then
|
||||||
|
If TrackPos < 1 Then
|
||||||
|
e.SuppressKeyPress = True
|
||||||
|
Else
|
||||||
|
If TextBox1.SelectedText.Length < 1 Then
|
||||||
|
TrackPos = TrackPos - 1
|
||||||
|
Else
|
||||||
|
e.SuppressKeyPress = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
TextBox1.Select(TextBox1.TextLength, 0)
|
TextBox1.Select(TextBox1.TextLength, 0)
|
||||||
TextBox1.ScrollToCaret()
|
TextBox1.ScrollToCaret()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
Strings.ComputerInfo(2) = Convert.ToString(TempCP)
|
Strings.ComputerInfo(2) = Convert.ToString(TempCP)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub AppHost(App As Object)
|
Public Sub AppHost(App As Object, UseToolBar As Boolean)
|
||||||
Select Case App
|
Select Case App
|
||||||
Case "bc"
|
Case "bc"
|
||||||
Terminal.DefaultPrompt = "> "
|
Terminal.DefaultPrompt = "> "
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
ShouldChange = True
|
ShouldChange = True
|
||||||
Case "guess" 'Guess the Number
|
Case "guess" 'Guess the Number
|
||||||
Terminal.DefaultPrompt = "Your answer: "
|
Terminal.DefaultPrompt = "Your answer: "
|
||||||
Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "Guess the Number" & Environment.NewLine & "Guess the correct number between 1 and 50 and you'll get anything between 1 to 5 Codepoints" & Environment.NewLine & "Type 'exit' to terminate this game"
|
Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "Guess the Number" & Environment.NewLine & "Guess the correct number between 1 and 50 and you'll get anything between 1 to 10 Codepoints" & Environment.NewLine & "Type 'exit' to terminate this game"
|
||||||
Terminal.CurrentInterpreter = "guess"
|
Terminal.CurrentInterpreter = "guess"
|
||||||
GTN_GenerateNumber()
|
GTN_GenerateNumber()
|
||||||
ShouldChange = True
|
ShouldChange = True
|
||||||
|
@ -49,7 +49,19 @@
|
||||||
ShiftoriumFX_DisplayPackages()
|
ShiftoriumFX_DisplayPackages()
|
||||||
Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & Environment.NewLine & "Type any package you want to investigate"
|
Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & Environment.NewLine & "Type any package you want to investigate"
|
||||||
ShouldChange = True
|
ShouldChange = True
|
||||||
|
Case "textpad"
|
||||||
|
Terminal.DefaultPrompt = ""
|
||||||
|
Terminal.ToolBarUse = True
|
||||||
|
Terminal.CheckFeature()
|
||||||
|
Terminal.CurrentInterpreter = "textpad"
|
||||||
|
Terminal.ToolBar.Text = "TextPad - " & Environment.NewLine & "Ctrl-Q Exit | Ctrl-N New | Ctrl-O Open | Ctrl-S Save | F12 Save As"
|
||||||
|
Terminal.TextBox1.Text = Nothing
|
||||||
|
Terminal.ReleaseCursor = True
|
||||||
End Select
|
End Select
|
||||||
|
If Terminal.ReleaseCursor = True Then
|
||||||
|
Strings.OnceInfo(5) = Terminal.TrackPos
|
||||||
|
Terminal.TrackPos = Nothing
|
||||||
|
End If
|
||||||
If ShouldChange = True Then
|
If ShouldChange = True Then
|
||||||
Terminal.ChangeInterpreter = True
|
Terminal.ChangeInterpreter = True
|
||||||
ShouldChange = False
|
ShouldChange = False
|
||||||
|
@ -57,8 +69,15 @@
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub TerminateApp()
|
Public Sub TerminateApp()
|
||||||
|
If Terminal.ReleaseCursor = True Then
|
||||||
|
Terminal.TrackPos = Strings.OnceInfo(5)
|
||||||
|
Strings.OnceInfo(5) = 0
|
||||||
|
End If
|
||||||
|
Terminal.ToolBarUse = False
|
||||||
Terminal.ChangeInterpreter = False
|
Terminal.ChangeInterpreter = False
|
||||||
|
Terminal.ReleaseCursor = False
|
||||||
Terminal.CurrentInterpreter = "terminal"
|
Terminal.CurrentInterpreter = "terminal"
|
||||||
|
Terminal.CheckFeature()
|
||||||
Terminal.AssignPrompt()
|
Terminal.AssignPrompt()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
@ -167,7 +186,7 @@
|
||||||
If TheirNumber > 0 And TheirNumber < 51 Then
|
If TheirNumber > 0 And TheirNumber < 51 Then
|
||||||
If TheirNumber = TheNumber Then
|
If TheirNumber = TheNumber Then
|
||||||
Dim GetCP As New Random
|
Dim GetCP As New Random
|
||||||
Dim GotCP As Integer = GetCP.Next(1, 6)
|
Dim GotCP As Integer = GetCP.Next(1, 11)
|
||||||
ChangeCP(True, GotCP)
|
ChangeCP(True, GotCP)
|
||||||
Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "You are correct!, you got " & GotCP & " Codepoint(s)" & Environment.NewLine & "Guess the new number between 1 and 50."
|
Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "You are correct!, you got " & GotCP & " Codepoint(s)" & Environment.NewLine & "Guess the new number between 1 and 50."
|
||||||
GTN_GenerateNumber()
|
GTN_GenerateNumber()
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
Remove this element if your application requires this virtualization for backwards
|
Remove this element if your application requires this virtualization for backwards
|
||||||
compatibility.
|
compatibility.
|
||||||
-->
|
-->
|
||||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||||
</requestedPrivileges>
|
</requestedPrivileges>
|
||||||
</security>
|
</security>
|
||||||
</trustInfo>
|
</trustInfo>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
0.2.2
|
0.2.3
|
Loading…
Reference in a new issue