blob: ddeea5976d91f301a9bdd1ad3982a63248d102d3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
Module DuWM_Main
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()
WindowName.Height = Desktop.Height - 20
WindowName.Width = (Desktop.Width / 2) - 20
WindowName.Location = New Point(10, 10)
FirstWindow = WindowName
Strings.ProcessID(0) = 1
End Sub
Public Sub DuWM_SecondWindowSet(WindowName As Form)
WindowName.Show()
WindowName.Height = Desktop.Height - 20
WindowName.Width = (Desktop.Width / 2) - 20
WindowName.Location = New Point((Desktop.Width / 2) + 10, 10)
SecondWindow = WindowName
Strings.ProcessID(1) = 1
End Sub
Public Sub DuWM_SingleWindowSet(WindowName As Form)
WindowName.Show()
WindowName.Height = Desktop.Height - 20
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)
' Dim NewWContainer As New DuWM_WindowContainer
' NewWContainer.Width = (Desktop.Width / 2) - 10
' NewWContainer.Height = Desktop.Height - 20
' NewWContainer.ChildForm = WindowName
' NewWContainer.ChildForm.TopLevel = False
' NewWContainer.ChildForm.FormBorderStyle = FormBorderStyle.None
' NewWContainer.ChildForm.Size = New Size((Desktop.Width / 2) - 10, Desktop.Height - 20)
' Select Case PID
' Case 0
' NewWContainer.Location = New Point(10, 10)
' Case 1
' NewWContainer.Location = New Point((Desktop.Width / 2) + 10, 10)
' End Select
' NewWContainer.ChildForm.WindowState = FormWindowState.Normal
' NewWContainer.ChildForm.Visible = False
' NewWContainer.DuWM_ContainerPanel.Controls.Add(NewWContainer.ChildForm)
' Select Case NewWContainer.ChildForm.Visible
' Case False
' NewWContainer.ChildForm.Visible = True
' Case Else
' NewWContainer.ChildForm.Visible = False
' End Select
' Dim WindowNameStr As String = Convert.ToString(WindowName)
' Select Case WindowNameStr
' Case "Console"
' NewWContainer.DuWM_PID = 0
' Strings.ProcessID(0) = 1
' Case "Shifter"
' NewWContainer.DuWM_PID = 1
' Strings.ProcessID(1) = 1
' End Select
' NewWContainer.Show()
' NewWContainer.DuWM_WMCheck.Start()
'End Sub
'Public Sub DuWM_KillAllWindow()
' Strings.ProcessID(0) = 0
' Strings.ProcessID(1) = 0
'End Sub
End Module
|