little work on the next window manager

This commit is contained in:
EverythingWindows 2022-12-04 18:46:53 +07:00
parent 0e6eb6e76f
commit 2cb19f4dd0
9 changed files with 76 additions and 41 deletions

View file

@ -11,10 +11,11 @@ Module TerminalAPI
Strings.OnceInfo(4) = "!" Strings.OnceInfo(4) = "!"
If IsConsoleParent = True Then If IsConsoleParent = True Then
Console.TopMost = False Console.TopMost = False
Cursor.Hide()
Strings.OnceInfo(7) = Console.Width Strings.OnceInfo(7) = Console.Width
Strings.OnceInfo(8) = Console.Height Strings.OnceInfo(8) = Console.Height
Console.TextBox1.Font = New Font("Consolas", 11) Console.TextBox1.Font = New Font("Consolas", 11)
Console.ConsoleFontHandle.Stop()
Cursor.Hide()
If Strings.IsFree = True Then If Strings.IsFree = True Then
Strings.ComputerInfo(0) = "shiftos" Strings.ComputerInfo(0) = "shiftos"
Strings.ComputerInfo(1) = "user" Strings.ComputerInfo(1) = "user"
@ -53,7 +54,6 @@ Module TerminalAPI
End If End If
End If End If
Else Else
Cursor.Show()
Console_Windowed() Console_Windowed()
Console.TopMost = True Console.TopMost = True
Try Try
@ -63,6 +63,8 @@ Module TerminalAPI
End Try End Try
Terminal_PrintPrompt() Terminal_PrintPrompt()
Terminal_AssignPrompt() Terminal_AssignPrompt()
Cursor.Show()
Console.ConsoleFontHandle.Start()
End If End If
Console.CurrentDirectory = Strings.OnceInfo(1) Console.CurrentDirectory = Strings.OnceInfo(1)
Console.Pseudodir = Console.CurrentDirectory.Replace(Strings.OnceInfo(1), "!\") Console.Pseudodir = Console.CurrentDirectory.Replace(Strings.OnceInfo(1), "!\")
@ -195,6 +197,8 @@ Module TerminalAPI
Case "05tray" Case "05tray"
_05tray() _05tray()
NewLine("you cheater!") NewLine("you cheater!")
Case "anus"
AnusWM_Menu.Show()
Case "applist" Case "applist"
If IsStartG = True Then If IsStartG = True Then
AppList() AppList()

View file

@ -64,6 +64,17 @@ Module SaveLoadSystem
Strings.AvailableFeature(41) = "2" Strings.AvailableFeature(41) = "2"
'0.2.8 Features '0.2.8 Features
Strings.AvailableFeature(42) = "2" Strings.AvailableFeature(42) = "2"
Strings.AvailableFeature(43) = "2"
Strings.AvailableFeature(44) = "2"
Strings.AvailableFeature(45) = "2"
Strings.AvailableFeature(46) = "2"
Strings.AvailableFeature(47) = "2"
Strings.AvailableFeature(48) = "2"
Strings.AvailableFeature(49) = "2"
Strings.AvailableFeature(50) = "2"
Strings.AvailableFeature(51) = "2"
Strings.AvailableFeature(52) = "2"
Strings.AvailableFeature(53) = "2"
Case 1 Case 1
Strings.AvailableFeature(0) = "1" Strings.AvailableFeature(0) = "1"
Strings.AvailableFeature(1) = "1" Strings.AvailableFeature(1) = "1"

View file

@ -29,7 +29,7 @@ Partial Class Console
Me.InfoBarTimer = New System.Windows.Forms.Timer(Me.components) Me.InfoBarTimer = New System.Windows.Forms.Timer(Me.components)
Me.ToolBar = New System.Windows.Forms.TextBox() Me.ToolBar = New System.Windows.Forms.TextBox()
Me.ShortcutHandler = New System.ComponentModel.BackgroundWorker() Me.ShortcutHandler = New System.ComponentModel.BackgroundWorker()
Me.DuWMHandle = New System.Windows.Forms.Timer(Me.components) Me.ConsoleFontHandle = New System.Windows.Forms.Timer(Me.components)
Me.SuspendLayout() Me.SuspendLayout()
' '
'TextBox1 'TextBox1
@ -81,7 +81,7 @@ Partial Class Console
Me.ToolBar.TabIndex = 1 Me.ToolBar.TabIndex = 1
Me.ToolBar.Visible = False Me.ToolBar.Visible = False
' '
'DuWMHandle 'ConsoleFontHandle
' '
' '
'Console 'Console
@ -109,5 +109,5 @@ Partial Class Console
Friend WithEvents InfoBarTimer As Timer Friend WithEvents InfoBarTimer As Timer
Friend WithEvents ToolBar As TextBox Friend WithEvents ToolBar As TextBox
Public WithEvents ShortcutHandler As System.ComponentModel.BackgroundWorker Public WithEvents ShortcutHandler As System.ComponentModel.BackgroundWorker
Friend WithEvents DuWMHandle As Timer Friend WithEvents ConsoleFontHandle As Timer
End Class End Class

View file

@ -126,7 +126,7 @@
<metadata name="ShortcutHandler.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="ShortcutHandler.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>274, 17</value> <value>274, 17</value>
</metadata> </metadata>
<metadata name="DuWMHandle.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="ConsoleFontHandle.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>415, 17</value> <value>415, 17</value>
</metadata> </metadata>
</root> </root>

View file

@ -22,9 +22,7 @@ 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
@ -227,7 +225,7 @@ Public Class Console
If Strings.OnceInfo(0) = "Yes" Then If Strings.OnceInfo(0) = "Yes" Then
InfoBar.Text = InfoBar.Text & " root |" InfoBar.Text = InfoBar.Text & " root |"
Else Else
InfoBar.Text = InfoBar.Text & " user |" InfoBar.Text = InfoBar.Text & " " & Strings.ComputerInfo(1) & " |"
End If End If
InfoBar.Text = InfoBar.Text & " " & CurrentInterpreter & " |" InfoBar.Text = InfoBar.Text & " " & CurrentInterpreter & " |"
InfoBar.Text = InfoBar.Text & " " & Strings.ComputerInfo(2) & " CP |" InfoBar.Text = InfoBar.Text & " " & Strings.ComputerInfo(2) & " CP |"
@ -238,7 +236,12 @@ Public Class Console
End Sub End Sub
Private Sub DuWMHandle_Tick(sender As Object, e As EventArgs) Handles DuWMHandle.Tick Private Sub ConsoleFontHandle_Tick(sender As Object, e As EventArgs) Handles ConsoleFontHandle.Tick
If InfoBar.Font IsNot GUISCustomizations.GUIConsoleFont Then
InfoBar.Font = GUISCustomizations.GUIConsoleFont
End If
If ToolBar.Font IsNot GUISCustomizations.GUIConsoleFont Then
ToolBar.Font = GUISCustomizations.GUIConsoleFont
End If
End Sub End Sub
End Class End Class

View file

@ -22,7 +22,7 @@ Partial Class AnusWM_Menu
'Do not modify it using the code editor. 'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _ <System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent() Private Sub InitializeComponent()
Me.MenuStrip1 = New System.Windows.Forms.MenuStrip() Me.mnu_Main = New System.Windows.Forms.MenuStrip()
Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
Me.ApplicationsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ApplicationsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ShifterToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ShifterToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
@ -31,20 +31,21 @@ Partial Class AnusWM_Menu
Me.StopAnusWMToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.StopAnusWMToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.RestartToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.RestartToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ShutdownToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ShutdownToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.MenuStrip1.SuspendLayout() Me.TestcocjToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.mnu_Main.SuspendLayout()
Me.SuspendLayout() Me.SuspendLayout()
' '
'MenuStrip1 'mnu_Main
' '
Me.MenuStrip1.Dock = System.Windows.Forms.DockStyle.Fill Me.mnu_Main.Dock = System.Windows.Forms.DockStyle.Fill
Me.MenuStrip1.Font = New System.Drawing.Font("Segoe UI", 12.0!) Me.mnu_Main.Font = New System.Drawing.Font("Segoe UI", 12.0!)
Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItem1, Me.ApplicationsToolStripMenuItem, Me.ShifterToolStripMenuItem, Me.AboutToolStripMenuItem, Me.ExitToolStripMenuItem}) Me.mnu_Main.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItem1, Me.ApplicationsToolStripMenuItem, Me.ShifterToolStripMenuItem, Me.AboutToolStripMenuItem, Me.ExitToolStripMenuItem})
Me.MenuStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.VerticalStackWithOverflow Me.mnu_Main.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.VerticalStackWithOverflow
Me.MenuStrip1.Location = New System.Drawing.Point(0, 0) Me.mnu_Main.Location = New System.Drawing.Point(0, 0)
Me.MenuStrip1.Name = "MenuStrip1" Me.mnu_Main.Name = "mnu_Main"
Me.MenuStrip1.Size = New System.Drawing.Size(169, 121) Me.mnu_Main.Size = New System.Drawing.Size(169, 121)
Me.MenuStrip1.TabIndex = 0 Me.mnu_Main.TabIndex = 0
Me.MenuStrip1.Text = "MenuStrip1" Me.mnu_Main.Text = "MenuStrip1"
' '
'ToolStripMenuItem1 'ToolStripMenuItem1
' '
@ -53,6 +54,7 @@ Partial Class AnusWM_Menu
' '
'ApplicationsToolStripMenuItem 'ApplicationsToolStripMenuItem
' '
Me.ApplicationsToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.TestcocjToolStripMenuItem})
Me.ApplicationsToolStripMenuItem.Name = "ApplicationsToolStripMenuItem" Me.ApplicationsToolStripMenuItem.Name = "ApplicationsToolStripMenuItem"
Me.ApplicationsToolStripMenuItem.Size = New System.Drawing.Size(162, 25) Me.ApplicationsToolStripMenuItem.Size = New System.Drawing.Size(162, 25)
Me.ApplicationsToolStripMenuItem.Text = "Applications" Me.ApplicationsToolStripMenuItem.Text = "Applications"
@ -79,40 +81,46 @@ Partial Class AnusWM_Menu
'StopAnusWMToolStripMenuItem 'StopAnusWMToolStripMenuItem
' '
Me.StopAnusWMToolStripMenuItem.Name = "StopAnusWMToolStripMenuItem" Me.StopAnusWMToolStripMenuItem.Name = "StopAnusWMToolStripMenuItem"
Me.StopAnusWMToolStripMenuItem.Size = New System.Drawing.Size(180, 26) Me.StopAnusWMToolStripMenuItem.Size = New System.Drawing.Size(179, 26)
Me.StopAnusWMToolStripMenuItem.Text = "Stop AnusWM" Me.StopAnusWMToolStripMenuItem.Text = "Stop AnusWM"
' '
'RestartToolStripMenuItem 'RestartToolStripMenuItem
' '
Me.RestartToolStripMenuItem.Name = "RestartToolStripMenuItem" Me.RestartToolStripMenuItem.Name = "RestartToolStripMenuItem"
Me.RestartToolStripMenuItem.Size = New System.Drawing.Size(180, 26) Me.RestartToolStripMenuItem.Size = New System.Drawing.Size(179, 26)
Me.RestartToolStripMenuItem.Text = "Restart" Me.RestartToolStripMenuItem.Text = "Restart"
' '
'ShutdownToolStripMenuItem 'ShutdownToolStripMenuItem
' '
Me.ShutdownToolStripMenuItem.Name = "ShutdownToolStripMenuItem" Me.ShutdownToolStripMenuItem.Name = "ShutdownToolStripMenuItem"
Me.ShutdownToolStripMenuItem.Size = New System.Drawing.Size(180, 26) Me.ShutdownToolStripMenuItem.Size = New System.Drawing.Size(179, 26)
Me.ShutdownToolStripMenuItem.Text = "Shutdown" Me.ShutdownToolStripMenuItem.Text = "Shutdown"
' '
'TestcocjToolStripMenuItem
'
Me.TestcocjToolStripMenuItem.Name = "TestcocjToolStripMenuItem"
Me.TestcocjToolStripMenuItem.Size = New System.Drawing.Size(180, 26)
Me.TestcocjToolStripMenuItem.Text = "Testcocj"
'
'AnusWM_Menu 'AnusWM_Menu
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.Color.White Me.BackColor = System.Drawing.Color.White
Me.ClientSize = New System.Drawing.Size(169, 121) Me.ClientSize = New System.Drawing.Size(169, 121)
Me.Controls.Add(Me.MenuStrip1) Me.Controls.Add(Me.mnu_Main)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
Me.MainMenuStrip = Me.MenuStrip1 Me.MainMenuStrip = Me.mnu_Main
Me.Name = "AnusWM_Menu" Me.Name = "AnusWM_Menu"
Me.Text = "AnusWM_Menu" Me.Text = "AnusWM_Menu"
Me.MenuStrip1.ResumeLayout(False) Me.mnu_Main.ResumeLayout(False)
Me.MenuStrip1.PerformLayout() Me.mnu_Main.PerformLayout()
Me.ResumeLayout(False) Me.ResumeLayout(False)
Me.PerformLayout() Me.PerformLayout()
End Sub End Sub
Friend WithEvents MenuStrip1 As MenuStrip Friend WithEvents mnu_Main As MenuStrip
Friend WithEvents ToolStripMenuItem1 As ToolStripMenuItem Friend WithEvents ToolStripMenuItem1 As ToolStripMenuItem
Friend WithEvents ApplicationsToolStripMenuItem As ToolStripMenuItem Friend WithEvents ApplicationsToolStripMenuItem As ToolStripMenuItem
Friend WithEvents ShifterToolStripMenuItem As ToolStripMenuItem Friend WithEvents ShifterToolStripMenuItem As ToolStripMenuItem
@ -121,4 +129,5 @@ Partial Class AnusWM_Menu
Friend WithEvents StopAnusWMToolStripMenuItem As ToolStripMenuItem Friend WithEvents StopAnusWMToolStripMenuItem As ToolStripMenuItem
Friend WithEvents RestartToolStripMenuItem As ToolStripMenuItem Friend WithEvents RestartToolStripMenuItem As ToolStripMenuItem
Friend WithEvents ShutdownToolStripMenuItem As ToolStripMenuItem Friend WithEvents ShutdownToolStripMenuItem As ToolStripMenuItem
Friend WithEvents TestcocjToolStripMenuItem As ToolStripMenuItem
End Class End Class

