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

View file

@ -64,6 +64,17 @@ Module SaveLoadSystem
Strings.AvailableFeature(41) = "2"
'0.2.8 Features
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
Strings.AvailableFeature(0) = "1"
Strings.AvailableFeature(1) = "1"

View file

@ -29,7 +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.ConsoleFontHandle = New System.Windows.Forms.Timer(Me.components)
Me.SuspendLayout()
'
'TextBox1
@ -81,7 +81,7 @@ Partial Class Console
Me.ToolBar.TabIndex = 1
Me.ToolBar.Visible = False
'
'DuWMHandle
'ConsoleFontHandle
'
'
'Console
@ -109,5 +109,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
Friend WithEvents ConsoleFontHandle As Timer
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">
<value>274, 17</value>
</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>
</metadata>
</root>

View file

@ -22,9 +22,7 @@ Public Class Console
With ShortcutHandler
.WorkerSupportsCancellation = True
End With
'MsgBox("Full!")
Console_Full()
'MsgBox("Initialize!")
InitializeTerminal()
End Sub
@ -227,7 +225,7 @@ Public Class Console
If Strings.OnceInfo(0) = "Yes" Then
InfoBar.Text = InfoBar.Text & " root |"
Else
InfoBar.Text = InfoBar.Text & " user |"
InfoBar.Text = InfoBar.Text & " " & Strings.ComputerInfo(1) & " |"
End If
InfoBar.Text = InfoBar.Text & " " & CurrentInterpreter & " |"
InfoBar.Text = InfoBar.Text & " " & Strings.ComputerInfo(2) & " CP |"
@ -238,7 +236,12 @@ Public Class Console
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 Class

View file

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

View file

@ -117,7 +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="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>
</metadata>
</root>

View file

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

View file

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