mirror of
https://github.com/EverythingWindows/ShiftOS-TheRevival-Old.git
synced 2025-01-22 11:21:47 -05:00
not-quite-finish-but-functional DuWM
This commit is contained in:
parent
a043f16287
commit
804f2b7f7e
14 changed files with 134 additions and 20 deletions
|
@ -4,10 +4,11 @@ Module TerminalAPI
|
||||||
Public command As String
|
Public command As String
|
||||||
Public AdvancedCommand As Boolean
|
Public AdvancedCommand As Boolean
|
||||||
Public RawCommand As String
|
Public RawCommand As String
|
||||||
Public IsConsoleParent As Boolean = True
|
Public IsConsoleParent As Boolean
|
||||||
|
|
||||||
Public Sub InitializeTerminal()
|
Public Sub InitializeTerminal()
|
||||||
If IsConsoleParent = True Then
|
If IsConsoleParent = True Then
|
||||||
|
Console.TopMost = False
|
||||||
Cursor.Hide()
|
Cursor.Hide()
|
||||||
Strings.OnceInfo(1) = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS"
|
Strings.OnceInfo(1) = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS"
|
||||||
Strings.OnceInfo(4) = "!"
|
Strings.OnceInfo(4) = "!"
|
||||||
|
@ -279,13 +280,18 @@ Module TerminalAPI
|
||||||
TerminateShiftOS()
|
TerminateShiftOS()
|
||||||
Case "startg"
|
Case "startg"
|
||||||
Undeveloped()
|
Undeveloped()
|
||||||
StartG()
|
If IsStartG = False Then
|
||||||
|
StartG()
|
||||||
|
End If
|
||||||
Case "shiftertest"
|
Case "shiftertest"
|
||||||
DuWM_SecondWindowSet(Shifter)
|
'DuWM_SecondWindowSet(Shifter)
|
||||||
Console.Close()
|
'Console.Close()
|
||||||
DuWM_FirstWindowSet(Console)
|
'DuWM_FirstWindowSet(Console)
|
||||||
|
DuWM_NewProcess(Shifter)
|
||||||
Case "stopg"
|
Case "stopg"
|
||||||
StopG()
|
If IsStartG = True Then
|
||||||
|
StopG()
|
||||||
|
End If
|
||||||
Undeveloped()
|
Undeveloped()
|
||||||
Case "textpad"
|
Case "textpad"
|
||||||
If Strings.AvailableFeature(17) = "1" Then
|
If Strings.AvailableFeature(17) = "1" Then
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
Module Terminate
|
Module Terminate
|
||||||
Public Sub TerminateShiftOS()
|
Public Sub TerminateShiftOS()
|
||||||
NewLine("Stopping the Window Manager...")
|
If IsStartG = True Then
|
||||||
StopG()
|
NewLine("Stopping the Window Manager...")
|
||||||
|
StopG()
|
||||||
|
End If
|
||||||
Console_Full()
|
Console_Full()
|
||||||
If Strings.OnceInfo(6) = "story" Then
|
If Strings.OnceInfo(6) = "story" Then
|
||||||
NewLine("Saving game...")
|
NewLine("Saving game...")
|
||||||
|
@ -10,7 +12,8 @@
|
||||||
Cursor.Show()
|
Cursor.Show()
|
||||||
NewLine("Shutting down...")
|
NewLine("Shutting down...")
|
||||||
ShiftOSMenu.Show()
|
ShiftOSMenu.Show()
|
||||||
Console.Close()
|
If IsStartG = False Then
|
||||||
Shifter.Close()
|
Console.Close()
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
End Module
|
End Module
|
||||||
|
|
|
@ -56,6 +56,7 @@ Module SaveLoadSystem
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub FreeRoamMode()
|
Public Sub FreeRoamMode()
|
||||||
|
IsConsoleParent = True
|
||||||
'Sets all features to as bought
|
'Sets all features to as bought
|
||||||
Strings.ComputerInfo(0) = "shiftos"
|
Strings.ComputerInfo(0) = "shiftos"
|
||||||
Strings.ComputerInfo(1) = "user"
|
Strings.ComputerInfo(1) = "user"
|
||||||
|
|
|
@ -23,7 +23,9 @@ Public Class Console
|
||||||
With ShortcutHandler
|
With ShortcutHandler
|
||||||
.WorkerSupportsCancellation = True
|
.WorkerSupportsCancellation = True
|
||||||
End With
|
End With
|
||||||
|
'MsgBox("Full!")
|
||||||
Console_Full()
|
Console_Full()
|
||||||
|
'MsgBox("Initialize!")
|
||||||
InitializeTerminal()
|
InitializeTerminal()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ Partial Class Desktop
|
||||||
Me.Button1.TabIndex = 0
|
Me.Button1.TabIndex = 0
|
||||||
Me.Button1.Text = "term"
|
Me.Button1.Text = "term"
|
||||||
Me.Button1.UseVisualStyleBackColor = False
|
Me.Button1.UseVisualStyleBackColor = False
|
||||||
|
Me.Button1.Visible = False
|
||||||
'
|
'
|
||||||
'Desktop
|
'Desktop
|
||||||
'
|
'
|
||||||
|
|
|
@ -1,23 +1,47 @@
|
||||||
Module DesktopManager
|
Imports System.Threading
|
||||||
|
|
||||||
|
Module DesktopManager
|
||||||
|
Public IsStartG As Boolean
|
||||||
|
|
||||||
Public Sub StartG()
|
Public Sub StartG()
|
||||||
|
IsStartG = True
|
||||||
Desktop.Show()
|
Desktop.Show()
|
||||||
Desktop.FormBorderStyle = FormBorderStyle.None
|
Desktop.FormBorderStyle = FormBorderStyle.None
|
||||||
Desktop.WindowState = FormWindowState.Maximized
|
Desktop.WindowState = FormWindowState.Maximized
|
||||||
Desktop.TopMost = False
|
Desktop.TopMost = False
|
||||||
IsConsoleParent = False
|
IsConsoleParent = False
|
||||||
Console.Close()
|
Console.Dispose()
|
||||||
WindowManagerChoose()
|
WindowManagerChoose()
|
||||||
Cursor.Show()
|
Cursor.Show()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub StopG()
|
Public Sub StopG()
|
||||||
DuWM_CurrentProcess = 0
|
IsStartG = False
|
||||||
Strings.ProcessID(0) = 0
|
'MsgBox("IsConsoleParent should be true!")
|
||||||
Strings.ProcessID(1) = 0
|
|
||||||
Cursor.Hide()
|
|
||||||
IsConsoleParent = True
|
IsConsoleParent = True
|
||||||
|
''MsgBox("PID 0 0")
|
||||||
|
'Strings.ProcessID(0) = 0
|
||||||
|
''MsgBox("PID 1 0")
|
||||||
|
'Strings.ProcessID(1) = 0
|
||||||
|
TerminateWindowApps()
|
||||||
|
'MsgBox("Hide!")
|
||||||
|
Cursor.Hide()
|
||||||
|
MsgBox("this is not a bug, this is a feature") 'Use this messagebox to hold Console to stay open, because removing this line closes Console all together for some reason
|
||||||
Console.Show()
|
Console.Show()
|
||||||
Desktop.Close()
|
'MsgBox("ADIOS!")
|
||||||
|
Desktop.Hide()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub TerminateWindowApps()
|
||||||
|
Dim MaxPID As Integer = 0
|
||||||
|
Do
|
||||||
|
If MaxPID = 2 Then
|
||||||
|
Exit Do
|
||||||
|
Else
|
||||||
|
Strings.ProcessID(MaxPID) = 0
|
||||||
|
MaxPID = MaxPID + 1
|
||||||
|
End If
|
||||||
|
Loop
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub WindowManagerChoose()
|
Public Sub WindowManagerChoose()
|
||||||
|
|
30
ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/ThisIsNotABugThisIsAFeature.Designer.vb
generated
Normal file
30
ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/ThisIsNotABugThisIsAFeature.Designer.vb
generated
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||||
|
Partial Class ThisIsNotABugThisIsAFeature
|
||||||
|
Inherits System.Windows.Forms.Form
|
||||||
|
|
||||||
|
'Form overrides dispose to clean up the component list.
|
||||||
|
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||||
|
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||||
|
Try
|
||||||
|
If disposing AndAlso components IsNot Nothing Then
|
||||||
|
components.Dispose()
|
||||||
|
End If
|
||||||
|
Finally
|
||||||
|
MyBase.Dispose(disposing)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'Required by the Windows Form Designer
|
||||||
|
Private components As System.ComponentModel.IContainer
|
||||||
|
|
||||||
|
'NOTE: The following procedure is required by the Windows Form Designer
|
||||||
|
'It can be modified using the Windows Form Designer.
|
||||||
|
'Do not modify it using the code editor.
|
||||||
|
<System.Diagnostics.DebuggerStepThrough()> _
|
||||||
|
Private Sub InitializeComponent()
|
||||||
|
components = New System.ComponentModel.Container
|
||||||
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
|
Me.ClientSize = New System.Drawing.Size(800, 450)
|
||||||
|
Me.Text = "ThisIsNotABugThisIsAFeature"
|
||||||
|
End Sub
|
||||||
|
End Class
|
|
@ -0,0 +1,3 @@
|
||||||
|
Public Class ThisIsNotABugThisIsAFeature
|
||||||
|
|
||||||
|
End Class
|
|
@ -17,7 +17,8 @@ Public Class ShiftOSMenu
|
||||||
Private Sub btn_Exit_Click(sender As Object, e As EventArgs) Handles btn_Exit.Click
|
Private Sub btn_Exit_Click(sender As Object, e As EventArgs) Handles btn_Exit.Click
|
||||||
Select Case btn_Exit.Text
|
Select Case btn_Exit.Text
|
||||||
Case "Exit"
|
Case "Exit"
|
||||||
Close()
|
'Close()
|
||||||
|
Application.Exit()
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
Public FirstWindow As Form
|
Public FirstWindow As Form
|
||||||
Public SecondWindow As Form
|
Public SecondWindow As Form
|
||||||
Public DuWM_CurrentProcess As Integer = 0
|
Public DuWM_CurrentProcess As Integer = 0
|
||||||
|
Public DuWM_ChangeLayout As Boolean
|
||||||
|
|
||||||
Public Sub DuWM_Initiate()
|
Public Sub DuWM_Initiate()
|
||||||
Strings.ProcessID(0) = 0
|
Strings.ProcessID(0) = 0
|
||||||
|
@ -66,7 +67,12 @@
|
||||||
NewWindow.Height = Desktop.Height - 20
|
NewWindow.Height = Desktop.Height - 20
|
||||||
NewWindow.Width = Desktop.Width - 20
|
NewWindow.Width = Desktop.Width - 20
|
||||||
NewWindow.Location = New Point(10, 10)
|
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
|
End Select
|
||||||
|
DuWM_ChangeLayout = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Public Sub DuWM_GenerateWindowSet(WindowName As Form, PID As Integer)
|
'Public Sub DuWM_GenerateWindowSet(WindowName As Form, PID As Integer)
|
||||||
|
|
|
@ -26,6 +26,7 @@ Partial Class DuWM_WindowContainer
|
||||||
Me.DuWM_ContainerPanel = New System.Windows.Forms.Panel()
|
Me.DuWM_ContainerPanel = New System.Windows.Forms.Panel()
|
||||||
Me.DuWM_WMCheck = New System.Windows.Forms.Timer(Me.components)
|
Me.DuWM_WMCheck = New System.Windows.Forms.Timer(Me.components)
|
||||||
Me.DuWM_ChildSize = 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()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
'DuWM_ContainerPanel
|
'DuWM_ContainerPanel
|
||||||
|
@ -43,6 +44,9 @@ Partial Class DuWM_WindowContainer
|
||||||
'DuWM_ChildSize
|
'DuWM_ChildSize
|
||||||
'
|
'
|
||||||
'
|
'
|
||||||
|
'DuWM_LayoutCheck
|
||||||
|
'
|
||||||
|
'
|
||||||
'DuWM_WindowContainer
|
'DuWM_WindowContainer
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
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_ContainerPanel As Panel
|
||||||
Friend WithEvents DuWM_WMCheck As Timer
|
Friend WithEvents DuWM_WMCheck As Timer
|
||||||
Friend WithEvents DuWM_ChildSize As Timer
|
Friend WithEvents DuWM_ChildSize As Timer
|
||||||
|
Friend WithEvents DuWM_LayoutCheck As Timer
|
||||||
End Class
|
End Class
|
||||||
|
|
|
@ -123,4 +123,7 @@
|
||||||
<metadata name="DuWM_ChildSize.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="DuWM_ChildSize.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>168, 17</value>
|
<value>168, 17</value>
|
||||||
</metadata>
|
</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>
|
</root>
|
|
@ -1,18 +1,22 @@
|
||||||
Public Class DuWM_WindowContainer
|
Public Class DuWM_WindowContainer
|
||||||
Public ChildForm As Form
|
Public ChildForm As New Form
|
||||||
Public DuWM_PID As Integer
|
Public DuWM_PID As Integer
|
||||||
|
|
||||||
Private Sub DuWM_WindowContainer_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
Private Sub DuWM_WindowContainer_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
DuWM_WMCheck.Start()
|
DuWM_WMCheck.Start()
|
||||||
DuWM_ChildSize.Start()
|
DuWM_ChildSize.Start()
|
||||||
|
DuWM_LayoutCheck.Start()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub DuWM_WMCheck_Tick(sender As Object, e As EventArgs) Handles DuWM_WMCheck.Tick
|
Private Sub DuWM_WMCheck_Tick(sender As Object, e As EventArgs) Handles DuWM_WMCheck.Tick
|
||||||
If ChildForm.Visible = False Then
|
If ChildForm.Visible = False Then
|
||||||
Strings.ProcessID(DuWM_PID) = 0
|
Strings.ProcessID(DuWM_PID) = 0
|
||||||
Close()
|
|
||||||
End If
|
End If
|
||||||
If Strings.ProcessID(DuWM_PID) = 0 Then
|
If Strings.ProcessID(DuWM_PID) = 0 Then
|
||||||
|
'MsgBox(Convert.ToString(ChildForm))
|
||||||
|
DuWM_CurrentProcess = DuWM_CurrentProcess - 1
|
||||||
|
DuWM_ChangeLayout = True
|
||||||
|
DuWM_WMCheck.Stop()
|
||||||
Close()
|
Close()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
@ -20,4 +24,23 @@
|
||||||
Private Sub ChildSize_Tick(sender As Object, e As EventArgs) Handles DuWM_ChildSize.Tick
|
Private Sub ChildSize_Tick(sender As Object, e As EventArgs) Handles DuWM_ChildSize.Tick
|
||||||
ChildForm.Size = DuWM_ContainerPanel.Size
|
ChildForm.Size = DuWM_ContainerPanel.Size
|
||||||
End Sub
|
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
|
End Class
|
|
@ -130,6 +130,12 @@
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="MainForms\DesktopEnvironment\master\DesktopManager.vb" />
|
<Compile Include="MainForms\DesktopEnvironment\master\DesktopManager.vb" />
|
||||||
|
<Compile Include="MainForms\DesktopEnvironment\master\ThisIsNotABugThisIsAFeature.Designer.vb">
|
||||||
|
<DependentUpon>ThisIsNotABugThisIsAFeature.vb</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MainForms\DesktopEnvironment\master\ThisIsNotABugThisIsAFeature.vb">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Include="MainForms\Epilepsy.Designer.vb">
|
<Compile Include="MainForms\Epilepsy.Designer.vb">
|
||||||
<DependentUpon>Epilepsy.vb</DependentUpon>
|
<DependentUpon>Epilepsy.vb</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|
Loading…
Reference in a new issue