mirror of
https://github.com/EverythingWindows/ShiftOS-TheRevival-Old.git
synced 2025-01-22 18:02:16 +00:00
Dual Window Manager development
This commit is contained in:
parent
3f4edf1b79
commit
c5b2c3e370
13 changed files with 141 additions and 27 deletions
|
@ -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()
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -11,5 +11,6 @@
|
|||
NewLine("Shutting down...")
|
||||
ShiftOSMenu.Show()
|
||||
Console.Close()
|
||||
Shifter.Close()
|
||||
End Sub
|
||||
End Module
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -10,4 +10,8 @@
|
|||
Close()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
Close()
|
||||
End Sub
|
||||
End Class
|
|
@ -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
|
||||
|
|
|
@ -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>
|
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue