diff options
| author | EverythingWindows <[email protected]> | 2022-11-21 10:43:53 +0700 |
|---|---|---|
| committer | EverythingWindows <[email protected]> | 2022-11-21 10:43:53 +0700 |
| commit | c5b2c3e370cf17a4b4ee3d5a4928e3663ab72a1d (patch) | |
| tree | d8163ca4462d33f061335973d19be2ddabbc0c8c /ShiftOS-TheRevival/MainForms | |
| parent | 3f4edf1b79ee4ee5a73251930af641bcd0db225e (diff) | |
| download | shiftos-therevival-old-c5b2c3e370cf17a4b4ee3d5a4928e3663ab72a1d.tar.gz shiftos-therevival-old-c5b2c3e370cf17a4b4ee3d5a4928e3663ab72a1d.tar.bz2 shiftos-therevival-old-c5b2c3e370cf17a4b4ee3d5a4928e3663ab72a1d.zip | |
Dual Window Manager development
Diffstat (limited to 'ShiftOS-TheRevival/MainForms')
10 files changed, 103 insertions, 5 deletions
diff --git a/ShiftOS-TheRevival/MainForms/Applications/Console.Designer.vb b/ShiftOS-TheRevival/MainForms/Applications/Console.Designer.vb index 78dbfbf..861f2ec 100644 --- a/ShiftOS-TheRevival/MainForms/Applications/Console.Designer.vb +++ b/ShiftOS-TheRevival/MainForms/Applications/Console.Designer.vb @@ -29,6 +29,7 @@ Partial Class Console Me.InfoBarTimer = New System.Windows.Forms.Timer(Me.components) Me.ToolBar = New System.Windows.Forms.TextBox() Me.ShortcutHandler = New System.ComponentModel.BackgroundWorker() + Me.DuWMHandle = New System.Windows.Forms.Timer(Me.components) Me.SuspendLayout() ' 'TextBox1 @@ -80,6 +81,9 @@ Partial Class Console Me.ToolBar.TabIndex = 1 Me.ToolBar.Visible = False ' + 'DuWMHandle + ' + ' 'Console ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -104,4 +108,5 @@ Partial Class Console Friend WithEvents InfoBarTimer As Timer Friend WithEvents ToolBar As TextBox Public WithEvents ShortcutHandler As System.ComponentModel.BackgroundWorker + Friend WithEvents DuWMHandle As Timer End Class diff --git a/ShiftOS-TheRevival/MainForms/Applications/Console.resx b/ShiftOS-TheRevival/MainForms/Applications/Console.resx index 38ebc49..eedeb82 100644 --- a/ShiftOS-TheRevival/MainForms/Applications/Console.resx +++ b/ShiftOS-TheRevival/MainForms/Applications/Console.resx @@ -126,4 +126,7 @@ <metadata name="ShortcutHandler.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>274, 17</value> </metadata> + <metadata name="DuWMHandle.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>415, 17</value> + </metadata> </root>
\ No newline at end of file diff --git a/ShiftOS-TheRevival/MainForms/Applications/Console.vb b/ShiftOS-TheRevival/MainForms/Applications/Console.vb index 61f6920..421e3f2 100644 --- a/ShiftOS-TheRevival/MainForms/Applications/Console.vb +++ b/ShiftOS-TheRevival/MainForms/Applications/Console.vb @@ -24,7 +24,6 @@ Public Class Console .WorkerSupportsCancellation = True End With Console_Full() - Cursor.Hide() InitializeTerminal() End Sub @@ -237,4 +236,8 @@ Public Class Console Private Sub TextBox1_Click(sender As Object, e As MouseEventArgs) Handles TextBox1.MouseDoubleClick, TextBox1.Click End Sub + + Private Sub DuWMHandle_Tick(sender As Object, e As EventArgs) Handles DuWMHandle.Tick + + End Sub End Class
\ No newline at end of file diff --git a/ShiftOS-TheRevival/MainForms/Applications/Shifter.Designer.vb b/ShiftOS-TheRevival/MainForms/Applications/Shifter.Designer.vb index 38ead47..873752c 100644 --- a/ShiftOS-TheRevival/MainForms/Applications/Shifter.Designer.vb +++ b/ShiftOS-TheRevival/MainForms/Applications/Shifter.Designer.vb @@ -23,33 +23,61 @@ Partial Class Shifter <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.Label1 = New System.Windows.Forms.Label() + Me.Button1 = New System.Windows.Forms.Button() + Me.Label2 = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'Label1 ' Me.Label1.AutoSize = True + Me.Label1.Font = New System.Drawing.Font("Segoe UI", 24.0!, System.Drawing.FontStyle.Bold) Me.Label1.Location = New System.Drawing.Point(12, 9) Me.Label1.Name = "Label1" - Me.Label1.Size = New System.Drawing.Size(40, 13) + Me.Label1.Size = New System.Drawing.Size(131, 45) Me.Label1.TabIndex = 0 Me.Label1.Text = "Shifter!" ' + 'Button1 + ' + Me.Button1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.Button1.Location = New System.Drawing.Point(713, 415) + Me.Button1.Name = "Button1" + Me.Button1.Size = New System.Drawing.Size(75, 23) + Me.Button1.TabIndex = 1 + Me.Button1.Text = "Close" + Me.Button1.UseVisualStyleBackColor = True + ' + 'Label2 + ' + Me.Label2.AutoSize = True + Me.Label2.Location = New System.Drawing.Point(17, 64) + Me.Label2.Name = "Label2" + Me.Label2.Size = New System.Drawing.Size(69, 13) + Me.Label2.TabIndex = 2 + Me.Label2.Text = "no desktop :(" + ' 'Shifter ' 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(800, 450) + Me.Controls.Add(Me.Label2) + Me.Controls.Add(Me.Button1) Me.Controls.Add(Me.Label1) Me.ForeColor = System.Drawing.Color.Black Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None Me.Name = "Shifter" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Shifter" + Me.TopMost = True Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents Label1 As Label + Friend WithEvents Button1 As Button + Friend WithEvents Label2 As Label End Class diff --git a/ShiftOS-TheRevival/MainForms/Applications/Shifter.vb b/ShiftOS-TheRevival/MainForms/Applications/Shifter.vb index cea6fe3..4613ee1 100644 --- a/ShiftOS-TheRevival/MainForms/Applications/Shifter.vb +++ b/ShiftOS-TheRevival/MainForms/Applications/Shifter.vb @@ -5,9 +5,13 @@ End Sub - Private Sub DuWM_Tick(sender As Object, e As EventArgs) + Private Sub DuWM_Tick(sender As Object, e As EventArgs) If Strings.ProcessID(DuWM_PID) = 0 Then Close() End If End Sub + + Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click + Close() + End Sub End Class
\ No newline at end of file diff --git a/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.Designer.vb b/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.Designer.vb index ac5d776..54f7a80 100644 --- a/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.Designer.vb +++ b/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.Designer.vb @@ -22,14 +22,30 @@ Partial Class Desktop 'Do not modify it using the code editor. <System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent() + Me.components = New System.ComponentModel.Container() + Me.Button1 = New System.Windows.Forms.Button() + Me.DuWM = New System.Windows.Forms.Timer(Me.components) Me.SuspendLayout() ' + 'Button1 + ' + Me.Button1.BackColor = System.Drawing.Color.Black + Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.Button1.Location = New System.Drawing.Point(12, 12) + Me.Button1.Name = "Button1" + Me.Button1.Size = New System.Drawing.Size(75, 23) + Me.Button1.TabIndex = 0 + Me.Button1.Text = "term" + Me.Button1.UseVisualStyleBackColor = False + ' '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.ClientSize = New System.Drawing.Size(800, 450) + Me.Controls.Add(Me.Button1) Me.ForeColor = System.Drawing.Color.White Me.Name = "Desktop" Me.ShowIcon = False @@ -40,4 +56,7 @@ Partial Class Desktop Me.ResumeLayout(False) End Sub + + Friend WithEvents Button1 As Button + Friend WithEvents DuWM As Timer End Class diff --git a/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.resx b/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.resx index 1af7de1..ed37e73 100644 --- a/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.resx +++ b/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.resx @@ -117,4 +117,7 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> + <metadata name="DuWM.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> </root>
\ No newline at end of file diff --git a/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.vb b/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.vb index 4ddf223..853bb8a 100644 --- a/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.vb +++ b/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/Desktop.vb @@ -1,3 +1,17 @@ Public Class Desktop + Private Sub Desktop_Load(sender As Object, e As EventArgs) Handles MyBase.Load + End Sub + + Private Sub Desktop_KeyPress(sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown + If e.KeyCode = Keys.T AndAlso Keys.Control Then + MsgBox("dangit") + DuWM_FirstWindowSet(Console) + End If + End Sub + + 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 cbf8cbb..dd3ff8d 100644 --- a/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/DesktopManager.vb +++ b/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/DesktopManager.vb @@ -1,9 +1,12 @@ Module DesktopManager Public Sub StartX() Desktop.Show() - Desktop.TopMost = False Desktop.FormBorderStyle = FormBorderStyle.None Desktop.WindowState = FormWindowState.Maximized + Desktop.TopMost = False + IsConsoleParent = False + OnlyOne = True + Console.Close() Cursor.Show() End Sub @@ -11,5 +14,6 @@ Desktop.Close() Cursor.Hide() Console_Full() + IsConsoleParent = True 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 f3985a9..d74a3d8 100644 --- a/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_Main.vb +++ b/ShiftOS-TheRevival/MainForms/WindowManager/DualWindowManager/DuWM_Main.vb @@ -1,10 +1,15 @@ Module DuWM_Main - Public IsDual As Boolean + Public OnlyOne As Boolean + Public FirstWindow As Form + Public SecondWindow As Form 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) @@ -12,6 +17,16 @@ 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 End Sub 'Public Sub DuWM_GenerateWindowSet(WindowName As Form, PID As Integer) |
