From 16c2c5b6a7cd0e556d9da98f458d13d4dec8ded0 Mon Sep 17 00:00:00 2001 From: EverythingWindows Date: Tue, 22 Nov 2022 14:06:04 +0700 Subject: [PATCH] Proper move from 'Shifter from Console' into 'App Shifter' command --- ShiftOS-TheRevival/API/TerminalAPI.vb | 12 +- .../Functions/InGame/ROMs/Strings.vb | 9 ++ .../Applications/Console.Designer.vb | 2 +- .../Categories/DuWM_Shifter_About.Designer.vb | 80 ++++++++++++ .../DuWM/Categories/DuWM_Shifter_About.resx | 120 ++++++++++++++++++ .../DuWM/Categories/DuWM_Shifter_About.vb | 5 + .../Applications/Shifter/DuWM/DuWM_Shifter.vb | 30 +++-- ShiftOS-TheRevival/ShiftOS-TheRevival.vbproj | 10 ++ .../TerminalApplications/Internal/Com_App.vb | 14 ++ 9 files changed, 265 insertions(+), 17 deletions(-) create mode 100644 ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_About.Designer.vb create mode 100644 ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_About.resx create mode 100644 ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_About.vb create mode 100644 ShiftOS-TheRevival/TerminalApplications/Internal/Com_App.vb diff --git a/ShiftOS-TheRevival/API/TerminalAPI.vb b/ShiftOS-TheRevival/API/TerminalAPI.vb index 6b3a0d0..988739e 100644 --- a/ShiftOS-TheRevival/API/TerminalAPI.vb +++ b/ShiftOS-TheRevival/API/TerminalAPI.vb @@ -283,11 +283,6 @@ Module TerminalAPI If IsStartG = False Then StartG() End If - Case "shiftertest" - 'DuWM_SecondWindowSet(Shifter) - 'Console.Close() - 'DuWM_FirstWindowSet(Console) - DuWM_NewProcess(DuWM_Shifter) Case "stopg" If IsStartG = True Then StopG() @@ -320,6 +315,13 @@ Module TerminalAPI End Select If AdvancedCommand = True Then + If command Like "app *" Then + If IsStartG = True Then + App() + AdvancedCommand = False + NormalCommand() + End If + End If If command Like "cat *" Then If Strings.AvailableFeature(16) = 1 Then CatFile(command.Substring(4)) diff --git a/ShiftOS-TheRevival/Functions/InGame/ROMs/Strings.vb b/ShiftOS-TheRevival/Functions/InGame/ROMs/Strings.vb index dfd4572..6bd9ac7 100644 --- a/ShiftOS-TheRevival/Functions/InGame/ROMs/Strings.vb +++ b/ShiftOS-TheRevival/Functions/InGame/ROMs/Strings.vb @@ -87,6 +87,8 @@ '34 = MathQuiz [Simple arithmatical question game to get codepoint] (default : 0) ' 'Features bought hierarchy : + ' + 'Chapter 1: 'ShiftOS Key (KEY) (5 CP) '>ShiftOS Help Manual (MAN) (10 CP) '>>Custom Username (USERNAME) (15 CP) @@ -123,4 +125,11 @@ '>>>>>>>>>>Date by year (DATE, YEAR (85 CP)) '>>>>>>>>>>>Date by month and year (DATE, MMYYYY (90 CP)) '>>>>>>>>>>>>Date by general (DATE, GENERALDATE (95 CP)) + ' + 'Chpater 2: + '>Dual Window Manager (200 CP) + '>>DuWM RGB Support (225 CP) + '>>>DuWM 16 Colors Support (275 CP) + '>>Shifter (250 CP) + '>>Knowledge Input (275 CP) End Class diff --git a/ShiftOS-TheRevival/MainForms/Applications/Console.Designer.vb b/ShiftOS-TheRevival/MainForms/Applications/Console.Designer.vb index 79bd379..4ecd5b5 100644 --- a/ShiftOS-TheRevival/MainForms/Applications/Console.Designer.vb +++ b/ShiftOS-TheRevival/MainForms/Applications/Console.Designer.vb @@ -88,7 +88,7 @@ Partial Class Console ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.BackColor = System.Drawing.Color.Red + Me.BackColor = System.Drawing.Color.Black Me.ClientSize = New System.Drawing.Size(800, 450) Me.Controls.Add(Me.TextBox1) Me.Controls.Add(Me.InfoBar) diff --git a/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_About.Designer.vb b/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_About.Designer.vb new file mode 100644 index 0000000..4c4521a --- /dev/null +++ b/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_About.Designer.vb @@ -0,0 +1,80 @@ + +Partial Class DuWM_Shifter_About + Inherits System.Windows.Forms.UserControl + + 'UserControl overrides dispose to clean up the component list. + + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + + Private Sub InitializeComponent() + Me.lbl_Title = New System.Windows.Forms.Label() + Me.lbl_ShiftOSVersion = New System.Windows.Forms.Label() + Me.Label1 = New System.Windows.Forms.Label() + Me.SuspendLayout() + ' + 'lbl_Title + ' + Me.lbl_Title.AutoSize = True + Me.lbl_Title.Font = New System.Drawing.Font("Segoe UI", 24.0!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle)) + Me.lbl_Title.Location = New System.Drawing.Point(11, 10) + Me.lbl_Title.Name = "lbl_Title" + Me.lbl_Title.Size = New System.Drawing.Size(111, 45) + Me.lbl_Title.TabIndex = 0 + Me.lbl_Title.Text = "About" + ' + 'lbl_ShiftOSVersion + ' + Me.lbl_ShiftOSVersion.AutoSize = True + Me.lbl_ShiftOSVersion.Font = New System.Drawing.Font("Segoe UI", 12.0!) + Me.lbl_ShiftOSVersion.ForeColor = System.Drawing.Color.Black + Me.lbl_ShiftOSVersion.Location = New System.Drawing.Point(15, 97) + Me.lbl_ShiftOSVersion.Name = "lbl_ShiftOSVersion" + Me.lbl_ShiftOSVersion.Size = New System.Drawing.Size(123, 21) + Me.lbl_ShiftOSVersion.TabIndex = 2 + Me.lbl_ShiftOSVersion.Text = "ShiftOS Version " + ' + 'Label1 + ' + Me.Label1.AutoSize = True + Me.Label1.Font = New System.Drawing.Font("Segoe UI", 12.0!) + Me.Label1.ForeColor = System.Drawing.Color.Black + Me.Label1.Location = New System.Drawing.Point(15, 69) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(244, 21) + Me.Label1.TabIndex = 2 + Me.Label1.Text = "Shifter for Dual Window Manager" + ' + 'DuWM_Shifter_About + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.BackColor = System.Drawing.Color.White + Me.Controls.Add(Me.Label1) + Me.Controls.Add(Me.lbl_ShiftOSVersion) + Me.Controls.Add(Me.lbl_Title) + Me.Name = "DuWM_Shifter_About" + Me.Size = New System.Drawing.Size(640, 480) + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents lbl_Title As Label + Friend WithEvents lbl_ShiftOSVersion As Label + Friend WithEvents Label1 As Label +End Class diff --git a/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_About.resx b/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_About.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_About.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_About.vb b/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_About.vb new file mode 100644 index 0000000..7591bdd --- /dev/null +++ b/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_About.vb @@ -0,0 +1,5 @@ +Public Class DuWM_Shifter_About + Private Sub DuWM_Shifter_Desktop_Load(sender As Object, e As EventArgs) Handles MyBase.Load + lbl_ShiftOSVersion.Text = lbl_ShiftOSVersion.Text & My.Resources.CurrentVersion + End Sub +End Class diff --git a/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/DuWM_Shifter.vb b/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/DuWM_Shifter.vb index fdd9ba2..b0b4afb 100644 --- a/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/DuWM_Shifter.vb +++ b/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/DuWM_Shifter.vb @@ -2,7 +2,7 @@ Private PrevHeight As Integer = Height Private PrevWidth As Integer = Width Private FeatureGap As Integer = 450 - 400 - Private ChildFeature As UserControl + Private ChildFeature As String Private Sub Shifter_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -21,15 +21,23 @@ End Sub Private Sub lst_Features_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lst_Features.SelectedIndexChanged - Select Case lst_Features.SelectedItem - Case "Desktop" - Dim Shifter_Desktop As New DuWM_Shifter_Desktop - Shifter_Desktop.Size = pnl_Content.Size - pnl_Content.Controls.Clear() - pnl_Content.Controls.Add(Shifter_Desktop) - Case "About" - pnl_Content.Controls.Clear() - MsgBox("Aboot") - End Select + If lst_Features.SelectedItem = ChildFeature Then + + Else + Select Case lst_Features.SelectedItem + Case "Desktop" + Dim Shifter_Desktop As New DuWM_Shifter_Desktop + Shifter_Desktop.Size = pnl_Content.Size + ChildFeature = "Desktop" + pnl_Content.Controls.Clear() + pnl_Content.Controls.Add(Shifter_Desktop) + Case "About" + ChildFeature = "About" + Dim Shifter_About As New DuWM_Shifter_About + Shifter_About.Size = pnl_Content.Size + pnl_Content.Controls.Clear() + pnl_Content.Controls.Add(Shifter_About) + End Select + End If End Sub End Class \ No newline at end of file diff --git a/ShiftOS-TheRevival/ShiftOS-TheRevival.vbproj b/ShiftOS-TheRevival/ShiftOS-TheRevival.vbproj index ad795ca..7a585ca 100644 --- a/ShiftOS-TheRevival/ShiftOS-TheRevival.vbproj +++ b/ShiftOS-TheRevival/ShiftOS-TheRevival.vbproj @@ -98,6 +98,12 @@ + + DuWM_Shifter_About.vb + + + UserControl + DuWM_Shifter_Desktop.vb @@ -200,6 +206,7 @@ + @@ -245,6 +252,9 @@ + + DuWM_Shifter_About.vb + DuWM_Shifter_Desktop.vb diff --git a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_App.vb b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_App.vb new file mode 100644 index 0000000..3afb7d6 --- /dev/null +++ b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_App.vb @@ -0,0 +1,14 @@ +Module Com_App + Public AppName As String + + Public Sub App() + AppName = command.Substring(4) + Select Case Strings.ComputerInfo(7) + Case 1 + Select Case AppName + Case "shifter" + DuWM_NewProcess(DuWM_Shifter) + End Select + End Select + End Sub +End Module