From 30ceaeb60fcb83cd3eaf5ec7a3dd34e3abade51d Mon Sep 17 00:00:00 2001 From: EverythingWindows Date: Wed, 23 Nov 2022 08:36:50 +0700 Subject: [PATCH] DuWM enhancements --- ShiftOS-TheRevival/API/TerminalAPI.vb | 8 ++ .../Functions/InGame/ROMs/Strings.vb | 1 + .../Categories/DuWM_Shifter_About.Designer.vb | 0 .../Categories/DuWM_Shifter_About.resx | 0 .../Shifter}/Categories/DuWM_Shifter_About.vb | 0 .../DuWM_Shifter_Desktop.Designer.vb | 0 .../Categories/DuWM_Shifter_Desktop.resx | 0 .../Categories/DuWM_Shifter_Desktop.vb | 22 ++++ .../Shifter}/DuWM_Shifter.Designer.vb | 0 .../DuWM => DuWM/Shifter}/DuWM_Shifter.resx | 0 .../DuWM => DuWM/Shifter}/DuWM_Shifter.vb | 9 +- .../DuWM/Shifter/DuWM_Shifter_Configs.vb | 3 + .../DuWM/Categories/DuWM_Shifter_Desktop.vb | 9 -- .../Uni_KnowledgeInput.Designer.vb | 60 +++++++++ .../Knowledge Input/Uni_KnowledgeInput.resx | 120 ++++++++++++++++++ .../Knowledge Input/Uni_KnowledgeInput.vb | 3 + .../DualWindowManager/DuWM_Main.vb | 64 +++++----- ShiftOS-TheRevival/ShiftOS-TheRevival.vbproj | 29 +++-- .../TerminalApplications/Internal/Com_App.vb | 2 + .../Internal/Com_Taskkill.vb | 10 ++ 20 files changed, 291 insertions(+), 49 deletions(-) rename ShiftOS-TheRevival/MainForms/Applications/{Shifter/DuWM => DuWM/Shifter}/Categories/DuWM_Shifter_About.Designer.vb (100%) rename ShiftOS-TheRevival/MainForms/Applications/{Shifter/DuWM => DuWM/Shifter}/Categories/DuWM_Shifter_About.resx (100%) rename ShiftOS-TheRevival/MainForms/Applications/{Shifter/DuWM => DuWM/Shifter}/Categories/DuWM_Shifter_About.vb (100%) rename ShiftOS-TheRevival/MainForms/Applications/{Shifter/DuWM => DuWM/Shifter}/Categories/DuWM_Shifter_Desktop.Designer.vb (100%) rename ShiftOS-TheRevival/MainForms/Applications/{Shifter/DuWM => DuWM/Shifter}/Categories/DuWM_Shifter_Desktop.resx (100%) create mode 100644 ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/Categories/DuWM_Shifter_Desktop.vb rename ShiftOS-TheRevival/MainForms/Applications/{Shifter/DuWM => DuWM/Shifter}/DuWM_Shifter.Designer.vb (100%) rename ShiftOS-TheRevival/MainForms/Applications/{Shifter/DuWM => DuWM/Shifter}/DuWM_Shifter.resx (100%) rename ShiftOS-TheRevival/MainForms/Applications/{Shifter/DuWM => DuWM/Shifter}/DuWM_Shifter.vb (81%) create mode 100644 ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/DuWM_Shifter_Configs.vb delete mode 100644 ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_Desktop.vb create mode 100644 ShiftOS-TheRevival/MainForms/Applications/Universal/Knowledge Input/Uni_KnowledgeInput.Designer.vb create mode 100644 ShiftOS-TheRevival/MainForms/Applications/Universal/Knowledge Input/Uni_KnowledgeInput.resx create mode 100644 ShiftOS-TheRevival/MainForms/Applications/Universal/Knowledge Input/Uni_KnowledgeInput.vb create mode 100644 ShiftOS-TheRevival/TerminalApplications/Internal/Com_Taskkill.vb diff --git a/ShiftOS-TheRevival/API/TerminalAPI.vb b/ShiftOS-TheRevival/API/TerminalAPI.vb index 988739e..a8f28eb 100644 --- a/ShiftOS-TheRevival/API/TerminalAPI.vb +++ b/ShiftOS-TheRevival/API/TerminalAPI.vb @@ -252,6 +252,9 @@ Module TerminalAPI NormalCommand() End If Case "reboot" + If IsStartG = True Then + StopG() + End If Console.TextBox1.Text = Nothing AdvancedCommand = False NormalCommand() @@ -366,6 +369,11 @@ Module TerminalAPI Infobar() End If End If + If command Like "taskkill *" Then + Taskkill() + AdvancedCommand = False + NormalCommand() + End If If command Like "man *" Then If Strings.AvailableFeature(0) = "1" Then Manual(command) diff --git a/ShiftOS-TheRevival/Functions/InGame/ROMs/Strings.vb b/ShiftOS-TheRevival/Functions/InGame/ROMs/Strings.vb index 6bd9ac7..a8e423c 100644 --- a/ShiftOS-TheRevival/Functions/InGame/ROMs/Strings.vb +++ b/ShiftOS-TheRevival/Functions/InGame/ROMs/Strings.vb @@ -128,6 +128,7 @@ ' 'Chpater 2: '>Dual Window Manager (200 CP) + '>>Console Scrollbra (200 CP) '>>DuWM RGB Support (225 CP) '>>>DuWM 16 Colors Support (275 CP) '>>Shifter (250 CP) diff --git a/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_About.Designer.vb b/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/Categories/DuWM_Shifter_About.Designer.vb similarity index 100% rename from ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_About.Designer.vb rename to ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/Categories/DuWM_Shifter_About.Designer.vb diff --git a/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_About.resx b/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/Categories/DuWM_Shifter_About.resx similarity index 100% rename from ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_About.resx rename to ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/Categories/DuWM_Shifter_About.resx diff --git a/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_About.vb b/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/Categories/DuWM_Shifter_About.vb similarity index 100% rename from ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_About.vb rename to ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/Categories/DuWM_Shifter_About.vb diff --git a/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_Desktop.Designer.vb b/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/Categories/DuWM_Shifter_Desktop.Designer.vb similarity index 100% rename from ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_Desktop.Designer.vb rename to ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/Categories/DuWM_Shifter_Desktop.Designer.vb diff --git a/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_Desktop.resx b/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/Categories/DuWM_Shifter_Desktop.resx similarity index 100% rename from ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_Desktop.resx rename to ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/Categories/DuWM_Shifter_Desktop.resx diff --git a/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/Categories/DuWM_Shifter_Desktop.vb b/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/Categories/DuWM_Shifter_Desktop.vb new file mode 100644 index 0000000..6a476e2 --- /dev/null +++ b/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/Categories/DuWM_Shifter_Desktop.vb @@ -0,0 +1,22 @@ +Public Class DuWM_Shifter_Desktop + Private Sub DuWM_Shifter_Desktop_Load(sender As Object, e As EventArgs) Handles MyBase.Load + CheckAvailability() + End Sub + + Private Sub CheckAvailability() + + End Sub + + Private Sub cmb_DesktopColor_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmb_DesktopColor.SelectedIndexChanged + Select Case cmb_DesktopColor.SelectedItem + Case "Black" + DuWM_Shifter_Configs.DesktopBackColor = Color.Black + Case "White" + DuWM_Shifter_Configs.DesktopBackColor = Color.White + Case "Light Gray" + DuWM_Shifter_Configs.DesktopBackColor = Color.Silver + Case "Dark Gray" + DuWM_Shifter_Configs.DesktopBackColor = Color.Gray + End Select + End Sub +End Class diff --git a/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/DuWM_Shifter.Designer.vb b/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/DuWM_Shifter.Designer.vb similarity index 100% rename from ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/DuWM_Shifter.Designer.vb rename to ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/DuWM_Shifter.Designer.vb diff --git a/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/DuWM_Shifter.resx b/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/DuWM_Shifter.resx similarity index 100% rename from ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/DuWM_Shifter.resx rename to ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/DuWM_Shifter.resx diff --git a/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/DuWM_Shifter.vb b/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/DuWM_Shifter.vb similarity index 81% rename from ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/DuWM_Shifter.vb rename to ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/DuWM_Shifter.vb index b0b4afb..55f0e41 100644 --- a/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/DuWM_Shifter.vb +++ b/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/DuWM_Shifter.vb @@ -8,7 +8,7 @@ End Sub - Private Sub Button1_Click(sender As Object, e As EventArgs) Handles btn_Close.Click + Private Sub btn_Close_Click(sender As Object, e As EventArgs) Handles btn_Close.Click Close() End Sub @@ -40,4 +40,11 @@ End Select End If End Sub + + Private Sub btn_Apply_Click(sender As Object, e As EventArgs) Handles Button1.Click + Select Case lst_Features.SelectedItem + Case "Desktop" + Desktop.BackColor = DuWM_Shifter_Configs.DesktopBackColor + End Select + End Sub End Class \ No newline at end of file diff --git a/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/DuWM_Shifter_Configs.vb b/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/DuWM_Shifter_Configs.vb new file mode 100644 index 0000000..2b7c70d --- /dev/null +++ b/ShiftOS-TheRevival/MainForms/Applications/DuWM/Shifter/DuWM_Shifter_Configs.vb @@ -0,0 +1,3 @@ +Public Class DuWM_Shifter_Configs + Public Shared DesktopBackColor As Color +End Class diff --git a/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_Desktop.vb b/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_Desktop.vb deleted file mode 100644 index b2c458f..0000000 --- a/ShiftOS-TheRevival/MainForms/Applications/Shifter/DuWM/Categories/DuWM_Shifter_Desktop.vb +++ /dev/null @@ -1,9 +0,0 @@ -Public Class DuWM_Shifter_Desktop - Private Sub DuWM_Shifter_Desktop_Load(sender As Object, e As EventArgs) Handles MyBase.Load - CheckAvailability() - End Sub - - Private Sub CheckAvailability() - - End Sub -End Class diff --git a/ShiftOS-TheRevival/MainForms/Applications/Universal/Knowledge Input/Uni_KnowledgeInput.Designer.vb b/ShiftOS-TheRevival/MainForms/Applications/Universal/Knowledge Input/Uni_KnowledgeInput.Designer.vb new file mode 100644 index 0000000..da5c0b1 --- /dev/null +++ b/ShiftOS-TheRevival/MainForms/Applications/Universal/Knowledge Input/Uni_KnowledgeInput.Designer.vb @@ -0,0 +1,60 @@ + _ +Partial Class Uni_KnowledgeInput + Inherits System.Windows.Forms.Form + + 'Form 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.SuspendLayout() + ' + 'lbl_Title + ' + Me.lbl_Title.AutoSize = True + Me.lbl_Title.Font = New System.Drawing.Font("Comic Sans MS", 24.0!, System.Drawing.FontStyle.Bold) + Me.lbl_Title.Location = New System.Drawing.Point(12, 9) + Me.lbl_Title.Name = "lbl_Title" + Me.lbl_Title.Size = New System.Drawing.Size(274, 45) + Me.lbl_Title.TabIndex = 0 + Me.lbl_Title.Text = "Knowledge Input" + ' + 'Uni_KnowledgeInput + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.BackColor = System.Drawing.Color.White + Me.ClientSize = New System.Drawing.Size(784, 561) + Me.ControlBox = False + Me.Controls.Add(Me.lbl_Title) + Me.ForeColor = System.Drawing.Color.Black + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None + Me.Name = "Uni_KnowledgeInput" + Me.ShowIcon = False + Me.ShowInTaskbar = False + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Uni_KnowledgeInput" + Me.TopMost = True + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents lbl_Title As Label +End Class diff --git a/ShiftOS-TheRevival/MainForms/Applications/Universal/Knowledge Input/Uni_KnowledgeInput.resx b/ShiftOS-TheRevival/MainForms/Applications/Universal/Knowledge Input/Uni_KnowledgeInput.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS-TheRevival/MainForms/Applications/Universal/Knowledge Input/Uni_KnowledgeInput.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/Universal/Knowledge Input/Uni_KnowledgeInput.vb b/ShiftOS-TheRevival/MainForms/Applications/Universal/Knowledge Input/Uni_KnowledgeInput.vb new file mode 100644 index 0000000..c47e545 --- /dev/null +++ b/ShiftOS-TheRevival/MainForms/Applications/Universal/Knowledge Input/Uni_KnowledgeInput.vb @@ -0,0 +1,3 @@ +Public Class Uni_KnowledgeInput + +End Class \ No newline at end of file diff --git a/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_Main.vb b/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_Main.vb index 331927c..4a65742 100644 --- a/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_Main.vb +++ b/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_Main.vb @@ -41,38 +41,42 @@ Public Sub DuWM_NewProcess(ProcessName As Form) Dim NewWindow As New DuWM_WindowContainer - DuWM_CurrentProcess = DuWM_CurrentProcess + 1 - NewWindow.ChildForm = ProcessName - NewWindow.ChildForm.TopLevel = False - NewWindow.ChildForm.FormBorderStyle = FormBorderStyle.None - NewWindow.ChildForm.WindowState = FormWindowState.Normal - NewWindow.ChildForm.Visible = False - NewWindow.DuWM_ContainerPanel.Controls.Add(NewWindow.ChildForm) - Select Case NewWindow.ChildForm.Visible - Case False - NewWindow.ChildForm.Visible = True - Case Else - NewWindow.ChildForm.Visible = False - End Select - If ProcessName Is Console Then - Strings.ProcessID(0) = 1 - NewWindow.DuWM_PID = 0 + If DuWM_CurrentProcess = 2 Then + NewLine("You've reached the limit of usable programs") Else - Strings.ProcessID(1) = 1 - NewWindow.DuWM_PID = 1 + DuWM_CurrentProcess = DuWM_CurrentProcess + 1 + NewWindow.ChildForm = ProcessName + NewWindow.ChildForm.TopLevel = False + NewWindow.ChildForm.FormBorderStyle = FormBorderStyle.None + NewWindow.ChildForm.WindowState = FormWindowState.Normal + NewWindow.ChildForm.Visible = False + NewWindow.DuWM_ContainerPanel.Controls.Add(NewWindow.ChildForm) + Select Case NewWindow.ChildForm.Visible + Case False + NewWindow.ChildForm.Visible = True + Case Else + NewWindow.ChildForm.Visible = False + End Select + If ProcessName Is Console Then + Strings.ProcessID(0) = 1 + NewWindow.DuWM_PID = 0 + Else + Strings.ProcessID(1) = 1 + NewWindow.DuWM_PID = 1 + End If + NewWindow.Show() + Select Case DuWM_CurrentProcess + Case 1 + NewWindow.Height = Desktop.Height - 20 + NewWindow.Width = Desktop.Width - 20 + NewWindow.Location = New Point(10, 10) + Case 2 + NewWindow.Height = Desktop.Height - 20 + NewWindow.Width = (Desktop.Width / 2) - 20 + NewWindow.Location = New Point((Desktop.Width / 2) + 10, 10) + End Select + DuWM_ChangeLayout = True End If - NewWindow.Show() - Select Case DuWM_CurrentProcess - Case 1 - NewWindow.Height = Desktop.Height - 20 - NewWindow.Width = Desktop.Width - 20 - NewWindow.Location = New Point(10, 10) - Case 2 - NewWindow.Height = Desktop.Height - 20 - NewWindow.Width = (Desktop.Width / 2) - 20 - NewWindow.Location = New Point((Desktop.Width / 2) + 10, 10) - End Select - DuWM_ChangeLayout = True End Sub 'Public Sub DuWM_GenerateWindowSet(WindowName As Form, PID As Integer) diff --git a/ShiftOS-TheRevival/ShiftOS-TheRevival.vbproj b/ShiftOS-TheRevival/ShiftOS-TheRevival.vbproj index 7a585ca..567ed45 100644 --- a/ShiftOS-TheRevival/ShiftOS-TheRevival.vbproj +++ b/ShiftOS-TheRevival/ShiftOS-TheRevival.vbproj @@ -98,22 +98,29 @@ - + DuWM_Shifter_About.vb - + UserControl - + DuWM_Shifter_Desktop.vb - + UserControl - + + DuWM_Shifter.vb - + + Form + + + Uni_KnowledgeInput.vb + + Form @@ -227,6 +234,7 @@ + @@ -252,15 +260,18 @@ - + DuWM_Shifter_About.vb - + DuWM_Shifter_Desktop.vb - + DuWM_Shifter.vb + + Uni_KnowledgeInput.vb + BugSlap.vb diff --git a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_App.vb b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_App.vb index 3afb7d6..ce0e246 100644 --- a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_App.vb +++ b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_App.vb @@ -6,6 +6,8 @@ Select Case Strings.ComputerInfo(7) Case 1 Select Case AppName + Case "knowledge_input" + DuWM_NewProcess(Uni_KnowledgeInput) Case "shifter" DuWM_NewProcess(DuWM_Shifter) End Select diff --git a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Taskkill.vb b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Taskkill.vb new file mode 100644 index 0000000..6cd12c9 --- /dev/null +++ b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Taskkill.vb @@ -0,0 +1,10 @@ +Module Com_Taskkill + Public Sub Taskkill() + Dim PID As Integer = command.Substring(9) + If PID = 0 Then + NewLine("You cannot kill Terminal in this Window Manager") + Else + Strings.ProcessID(PID) = 0 + End If + End Sub +End Module