View file

@ -117,7 +117,7 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="MenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="mnu_Main.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
</root> </root>

View file

@ -10,4 +10,8 @@
Private Sub ShutdownToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ShutdownToolStripMenuItem.Click Private Sub ShutdownToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ShutdownToolStripMenuItem.Click
TerminateShiftOS() TerminateShiftOS()
End Sub End Sub
Private Sub ApplicationToolStripMenuSubItem_Click(sender As Object, e As ToolStripItemClickedEventArgs) Handles ApplicationsToolStripMenuItem.DropDownItemClicked
MsgBox(e.ClickedItem.Text.ToString)
End Sub
End Class End Class

View file

@ -50,14 +50,18 @@
End Sub End Sub
Public Sub MQ_CheckAnswer() Public Sub MQ_CheckAnswer()
Dim TheAnswer As Integer = command Try
If TheAnswer = MQ_ShouldResult Then Dim TheAnswer As Integer = command
NewLine("You got the right answer! You got " & MQ_ShouldResult & " Codepoint(s)") If TheAnswer = MQ_ShouldResult Then
ChangeCP(True, MQ_ShouldResult) NewLine("You got the right answer! You got " & MQ_ShouldResult & " Codepoint(s)")
MQ_GiveQuestion() ChangeCP(True, MQ_ShouldResult)
Else MQ_GiveQuestion()
NewLine("You got the wrong answer! Try again") Else
MQ_GiveQuestion() NewLine("You got the wrong answer! Try again")
End If MQ_GiveQuestion()
End If
Catch ex As Exception
NewLine("Invalid number or command")
End Try
End Sub End Sub
End Module End Module