Menu system, bc fixings, and references to directory navigation added

This commit is contained in:
EverythingWindows 2022-11-05 23:48:35 +07:00
parent ed6f6ee29d
commit a0e7f1ba37
12 changed files with 84 additions and 6 deletions

View file

@ -13,11 +13,12 @@
Strings.AvailableFeature(7) = "2" Strings.AvailableFeature(7) = "2"
Strings.AvailableFeature(8) = "2" Strings.AvailableFeature(8) = "2"
Strings.AvailableFeature(9) = "2" Strings.AvailableFeature(9) = "2"
Strings.AvailableFeature(10) = "2"
End Sub End Sub
Public Sub FreeRoamMode() Public Sub FreeRoamMode()
Strings.ComputerInfo(2) = "0" Strings.ComputerInfo(2) = "0"
Strings.ComputerInfo(4) = "9" Strings.ComputerInfo(4) = "11"
Strings.AvailableFeature(0) = "1" Strings.AvailableFeature(0) = "1"
Strings.AvailableFeature(1) = "1" Strings.AvailableFeature(1) = "1"
Strings.AvailableFeature(2) = "1" Strings.AvailableFeature(2) = "1"
@ -28,6 +29,7 @@
Strings.AvailableFeature(7) = "1" Strings.AvailableFeature(7) = "1"
Strings.AvailableFeature(8) = "1" Strings.AvailableFeature(8) = "1"
Strings.AvailableFeature(9) = "1" Strings.AvailableFeature(9) = "1"
Strings.AvailableFeature(10) = "1"
End Sub End Sub
Public Sub GodMode() Public Sub GodMode()
@ -43,5 +45,6 @@
Strings.AvailableFeature(7) = "2" Strings.AvailableFeature(7) = "2"
Strings.AvailableFeature(8) = "2" Strings.AvailableFeature(8) = "2"
Strings.AvailableFeature(9) = "2" Strings.AvailableFeature(9) = "2"
Strings.AvailableFeature(10) = "2"
End Sub End Sub
End Module End Module

View file

