mirror of
https://github.com/EverythingWindows/ShiftOS-TheRevival-Old.git
synced 2025-01-22 18:02:16 +00:00
rework on main menu, terminal
This commit is contained in:
parent
f93ea520e9
commit
e007d91d42
6 changed files with 98 additions and 20 deletions
29
ShiftOS-TheRevival/MainForms/ShiftOSMenu.Designer.vb
generated
29
ShiftOS-TheRevival/MainForms/ShiftOSMenu.Designer.vb
generated
|
@ -30,6 +30,8 @@ Partial Class ShiftOSMenu
|
|||
Me.btn_FreeRoam = New System.Windows.Forms.Button()
|
||||
Me.btn_Exit = New System.Windows.Forms.Button()
|
||||
Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker()
|
||||
Me.Thumbnail = New System.Windows.Forms.PictureBox()
|
||||
CType(Me.Thumbnail, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Label1
|
||||
|
@ -60,8 +62,8 @@ Partial Class ShiftOSMenu
|
|||
Me.btn_Aboot.ForeColor = System.Drawing.Color.White
|
||||
Me.btn_Aboot.Location = New System.Drawing.Point(22, 166)
|
||||
Me.btn_Aboot.Name = "btn_Aboot"
|
||||
Me.btn_Aboot.Size = New System.Drawing.Size(158, 23)
|
||||
Me.btn_Aboot.TabIndex = 2
|
||||
Me.btn_Aboot.Size = New System.Drawing.Size(224, 23)
|
||||
Me.btn_Aboot.TabIndex = 3
|
||||
Me.btn_Aboot.Text = "About"
|
||||
Me.btn_Aboot.UseVisualStyleBackColor = True
|
||||
'
|
||||
|
@ -81,8 +83,8 @@ Partial Class ShiftOSMenu
|
|||
Me.btn_StoryMode.ForeColor = System.Drawing.Color.White
|
||||
Me.btn_StoryMode.Location = New System.Drawing.Point(22, 108)
|
||||
Me.btn_StoryMode.Name = "btn_StoryMode"
|
||||
Me.btn_StoryMode.Size = New System.Drawing.Size(158, 23)
|
||||
Me.btn_StoryMode.TabIndex = 2
|
||||
Me.btn_StoryMode.Size = New System.Drawing.Size(224, 23)
|
||||
Me.btn_StoryMode.TabIndex = 1
|
||||
Me.btn_StoryMode.Text = "Story Mode"
|
||||
Me.btn_StoryMode.UseVisualStyleBackColor = True
|
||||
'
|
||||
|
@ -92,7 +94,7 @@ Partial Class ShiftOSMenu
|
|||
Me.btn_FreeRoam.ForeColor = System.Drawing.Color.White
|
||||
Me.btn_FreeRoam.Location = New System.Drawing.Point(22, 137)
|
||||
Me.btn_FreeRoam.Name = "btn_FreeRoam"
|
||||
Me.btn_FreeRoam.Size = New System.Drawing.Size(158, 23)
|
||||
Me.btn_FreeRoam.Size = New System.Drawing.Size(224, 23)
|
||||
Me.btn_FreeRoam.TabIndex = 2
|
||||
Me.btn_FreeRoam.Text = "Free Roam Mode"
|
||||
Me.btn_FreeRoam.UseVisualStyleBackColor = True
|
||||
|
@ -103,17 +105,28 @@ Partial Class ShiftOSMenu
|
|||
Me.btn_Exit.ForeColor = System.Drawing.Color.White
|
||||
Me.btn_Exit.Location = New System.Drawing.Point(22, 195)
|
||||
Me.btn_Exit.Name = "btn_Exit"
|
||||
Me.btn_Exit.Size = New System.Drawing.Size(158, 23)
|
||||
Me.btn_Exit.TabIndex = 2
|
||||
Me.btn_Exit.Size = New System.Drawing.Size(224, 23)
|
||||
Me.btn_Exit.TabIndex = 4
|
||||
Me.btn_Exit.Text = "Exit"
|
||||
Me.btn_Exit.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Thumbnail
|
||||
'
|
||||
Me.Thumbnail.BackColor = System.Drawing.Color.Silver
|
||||
Me.Thumbnail.Dock = System.Windows.Forms.DockStyle.Right
|
||||
Me.Thumbnail.Location = New System.Drawing.Point(264, 0)
|
||||
Me.Thumbnail.Name = "Thumbnail"
|
||||
Me.Thumbnail.Size = New System.Drawing.Size(360, 441)
|
||||
Me.Thumbnail.TabIndex = 5
|
||||
Me.Thumbnail.TabStop = False
|
||||
'
|
||||
'ShiftOSMenu
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.BackColor = System.Drawing.Color.Black
|
||||
Me.ClientSize = New System.Drawing.Size(624, 441)
|
||||
Me.Controls.Add(Me.Thumbnail)
|
||||
Me.Controls.Add(Me.lbl_BuildString)
|
||||
Me.Controls.Add(Me.btn_FreeRoam)
|
||||
Me.Controls.Add(Me.btn_StoryMode)
|
||||
|
@ -126,6 +139,7 @@ Partial Class ShiftOSMenu
|
|||
Me.ShowIcon = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Main Menu"
|
||||
CType(Me.Thumbnail, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
|
@ -139,4 +153,5 @@ Partial Class ShiftOSMenu
|
|||
Friend WithEvents btn_FreeRoam As Button
|
||||
Friend WithEvents btn_Exit As Button
|
||||
Friend WithEvents BackgroundWorker1 As System.ComponentModel.BackgroundWorker
|
||||
Friend WithEvents Thumbnail As PictureBox
|
||||
End Class
|
||||
|
|
|
@ -30,6 +30,8 @@ Public Class ShiftOSMenu
|
|||
End Sub
|
||||
|
||||
Private Sub btn_FreeRoam_Click(sender As Object, e As EventArgs) Handles btn_FreeRoam.Click
|
||||
Select Case btn_FreeRoam.Text
|
||||
Case "Free Roam Mode"
|
||||
Try
|
||||
Strings.IsFree = True
|
||||
Terminal.Show()
|
||||
|
@ -40,5 +42,30 @@ Public Class ShiftOSMenu
|
|||
NewBugSlap.TextBox1.Text = ex.Message
|
||||
Close()
|
||||
End Try
|
||||
Case "Continue"
|
||||
MsgBox("This feature is in development")
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub btn_StoryMode_Click(sender As Object, e As EventArgs) Handles btn_StoryMode.Click
|
||||
Select Case btn_StoryMode.Text
|
||||
Case "Story Mode"
|
||||
btn_StoryMode.Text = "New Game"
|
||||
btn_FreeRoam.Text = "Continue"
|
||||
btn_Aboot.Text = "Back"
|
||||
btn_Exit.Visible = False
|
||||
Case "New Game"
|
||||
MsgBox("This feature is in development")
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub btn_Aboot_Click(sender As Object, e As EventArgs) Handles btn_Aboot.Click
|
||||
Select Case btn_Aboot.Text
|
||||
Case "Back"
|
||||
btn_StoryMode.Text = "Story Mode"
|
||||
btn_FreeRoam.Text = "Free Roam Mode"
|
||||
btn_Aboot.Text = "About"
|
||||
btn_Exit.Visible = True
|
||||
End Select
|
||||
End Sub
|
||||
End Class
|
||||
|
|
|
@ -36,4 +36,8 @@
|
|||
'AvailableFeature (Default is defined on the Story Mode, Free Mode automatically assigns every available feature to 1)Strings:
|
||||
'0 = MAN command [Manual on each command] (0.2) (default : 0)
|
||||
'1 = CLEAR command [Clearing the screen] (0.2) (default : 0)
|
||||
'
|
||||
'Features bought hierarchy :
|
||||
'MAN (20 CP)
|
||||
'CLEAR (25 CP)
|
||||
End Class
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
Public DefaultPrompt As String
|
||||
Public TrackPos As Integer
|
||||
Public AdvancedCommand As Boolean
|
||||
Public BadCommand As Boolean
|
||||
|
||||
Private Sub Terminal_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
FormBorderStyle = FormBorderStyle.None
|
||||
|
@ -44,6 +45,10 @@
|
|||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Undeveloped()
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "Oopsie! It's only for newer version"
|
||||
End Sub
|
||||
|
||||
Private Sub ReadCommand()
|
||||
command = TextBox1.Lines(TextBox1.Lines.Length - 1)
|
||||
command = command.Replace(DefaultPrompt, "")
|
||||
|
@ -52,17 +57,30 @@
|
|||
|
||||
Private Sub DoCommand()
|
||||
AdvancedCommand = True
|
||||
BadCommand = True
|
||||
Select Case command
|
||||
Case ""
|
||||
AdvancedCommand = False
|
||||
BadCommand = False
|
||||
Case "clear"
|
||||
If Strings.AvailableFeature(1) = "1" Then
|
||||
TextBox1.Text = Nothing
|
||||
AdvancedCommand = False
|
||||
BadCommand = False
|
||||
End If
|
||||
Case "codepoint"
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & Strings.ComputerInfo(2) & " Codepoint(s) available in your wallet"
|
||||
AdvancedCommand = False
|
||||
BadCommand = False
|
||||
Case "guess"
|
||||
'AppHost("gtn")
|
||||
Undeveloped()
|
||||
Case "help"
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "ShiftOS Help Manual" & Environment.NewLine & Environment.NewLine & "You can type 'help' to get all available commands and its corresponding action."
|
||||
If Strings.AvailableFeature(0) = 1 Then
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "To get help on each command, you can type 'man [command]'"
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "To get help on each command, you can type 'man [command]'" & Environment.NewLine
|
||||
Else
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine
|
||||
End If
|
||||
If Strings.AvailableFeature(1) = 1 Then
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "CLEAR Clear the terminal"
|
||||
|
@ -75,9 +93,12 @@
|
|||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "SHUTDOWN Terminate ShiftOS session"
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "VER Printing current version of ShiftOS TheRevival"
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine
|
||||
AdvancedCommand = False
|
||||
BadCommand = False
|
||||
Case "ver"
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "ShiftOS TheRevival version 0.1.1"
|
||||
AdvancedCommand = False
|
||||
BadCommand = False
|
||||
Case "shutdown", "shut down"
|
||||
ShiftOSMenu.Show()
|
||||
Close()
|
||||
|
@ -89,9 +110,14 @@
|
|||
Dim printed As String = command.Replace("print ", "")
|
||||
''It has the same issue, only displays in lowercase
|
||||
'TextBox1.Text = TextBox1.Text & Environment.NewLine & printed
|
||||
BadCommand = False
|
||||
End If
|
||||
AdvancedCommand = False
|
||||
End If
|
||||
|
||||
If BadCommand = True Then
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "Bad command or wrong file name"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub txtterm_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
|
||||
|
|
5
ShiftOS-TheRevival/MainForms/TerminalApps.vb
Normal file
5
ShiftOS-TheRevival/MainForms/TerminalApps.vb
Normal file
|
@ -0,0 +1,5 @@
|
|||
Module TerminalApps
|
||||
Public Sub AppHost(App As Object)
|
||||
|
||||
End Sub
|
||||
End Module
|
|
@ -110,6 +110,7 @@
|
|||
<Compile Include="MainForms\Terminal.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainForms\TerminalApps.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
|
|
Loading…
Reference in a new issue