aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS-TheRevival/MainForms/WindowManager
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS-TheRevival/MainForms/WindowManager')
-rw-r--r--ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_Main.vb40
-rw-r--r--ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_WindowContainer.Designer.vb7
-rw-r--r--ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_WindowContainer.resx3
-rw-r--r--ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_WindowContainer.vb11
4 files changed, 60 insertions, 1 deletions
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 @@
<metadata name="DuWM_WMCheck.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
+ <metadata name="DuWM_ChildSize.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>168, 17</value>
+ </metadata>
</root> \ 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