diff options
Diffstat (limited to 'ShiftOS-TheRevival/MainForms/WindowManager')
4 files changed, 39 insertions, 2 deletions
diff --git a/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_Main.vb b/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_Main.vb index ddeea59..331927c 100644 --- a/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_Main.vb +++ b/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_Main.vb @@ -3,6 +3,7 @@ Public FirstWindow As Form Public SecondWindow As Form Public DuWM_CurrentProcess As Integer = 0 + Public DuWM_ChangeLayout As Boolean Public Sub DuWM_Initiate() Strings.ProcessID(0) = 0 @@ -66,7 +67,12 @@ 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/MainForms/WindowManager/DualWindowManager/DuWM_WindowContainer.Designer.vb b/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_WindowContainer.Designer.vb index a0239ac..e6b186c 100644 --- a/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_WindowContainer.Designer.vb +++ b/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_WindowContainer.Designer.vb @@ -26,6 +26,7 @@ Partial Class DuWM_WindowContainer 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.DuWM_LayoutCheck = New System.Windows.Forms.Timer(Me.components) Me.SuspendLayout() ' 'DuWM_ContainerPanel @@ -43,6 +44,9 @@ Partial Class DuWM_WindowContainer 'DuWM_ChildSize ' ' + 'DuWM_LayoutCheck + ' + ' 'DuWM_WindowContainer ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -61,4 +65,5 @@ Partial Class DuWM_WindowContainer Friend WithEvents DuWM_ContainerPanel As Panel Friend WithEvents DuWM_WMCheck As Timer Friend WithEvents DuWM_ChildSize As Timer + Friend WithEvents DuWM_LayoutCheck 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 aa1693b..27f4227 100644 --- a/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_WindowContainer.resx +++ b/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_WindowContainer.resx @@ -123,4 +123,7 @@ <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> + <metadata name="DuWM_LayoutCheck.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>312, 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 f614a70..26b9d04 100644 --- a/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_WindowContainer.vb +++ b/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_WindowContainer.vb @@ -1,18 +1,22 @@ Public Class DuWM_WindowContainer - Public ChildForm As Form + Public ChildForm As New Form 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() + DuWM_LayoutCheck.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 + 'MsgBox(Convert.ToString(ChildForm)) + DuWM_CurrentProcess = DuWM_CurrentProcess - 1 + DuWM_ChangeLayout = True + DuWM_WMCheck.Stop() Close() End If End Sub @@ -20,4 +24,23 @@ Private Sub ChildSize_Tick(sender As Object, e As EventArgs) Handles DuWM_ChildSize.Tick ChildForm.Size = DuWM_ContainerPanel.Size End Sub + + Private Sub DuWM_LayoutCheck_Tick(sender As Object, e As EventArgs) Handles DuWM_LayoutCheck.Tick + If DuWM_ChangeLayout = True Then + Select Case DuWM_CurrentProcess + Case 1 + Height = Desktop.Height - 20 + Width = Desktop.Width - 20 + Location = New Point(10, 10) + Case 2 + Select Case DuWM_PID + Case 0 + Height = Desktop.Height - 20 + Width = (Desktop.Width / 2) - 20 + Location = New Point(10, 10) + End Select + End Select + DuWM_ChangeLayout = False + End If + End Sub End Class
\ No newline at end of file |