@ -22,6 +22,7 @@ Partial Class ShiftOSMenu
'Do not modify it using the code editor. 'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _ <System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent() Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.Label1 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label()
Me.btn_Aboot = New System.Windows.Forms.Button() Me.btn_Aboot = New System.Windows.Forms.Button()
@ -31,6 +32,7 @@ Partial Class ShiftOSMenu
Me.btn_Exit = New System.Windows.Forms.Button() Me.btn_Exit = New System.Windows.Forms.Button()
Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker() Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker()
Me.Thumbnail = New System.Windows.Forms.PictureBox() Me.Thumbnail = New System.Windows.Forms.PictureBox()
Me.BannerChange = New System.Windows.Forms.Timer(Me.components)
CType(Me.Thumbnail, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.Thumbnail, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout() Me.SuspendLayout()
' '
@ -113,6 +115,8 @@ Partial Class ShiftOSMenu
'Thumbnail 'Thumbnail
' '
Me.Thumbnail.BackColor = System.Drawing.Color.Silver Me.Thumbnail.BackColor = System.Drawing.Color.Silver
Me.Thumbnail.BackgroundImage = Global.ShiftOS_TheRevival.My.Resources.Resources.MenuBanner1
Me.Thumbnail.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
Me.Thumbnail.Dock = System.Windows.Forms.DockStyle.Right Me.Thumbnail.Dock = System.Windows.Forms.DockStyle.Right
Me.Thumbnail.Location = New System.Drawing.Point(264, 0) Me.Thumbnail.Location = New System.Drawing.Point(264, 0)
Me.Thumbnail.Name = "Thumbnail" Me.Thumbnail.Name = "Thumbnail"
@ -120,11 +124,14 @@ Partial Class ShiftOSMenu
Me.Thumbnail.TabIndex = 5 Me.Thumbnail.TabIndex = 5
Me.Thumbnail.TabStop = False Me.Thumbnail.TabStop = False
' '
'BannerChange
'
'
'ShiftOSMenu 'ShiftOSMenu
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.Color.Black Me.BackColor = System.Drawing.Color.DimGray
Me.ClientSize = New System.Drawing.Size(624, 441) Me.ClientSize = New System.Drawing.Size(624, 441)
Me.Controls.Add(Me.Thumbnail) Me.Controls.Add(Me.Thumbnail)
Me.Controls.Add(Me.lbl_BuildString) Me.Controls.Add(Me.lbl_BuildString)
@ -156,4 +163,5 @@ Partial Class ShiftOSMenu
Friend WithEvents btn_Exit As Button Friend WithEvents btn_Exit As Button
Friend WithEvents BackgroundWorker1 As System.ComponentModel.BackgroundWorker Friend WithEvents BackgroundWorker1 As System.ComponentModel.BackgroundWorker
Friend WithEvents Thumbnail As PictureBox Friend WithEvents Thumbnail As PictureBox
Friend WithEvents BannerChange As Timer
End Class End Class

View file

@ -120,4 +120,7 @@
<metadata name="BackgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="BackgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<metadata name="BannerChange.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>180, 17</value>
</metadata>
</root> </root>

View file

@ -4,6 +4,8 @@ Public Class ShiftOSMenu
Public Shared ActualBuildLab As String Public Shared ActualBuildLab As String
Public Shared BuildLab() As String Public Shared BuildLab() As String
Public Shared BannerUse As Integer = 1
Public Shared TimeToChange
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'Try 'Try
@ -24,6 +26,7 @@ Public Class ShiftOSMenu
' MsgBox("Why? Because of " & ex.Message) ' MsgBox("Why? Because of " & ex.Message)
'End Try 'End Try
CheckUpdate() CheckUpdate()
BannerChange.Start()
End Sub End Sub
Private Sub btn_Exit_Click(sender As Object, e As EventArgs) Handles btn_Exit.Click Private Sub btn_Exit_Click(sender As Object, e As EventArgs) Handles btn_Exit.Click
@ -111,4 +114,15 @@ Public Class ShiftOSMenu
Close() Close()
End If End If
End Sub End Sub
Private Sub BannerChange_Tick(sender As Object, e As EventArgs) Handles BannerChange.Tick
Select Case TimeToChange
Case 50
Thumbnail.BackgroundImage = My.Resources.MenuBanner1
Case 100
Thumbnail.BackgroundImage = My.Resources.MenuBanner2
TimeToChange = 0
End Select
TimeToChange = TimeToChange + 1
End Sub
End Class End Class

View file

@ -37,6 +37,9 @@
If Strings.AvailableFeature(9) = "0" Then If Strings.AvailableFeature(9) = "0" Then
Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "(bc | 10 CP) Basic Calculator" Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "(bc | 10 CP) Basic Calculator"
End If End If
If Strings.AvailableFeature(10) = "0" Then
Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "(2bitcolor | 100 CP) 2-bit Color Support"
End If
End If End If
End Sub End Sub
@ -116,6 +119,13 @@
Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Basic Calculator for simple calculation" & Environment.NewLine & Environment.NewLine & ManHeader(1) Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Basic Calculator for simple calculation" & Environment.NewLine & Environment.NewLine & ManHeader(1)
Terminal.BadCommand = False Terminal.BadCommand = False
End If End If
Case "2bitcolor"
If Strings.AvailableFeature(10) = "0" Then
ManHeader(0) = "2-bit Color Support"
ManHeader(1) = "100 CP"
Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & ManHeader(0) & Environment.NewLine & Environment.NewLine & "Adds 2 colours (Dark Gray, Light Gray) supports to the terminal" & Environment.NewLine & Environment.NewLine & ManHeader(1)
Terminal.BadCommand = False
End If
Case Else Case Else
Terminal.BadCommand = False Terminal.BadCommand = False
Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "Shiftorium: Bad command or not available" Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "Shiftorium: Bad command or not available"
@ -155,6 +165,9 @@
Case "bc" Case "bc"
Shiftorium_InstallFeatures(True, "bc", 9, 75) Shiftorium_InstallFeatures(True, "bc", 9, 75)
Terminal.BadCommand = False Terminal.BadCommand = False
Case "2bitcolor"
Shiftorium_InstallFeatures(True, "2bitcolor", 10, 100)
Terminal.BadCommand = False
Case Else Case Else
Terminal.BadCommand = False Terminal.BadCommand = False
Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "Shiftorium: Bad command or not available" Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "Shiftorium: Bad command or not available"
@ -185,6 +198,7 @@
Strings.AvailableFeature(3) = "1" Strings.AvailableFeature(3) = "1"
Strings.AvailableFeature(4) = "0" Strings.AvailableFeature(4) = "0"
Strings.AvailableFeature(8) = "0" Strings.AvailableFeature(8) = "0"
Strings.AvailableFeature(10) = "0"
success = True success = True
Case "infobar" Case "infobar"
Strings.AvailableFeature(4) = "1" Strings.AvailableFeature(4) = "1"

View file

@ -3,7 +3,7 @@
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(0) As String Public Shared OnceInfo(0) As String
Public Shared AvailableFeature(9) As String Public Shared AvailableFeature(10) As String
Public Shared CLIInterpreter As String Public Shared CLIInterpreter As String
Public Shared SaveFile As String Public Shared SaveFile As String
@ -28,6 +28,7 @@
' '
'OnceInfo Strings: 'OnceInfo Strings:
'0 = IsRoot? (0.1) (default : No) '0 = IsRoot? (0.1) (default : No)
'1 = RootDirectory (0.2.3) (default : My.Computer.FileSystem.SpecialDirectories.Temp & "\ShiftOS\ShiftFS\")
' '
'ComputerInfo Strings: 'ComputerInfo Strings:
'0 = Computer Name (0.1) (default : shiftos) '0 = Computer Name (0.1) (default : shiftos)
@ -47,15 +48,17 @@
'7 = Time by Hours [Showing time in hours form since midnight] (0.2.2) (default : 0) '7 = Time by Hours [Showing time in hours form since midnight] (0.2.2) (default : 0)
'8 = Shiftfetch [ShiftOS port of Neofetch, A command-line system information tool] (0.2.3) (default : 0) '8 = Shiftfetch [ShiftOS port of Neofetch, A command-line system information tool] (0.2.3) (default : 0)
'9 = bc [Basic Calculator for ShiftOS] (0.2.3) (default : 0) '9 = bc [Basic Calculator for ShiftOS] (0.2.3) (default : 0)
'10 = 2-bit Color Display [Adds Dark Gray and Light Gray support to the Display Driver] (0.2.3) (default : 0)
' '
'Features bought hierarchy : 'Features bought hierarchy :
'ShiftOS Help Manual (MAN) (20 CP) 'ShiftOS Help Manual (MAN) (20 CP)
'Terminal Clear (CLEAR) (25 CP) 'Terminal Clear (CLEAR) (25 CP)
'>Terminal Print (PRINT) (30 CP) '>Terminal Print (PRINT) (30 CP)
'>>Terminal Display Driver (TERMDSPDRV) (50 CP)
'>>>Terminal InfoBar (INFOBAR) (55 CP)
'>>>Shiftfetch (SHIFTFETCH) (75 CP)
'>>>2-bit Color Display (2BITCOLOR) (100 CP)
'>Basic Calculator (BC) (75 CP) '>Basic Calculator (BC) (75 CP)
'>>Terminal Display Driver (50 CP)
'>>>Terminal InfoBar (55 CP)
'>>>Shiftfetch (75 CP)
'>Time by Seconds (TIME, STIME) (10 CP) '>Time by Seconds (TIME, STIME) (10 CP)
'>>Time by Minutes (TIME, MTIME) (20 CP) '>>Time by Minutes (TIME, MTIME) (20 CP)
'>>>Time by Hours (Time, HTIME) (40 CP) '>>>Time by Hours (Time, HTIME) (40 CP)

View file

@ -10,6 +10,7 @@ Public Class Terminal
Public StoryToTell As String Public StoryToTell As String
Public ChangeInterpreter As Boolean = False Public ChangeInterpreter As Boolean = False
Public CurrentInterpreter As String = "terminal" Public CurrentInterpreter As String = "terminal"
Public CurrentDirectory As String
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
@ -19,6 +20,7 @@ Public Class Terminal
End Sub End Sub
Public Sub InitializeTerminal() Public Sub InitializeTerminal()
Strings.OnceInfo(1) = My.Computer.FileSystem.SpecialDirectories.Temp & "\ShiftOS\ShiftFS\"
If Strings.IsFree = True Then If Strings.IsFree = True Then
Strings.ComputerInfo(0) = "shiftos" Strings.ComputerInfo(0) = "shiftos"
Strings.ComputerInfo(1) = "user" Strings.ComputerInfo(1) = "user"
@ -143,6 +145,9 @@ Public Class Terminal
Else Else
TextBox1.Text = TextBox1.Text & Environment.NewLine TextBox1.Text = TextBox1.Text & Environment.NewLine
End If End If
If Strings.AvailableFeature(9) = 1 Then
TextBox1.Text = TextBox1.Text & Environment.NewLine & "BC Basic Calculator for simple calculation"
End If
If Strings.AvailableFeature(1) = 1 Then If Strings.AvailableFeature(1) = 1 Then
TextBox1.Text = TextBox1.Text & Environment.NewLine & "CLEAR Clear the terminal" TextBox1.Text = TextBox1.Text & Environment.NewLine & "CLEAR Clear the terminal"
End If End If

View file

@ -190,5 +190,25 @@ Namespace My.Resources
Return ResourceManager.GetString("man_ver", resourceCulture) Return ResourceManager.GetString("man_ver", resourceCulture)
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized resource of type System.Drawing.Bitmap.
'''</summary>
Friend ReadOnly Property MenuBanner1() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("MenuBanner1", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
End Get
End Property
'''<summary>
''' Looks up a localized resource of type System.Drawing.Bitmap.
'''</summary>
Friend ReadOnly Property MenuBanner2() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("MenuBanner2", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
End Get
End Property
End Module End Module
End Namespace End Namespace

View file

@ -157,4 +157,10 @@
<data name="man_ver" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="man_ver" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\man manuals\ver.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value> <value>..\resources\man manuals\ver.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data> </data>
<data name="MenuBanner1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ShiftOS_MenuBanner1.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="MenuBanner2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ShiftOS_MenuBanner2.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root> </root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

View file

@ -208,6 +208,8 @@
<Content Include="Resources\man Manuals\shiftorium.txt" /> <Content Include="Resources\man Manuals\shiftorium.txt" />
<Content Include="Resources\man Manuals\shutdown.txt" /> <Content Include="Resources\man Manuals\shutdown.txt" />
<Content Include="Resources\man Manuals\ver.txt" /> <Content Include="Resources\man Manuals\ver.txt" />
<None Include="Resources\ShiftOS_MenuBanner2.jpg" />
<None Include="Resources\ShiftOS_MenuBanner1.jpg" />
<Content Include="ShiftOS.ico" /> <Content Include="ShiftOS.ico" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />