mirror of
https://github.com/EverythingWindows/ShiftOS-TheRevival-Old.git
synced 2025-01-22 11:21:47 -05:00
Refined ShiftOS Menu to be more finished and added del command
This commit is contained in:
parent
8e9314fd63
commit
0a2b03e312
6 changed files with 58 additions and 15 deletions
|
@ -8,6 +8,12 @@ Module FileManagement
|
|||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub DeleteFile(filename As String)
|
||||
If File.Exists(Terminal.CurrentDirectory & "\" & filename) = True Then
|
||||
File.Delete(Terminal.CurrentDirectory & "\" & filename)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub SaveFile(filename As String)
|
||||
'If File.Exists(Terminal.CurrentDirectory & "\" & filename) = False Then
|
||||
' File.WriteAllText(Terminal.CurrentDirectory & "\" & filename, Terminal.TextBox1.Text)
|
||||
|
|
23
ShiftOS-TheRevival/MainForms/ShiftOSMenu.Designer.vb
generated
23
ShiftOS-TheRevival/MainForms/ShiftOSMenu.Designer.vb
generated
|
@ -33,6 +33,7 @@ Partial Class ShiftOSMenu
|
|||
Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker()
|
||||
Me.Thumbnail = New System.Windows.Forms.PictureBox()
|
||||
Me.BannerChange = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
CType(Me.Thumbnail, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
|
@ -63,7 +64,7 @@ Partial Class ShiftOSMenu
|
|||
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.Location = New System.Drawing.Point(22, 166)
|
||||
Me.btn_Aboot.Location = New System.Drawing.Point(22, 184)
|
||||
Me.btn_Aboot.Name = "btn_Aboot"
|
||||
Me.btn_Aboot.Size = New System.Drawing.Size(224, 23)
|
||||
Me.btn_Aboot.TabIndex = 3
|
||||
|
@ -85,7 +86,7 @@ Partial Class ShiftOSMenu
|
|||
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.Location = New System.Drawing.Point(22, 108)
|
||||
Me.btn_StoryMode.Location = New System.Drawing.Point(22, 126)
|
||||
Me.btn_StoryMode.Name = "btn_StoryMode"
|
||||
Me.btn_StoryMode.Size = New System.Drawing.Size(224, 23)
|
||||
Me.btn_StoryMode.TabIndex = 1
|
||||
|
@ -97,7 +98,7 @@ Partial Class ShiftOSMenu
|
|||
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.Location = New System.Drawing.Point(22, 137)
|
||||
Me.btn_FreeRoam.Location = New System.Drawing.Point(22, 155)
|
||||
Me.btn_FreeRoam.Name = "btn_FreeRoam"
|
||||
Me.btn_FreeRoam.Size = New System.Drawing.Size(224, 23)
|
||||
Me.btn_FreeRoam.TabIndex = 2
|
||||
|
@ -109,7 +110,7 @@ Partial Class ShiftOSMenu
|
|||
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.Location = New System.Drawing.Point(22, 195)
|
||||
Me.btn_Exit.Location = New System.Drawing.Point(22, 213)
|
||||
Me.btn_Exit.Name = "btn_Exit"
|
||||
Me.btn_Exit.Size = New System.Drawing.Size(224, 23)
|
||||
Me.btn_Exit.TabIndex = 4
|
||||
|
@ -131,6 +132,18 @@ Partial Class ShiftOSMenu
|
|||
'BannerChange
|
||||
'
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.AutoSize = True
|
||||
Me.Label3.Font = New System.Drawing.Font("Consolas", 12.0!)
|
||||
Me.Label3.ForeColor = System.Drawing.Color.White
|
||||
Me.Label3.Location = New System.Drawing.Point(18, 94)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(162, 19)
|
||||
Me.Label3.TabIndex = 1
|
||||
Me.Label3.Text = "Shift it your way"
|
||||
Me.Label3.Visible = False
|
||||
'
|
||||
'ShiftOSMenu
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
|
@ -143,6 +156,7 @@ Partial Class ShiftOSMenu
|
|||
Me.Controls.Add(Me.btn_StoryMode)
|
||||
Me.Controls.Add(Me.btn_Exit)
|
||||
Me.Controls.Add(Me.btn_Aboot)
|
||||
Me.Controls.Add(Me.Label3)
|
||||
Me.Controls.Add(Me.Label2)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
|
@ -168,4 +182,5 @@ Partial Class ShiftOSMenu
|
|||
Friend WithEvents BackgroundWorker1 As System.ComponentModel.BackgroundWorker
|
||||
Friend WithEvents Thumbnail As PictureBox
|
||||
Friend WithEvents BannerChange As Timer
|
||||
Friend WithEvents Label3 As Label
|
||||
End Class
|
||||
|
|
|
@ -51,12 +51,18 @@ Public Class ShiftOSMenu
|
|||
Close()
|
||||
End Try
|
||||
Case "Continue"
|
||||
MsgBox("This feature is in development")
|
||||
Strings.IsFree = False
|
||||
Strings.OnceInfo(6) = "story"
|
||||
Terminal.Show()
|
||||
Terminal.StayAtChapter = True
|
||||
Close()
|
||||
Case "No"
|
||||
Label3.Visible = False
|
||||
btn_StoryMode.Text = "Story Mode"
|
||||
btn_FreeRoam.Text = "Free Roam Mode"
|
||||
btn_Aboot.Text = "About"
|
||||
btn_Aboot.Visible = True
|
||||
btn_Exit.Visible = True
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
|
@ -68,9 +74,15 @@ Public Class ShiftOSMenu
|
|||
btn_Aboot.Text = "Back"
|
||||
btn_Exit.Visible = False
|
||||
Case "New Game"
|
||||
Label3.Text = "Are you sure?"
|
||||
Label3.Visible = True
|
||||
btn_StoryMode.Text = "Yes"
|
||||
btn_FreeRoam.Text = "No"
|
||||
btn_Aboot.Visible = False
|
||||
btn_Exit.Visible = False
|
||||
Case "Yes"
|
||||
Strings.IsFree = False
|
||||
Strings.OnceInfo(6) = "story"
|
||||
MsgBox("This feature is in development, be sure to watch out for bugs")
|
||||
IntroStory.Show()
|
||||
NewGameMode()
|
||||
Close()
|
||||
|
@ -149,7 +161,7 @@ Public Class ShiftOSMenu
|
|||
Label2.Text = "Debug it your way"
|
||||
End Sub
|
||||
|
||||
Private Sub Label2_Click(sender As Object, e As EventArgs) Handles Label2.Click
|
||||
Private Sub Label2_Click(sender As Object, e As EventArgs) Handles Label2.Click, Label3.Click
|
||||
If Label2.Text = "Debug it your way" Then
|
||||
Strings.IsFree = True
|
||||
GodMode()
|
||||
|
|
|
@ -352,6 +352,7 @@
|
|||
success = True
|
||||
Case "textpad"
|
||||
Strings.AvailableFeature(17) = "1"
|
||||
success = True
|
||||
End Select
|
||||
If success = False Then
|
||||
If IsCLI = True Then
|
||||
|
|
|
@ -177,9 +177,11 @@ Public Class Terminal
|
|||
AdvancedCommand = False
|
||||
BadCommand = False
|
||||
Case "dir"
|
||||
TerminalDirectories(CurrentDirectory)
|
||||
AdvancedCommand = False
|
||||
BadCommand = False
|
||||
If Strings.AvailableFeature(16) = "1" Then
|
||||
TerminalDirectories(CurrentDirectory)
|
||||
AdvancedCommand = False
|
||||
BadCommand = False
|
||||
End If
|
||||
Case "exit su"
|
||||
If Strings.OnceInfo(0) = "No" Then
|
||||
|
||||
|
@ -330,7 +332,7 @@ Public Class Terminal
|
|||
Close()
|
||||
Case "textpad"
|
||||
If Strings.AvailableFeature(17) = "1" Then
|
||||
TextBox1.Text = TextBox1.Text & "Type any filename after 'textpad'!, ex: textpad text.txt"
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "Type any filename after 'textpad'!, ex: textpad text.txt"
|
||||
AdvancedCommand = False
|
||||
BadCommand = False
|
||||
End If
|
||||
|
@ -390,6 +392,13 @@ Public Class Terminal
|
|||
GetColor("terminal", command.Substring(6, 1), command.Substring(7, 1))
|
||||
BadCommand = False
|
||||
End If
|
||||
If command Like "del *" Then
|
||||
If Strings.AvailableFeature(16) = 1 Then
|
||||
DeleteFile(command.Substring(4))
|
||||
AdvancedCommand = False
|
||||
BadCommand = False
|
||||
End If
|
||||
End If
|
||||
If command Like "infobar *" Then
|
||||
If Strings.AvailableFeature(4) = "1" Then
|
||||
'Infobar panel-ish and some sort
|
||||
|
|
|
@ -267,19 +267,19 @@ Module TerminalApps
|
|||
Select Case Terminal.TextBox1.TextLength
|
||||
Case 1 To 9
|
||||
Dim GetCP As New Random
|
||||
Dim GotCP As Integer = GetCP.Next(1, 6)
|
||||
Dim GotCP As Integer = GetCP.Next(1, 3)
|
||||
ChangeCP(True, GotCP)
|
||||
Case 10 To 99
|
||||
Dim GetCP As New Random
|
||||
Dim GotCP As Integer = GetCP.Next(1, 51)
|
||||
Dim GotCP As Integer = GetCP.Next(4, 26)
|
||||
ChangeCP(True, GotCP)
|
||||
Case 100 To 999
|
||||
Dim GetCP As New Random
|
||||
Dim GotCP As Integer = GetCP.Next(1, 501)
|
||||
Dim GotCP As Integer = GetCP.Next(27, 251)
|
||||
ChangeCP(True, GotCP)
|
||||
Case 1000 To 9999
|
||||
Dim GetCP As New Random
|
||||
Dim GotCP As Integer = GetCP.Next(1, 5001)
|
||||
Dim GotCP As Integer = GetCP.Next(252, 2501)
|
||||
ChangeCP(True, GotCP)
|
||||
End Select
|
||||
End Sub
|
||||
|
|
Loading…
Reference in a new issue