diff --git a/ShiftOS-TheRevival/API/TerminalAPI.vb b/ShiftOS-TheRevival/API/TerminalAPI.vb index 5ba8923..b367fac 100644 --- a/ShiftOS-TheRevival/API/TerminalAPI.vb +++ b/ShiftOS-TheRevival/API/TerminalAPI.vb @@ -16,6 +16,7 @@ Module TerminalAPI If Strings.IsFree = True Then Strings.ComputerInfo(0) = "shiftos" Strings.ComputerInfo(1) = "user" + Strings.ComputerInfo(7) = 1 Terminal_CheckFeature() Terminal_PrintPrompt() Terminal_AssignPrompt() @@ -276,15 +277,15 @@ Module TerminalAPI Undeveloped() Case "shutdown", "shut down" TerminateShiftOS() - Case "startx" + Case "startg" Undeveloped() - StartX() + StartG() Case "shiftertest" DuWM_SecondWindowSet(Shifter) Console.Close() DuWM_FirstWindowSet(Console) - Case "stopx" - StopX() + Case "stopg" + StopG() Undeveloped() Case "textpad" If Strings.AvailableFeature(17) = "1" Then diff --git a/ShiftOS-TheRevival/Functions/InGame/SystemManager/Terminate.vb b/ShiftOS-TheRevival/Functions/InGame/SystemManager/Terminate.vb index 38f1a13..4309452 100644 --- a/ShiftOS-TheRevival/Functions/InGame/SystemManager/Terminate.vb +++ b/ShiftOS-TheRevival/Functions/InGame/SystemManager/Terminate.vb @@ -1,7 +1,7 @@ Module Terminate Public Sub TerminateShiftOS() NewLine("Stopping the Window Manager...") - StopX() + StopG() Console_Full() If Strings.OnceInfo(6) = "story" Then NewLine("Saving game...") diff --git a/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.Designer.vb b/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.Designer.vb index 54f7a80..e44cce2 100644 --- a/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.Designer.vb +++ b/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.Designer.vb @@ -42,8 +42,7 @@ Partial Class Desktop ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.BackColor = System.Drawing.Color.Red - Me.BackgroundImage = Global.ShiftOS_TheRevival.My.Resources.Resources.MenuBanner1 + Me.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer)) Me.ClientSize = New System.Drawing.Size(800, 450) Me.Controls.Add(Me.Button1) Me.ForeColor = System.Drawing.Color.White diff --git a/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.vb b/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.vb index 853bb8a..dcfcf33 100644 --- a/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.vb +++ b/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.vb @@ -12,6 +12,5 @@ Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click 'DuWM_FirstWindowSet(Console) - DuWM_SingleWindowSet(Console) End Sub End Class \ No newline at end of file diff --git a/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/DesktopManager.vb b/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/DesktopManager.vb index dd3ff8d..89d8b65 100644 --- a/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/DesktopManager.vb +++ b/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/DesktopManager.vb @@ -1,19 +1,29 @@ Module DesktopManager - Public Sub StartX() + Public Sub StartG() Desktop.Show() Desktop.FormBorderStyle = FormBorderStyle.None Desktop.WindowState = FormWindowState.Maximized Desktop.TopMost = False IsConsoleParent = False - OnlyOne = True Console.Close() + WindowManagerChoose() Cursor.Show() End Sub - Public Sub StopX() - Desktop.Close() + Public Sub StopG() + DuWM_CurrentProcess = 0 + Strings.ProcessID(0) = 0 + Strings.ProcessID(1) = 0 Cursor.Hide() - Console_Full() IsConsoleParent = True + Console.Show() + Desktop.Close() + End Sub + + Public Sub WindowManagerChoose() + Select Case Strings.ComputerInfo(7) + Case 1 + DuWM_Initiate() + End Select End Sub End Module diff --git a/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_Main.vb b/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_Main.vb index d74a3d8..ddeea59 100644 --- a/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_Main.vb +++ b/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_Main.vb @@ -2,6 +2,14 @@ Public OnlyOne As Boolean Public FirstWindow As Form Public SecondWindow As Form + Public DuWM_CurrentProcess As Integer = 0 + + Public Sub DuWM_Initiate() + Strings.ProcessID(0) = 0 + Strings.ProcessID(1) = 0 + 'DuWM_SingleWindowSet(Console) + DuWM_NewProcess(Console) + End Sub Public Sub DuWM_FirstWindowSet(WindowName As Form) WindowName.Show() @@ -27,6 +35,38 @@ WindowName.Width = Desktop.Width - 20 WindowName.Location = New Point(10, 10) FirstWindow = WindowName + Strings.ProcessID(0) = 1 + End Sub + + 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 + 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) + End Select End Sub 'Public Sub DuWM_GenerateWindowSet(WindowName As Form, PID As Integer) diff --git a/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_WindowContainer.Designer.vb b/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_WindowContainer.Designer.vb index b9d6a4e..a0239ac 100644 --- a/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_WindowContainer.Designer.vb +++ b/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_WindowContainer.Designer.vb @@ -25,10 +25,12 @@ Partial Class DuWM_WindowContainer Me.components = New System.ComponentModel.Container() Me.DuWM_ContainerPanel = New System.Windows.Forms.Panel() Me.DuWM_WMCheck = New System.Windows.Forms.Timer(Me.components) + Me.DuWM_ChildSize = New System.Windows.Forms.Timer(Me.components) Me.SuspendLayout() ' 'DuWM_ContainerPanel ' + Me.DuWM_ContainerPanel.BackColor = System.Drawing.Color.Transparent Me.DuWM_ContainerPanel.Dock = System.Windows.Forms.DockStyle.Fill Me.DuWM_ContainerPanel.Location = New System.Drawing.Point(0, 0) Me.DuWM_ContainerPanel.Name = "DuWM_ContainerPanel" @@ -38,6 +40,9 @@ Partial Class DuWM_WindowContainer 'DuWM_WMCheck ' ' + 'DuWM_ChildSize + ' + ' 'DuWM_WindowContainer ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -46,6 +51,7 @@ Partial Class DuWM_WindowContainer Me.ClientSize = New System.Drawing.Size(800, 450) Me.Controls.Add(Me.DuWM_ContainerPanel) Me.ForeColor = System.Drawing.Color.Black + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None Me.Name = "DuWM_WindowContainer" Me.Text = "DuWM_WindowContainer" Me.ResumeLayout(False) @@ -54,4 +60,5 @@ Partial Class DuWM_WindowContainer Friend WithEvents DuWM_ContainerPanel As Panel Friend WithEvents DuWM_WMCheck As Timer + Friend WithEvents DuWM_ChildSize As Timer End Class diff --git a/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_WindowContainer.resx b/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_WindowContainer.resx index d87325b..aa1693b 100644 --- a/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_WindowContainer.resx +++ b/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_WindowContainer.resx @@ -120,4 +120,7 @@ 17, 17 + + 168, 17 + \ No newline at end of file diff --git a/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_WindowContainer.vb b/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_WindowContainer.vb index b845522..f614a70 100644 --- a/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_WindowContainer.vb +++ b/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_WindowContainer.vb @@ -3,12 +3,21 @@ Public DuWM_PID As Integer Private Sub DuWM_WindowContainer_Load(sender As Object, e As EventArgs) Handles MyBase.Load - + DuWM_WMCheck.Start() + DuWM_ChildSize.Start() End Sub Private Sub DuWM_WMCheck_Tick(sender As Object, e As EventArgs) Handles DuWM_WMCheck.Tick + If ChildForm.Visible = False Then + Strings.ProcessID(DuWM_PID) = 0 + Close() + End If If Strings.ProcessID(DuWM_PID) = 0 Then Close() End If End Sub + + Private Sub ChildSize_Tick(sender As Object, e As EventArgs) Handles DuWM_ChildSize.Tick + ChildForm.Size = DuWM_ContainerPanel.Size + End Sub End Class \ No newline at end of file