diff --git a/ShiftOS-TheRevival/API/TerminalAPI.vb b/ShiftOS-TheRevival/API/TerminalAPI.vb
index 1af775e..5ba8923 100644
--- a/ShiftOS-TheRevival/API/TerminalAPI.vb
+++ b/ShiftOS-TheRevival/API/TerminalAPI.vb
@@ -4,36 +4,46 @@ Module TerminalAPI
Public command As String
Public AdvancedCommand As Boolean
Public RawCommand As String
+ Public IsConsoleParent As Boolean = True
Public Sub InitializeTerminal()
- Strings.OnceInfo(1) = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS"
- Strings.OnceInfo(4) = "!"
- Strings.OnceInfo(7) = Console.Width
- Strings.OnceInfo(8) = Console.Height
- If Strings.IsFree = True Then
- Strings.ComputerInfo(0) = "shiftos"
- Strings.ComputerInfo(1) = "user"
- Terminal_CheckFeature()
- Terminal_PrintPrompt()
- Terminal_AssignPrompt()
- Else
- If Console.StayAtChapter = True Then
- LoadGame()
+ If IsConsoleParent = True Then
+ Cursor.Hide()
+ Strings.OnceInfo(1) = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS"
+ Strings.OnceInfo(4) = "!"
+ Strings.OnceInfo(7) = Console.Width
+ Strings.OnceInfo(8) = Console.Height
+ If Strings.IsFree = True Then
+ Strings.ComputerInfo(0) = "shiftos"
+ Strings.ComputerInfo(1) = "user"
Terminal_CheckFeature()
Terminal_PrintPrompt()
Terminal_AssignPrompt()
Else
- If Strings.ComputerInfo(3) = "0" Then
- Console.TextBox1.ReadOnly = True
- Console.StayAtChapter = True
- Console.StoryOnlyTimer.Start()
- Else
+ If Console.StayAtChapter = True Then
LoadGame()
Terminal_CheckFeature()
Terminal_PrintPrompt()
Terminal_AssignPrompt()
+ Else
+ If Strings.ComputerInfo(3) = "0" Then
+ Console.TextBox1.ReadOnly = True
+ Console.StayAtChapter = True
+ Console.StoryOnlyTimer.Start()
+ Else
+ LoadGame()
+ Terminal_CheckFeature()
+ Terminal_PrintPrompt()
+ Terminal_AssignPrompt()
+ End If
End If
End If
+ Else
+ Cursor.Show()
+ Console_Windowed()
+ Console.TopMost = True
+ Terminal_PrintPrompt()
+ Terminal_AssignPrompt()
End If
Console.CurrentDirectory = Strings.OnceInfo(1)
Console.Pseudodir = Console.CurrentDirectory.Replace(Strings.OnceInfo(1), "!\")
@@ -179,6 +189,10 @@ Module TerminalAPI
AdvancedCommand = False
NormalCommand()
End If
+ Case "close"
+ If IsConsoleParent = False Then
+ Console.Close()
+ End If
Case "codepoint"
Codepoint()
AdvancedCommand = False
@@ -265,10 +279,10 @@ Module TerminalAPI
Case "startx"
Undeveloped()
StartX()
- Console_Windowed()
- DuWM_FirstWindowSet(Console)
Case "shiftertest"
DuWM_SecondWindowSet(Shifter)
+ Console.Close()
+ DuWM_FirstWindowSet(Console)
Case "stopx"
StopX()
Undeveloped()
diff --git a/ShiftOS-TheRevival/Functions/InGame/ROMs/Strings.vb b/ShiftOS-TheRevival/Functions/InGame/ROMs/Strings.vb
index 9385c03..dfd4572 100644
--- a/ShiftOS-TheRevival/Functions/InGame/ROMs/Strings.vb
+++ b/ShiftOS-TheRevival/Functions/InGame/ROMs/Strings.vb
@@ -1,13 +1,13 @@
Public Class Strings
Public Shared OSInfo() As String
- Public Shared ComputerInfo(6) As String
+ Public Shared ComputerInfo(7) As String
Public Shared IsFree As Boolean
Public Shared OnceInfo(8) As String
Public Shared AvailableFeature(35) As String
Public Shared CLIInterpreter As String
Public Shared SaveFile As String
Public Shared Achievement As String
- Public Shared ProcessID(2) As String
+ Public Shared ProcessID(1) As String
'STRING CATEGORIZATION WRITING RULES!
'THIS IS IN ORDER TO REMAIN COMPATIBLE WITH OLDER VERSIONS!
@@ -47,6 +47,7 @@
'4 = Installed Packages (0.2.3) (default : 0 for New Game)
'5 = Color for Terminal (0.2.4) (default : 0F)
'6 = Color for Infobar (0.2.4) (default : F0)
+ '7 = Window Manager (0.2.7) (default : 0)
'
'AvailableFeature (Default is defined on the Story Mode, Free Mode automatically assigns every available feature to 1, Unavailable in the Shiftorium assigned as 2, Upgraded assigned as 3) Strings:
'0 = MAN command [Manual on each command] (0.2) (default : 0)
diff --git a/ShiftOS-TheRevival/Functions/InGame/SystemManager/Terminate.vb b/ShiftOS-TheRevival/Functions/InGame/SystemManager/Terminate.vb
index 9654185..38f1a13 100644
--- a/ShiftOS-TheRevival/Functions/InGame/SystemManager/Terminate.vb
+++ b/ShiftOS-TheRevival/Functions/InGame/SystemManager/Terminate.vb
@@ -11,5 +11,6 @@
NewLine("Shutting down...")
ShiftOSMenu.Show()
Console.Close()
+ Shifter.Close()
End Sub
End Module
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 @@
274, 17
+
+ 415, 17
+
\ 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
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.
_
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 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 17, 17
+
\ 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)