diff options
| author | EverythingWindows <[email protected]> | 2022-11-02 08:52:31 +0700 |
|---|---|---|
| committer | EverythingWindows <[email protected]> | 2022-11-02 08:52:31 +0700 |
| commit | e6f8b7c77bd3163cb84a077a54a4448b41fa63ce (patch) | |
| tree | 2919b03cb0a4521c106c4317af11a4a0da688704 /ShiftOS-TheRevival/MainForms | |
| parent | cbc32f3aba8114e1bf2bc2d1db75a7056e5e575a (diff) | |
| download | shiftos-therevival-old-e6f8b7c77bd3163cb84a077a54a4448b41fa63ce.tar.gz shiftos-therevival-old-e6f8b7c77bd3163cb84a077a54a4448b41fa63ce.tar.bz2 shiftos-therevival-old-e6f8b7c77bd3163cb84a077a54a4448b41fa63ce.zip | |
0.1.1 code
Diffstat (limited to 'ShiftOS-TheRevival/MainForms')
| -rw-r--r-- | ShiftOS-TheRevival/MainForms/ShiftOSMenu.Designer.vb | 9 | ||||
| -rw-r--r-- | ShiftOS-TheRevival/MainForms/ShiftOSMenu.vb | 23 | ||||
| -rw-r--r-- | ShiftOS-TheRevival/MainForms/Strings.vb | 8 | ||||
| -rw-r--r-- | ShiftOS-TheRevival/MainForms/Terminal.Designer.vb | 1 | ||||
| -rw-r--r-- | ShiftOS-TheRevival/MainForms/Terminal.vb | 32 | ||||
| -rw-r--r-- | ShiftOS-TheRevival/MainForms/app.manifest | 79 |
6 files changed, 132 insertions, 20 deletions
diff --git a/ShiftOS-TheRevival/MainForms/ShiftOSMenu.Designer.vb b/ShiftOS-TheRevival/MainForms/ShiftOSMenu.Designer.vb index 69e79e9..e3dc6c0 100644 --- a/ShiftOS-TheRevival/MainForms/ShiftOSMenu.Designer.vb +++ b/ShiftOS-TheRevival/MainForms/ShiftOSMenu.Designer.vb @@ -1,5 +1,5 @@ <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ -Partial Class Form1 +Partial Class ShiftOSMenu Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list. @@ -108,10 +108,7 @@ Partial Class Form1 Me.btn_Exit.Text = "Exit" Me.btn_Exit.UseVisualStyleBackColor = True ' - 'BackgroundWorker1 - ' - ' - 'Form1 + 'ShiftOSMenu ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font @@ -125,7 +122,7 @@ Partial Class Form1 Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.Label1) Me.MaximizeBox = False - Me.Name = "Form1" + Me.Name = "ShiftOSMenu" Me.ShowIcon = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Main Menu" diff --git a/ShiftOS-TheRevival/MainForms/ShiftOSMenu.vb b/ShiftOS-TheRevival/MainForms/ShiftOSMenu.vb index eba98ed..5e6d171 100644 --- a/ShiftOS-TheRevival/MainForms/ShiftOSMenu.vb +++ b/ShiftOS-TheRevival/MainForms/ShiftOSMenu.vb @@ -1,24 +1,27 @@ Imports System.IO -Public Class Form1 +Public Class ShiftOSMenu Public Shared ActualBuildLab As String Public Shared BuildLab() As String Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Try - BuildLab = File.ReadAllLines("D:\ShiftOSBuildLab.txt") - If BuildLab(0) = "No" Then - Dim BuildNum As Integer = BuildLab(1) - BuildNum = BuildLab(1) + 1 - ActualBuildLab = "ShiftOS_TheRevival." & BuildLab(3) & "." & BuildNum & "." & Date.Today.Year & Date.Today.Month & Date.Today.Day - BuildLab(1) = BuildNum - File.WriteAllLines("D:\ShiftOSBuildLab.txt", BuildLab) + If File.Exists("D:\ShiftOSBuildLab.txt") Then + BuildLab = File.ReadAllLines("D:\ShiftOSBuildLab.txt") + If BuildLab(0) = "No" Then + Dim BuildNum As Integer = BuildLab(1) + BuildNum = BuildLab(1) + 1 + ActualBuildLab = "ShiftOS_TheRevival." & BuildLab(3) & "." & BuildNum & "." & Date.Today.Year & Date.Today.Month & Date.Today.Day + BuildLab(1) = BuildNum + File.WriteAllLines("D:\ShiftOSBuildLab.txt", BuildLab) + End If + lbl_BuildString.Text = ActualBuildLab + Else + End If - lbl_BuildString.Text = ActualBuildLab Catch ex As Exception MsgBox("Why? Because of " & ex.Message) - lbl_BuildString.Text = ActualBuildLab End Try End Sub diff --git a/ShiftOS-TheRevival/MainForms/Strings.vb b/ShiftOS-TheRevival/MainForms/Strings.vb index 96285a5..f6cb57a 100644 --- a/ShiftOS-TheRevival/MainForms/Strings.vb +++ b/ShiftOS-TheRevival/MainForms/Strings.vb @@ -3,6 +3,8 @@ Public Shared ComputerInfo(1) As String Public Shared IsFree As Boolean Public Shared OnceInfo(0) As String + Public Shared StoryChapter As Integer + Public Shared AvailableFeature() As String 'STRING CATEGORIZATION WRITING RULES! 'THIS IS IN ORDER TO REMAIN COMPATIBLE WITH OLDER VERSIONS! @@ -24,10 +26,10 @@ '0 = OSVersion (default : dependant) ' 'OnceInfo Strings: - '0 = IsRoot? (default : 0) + '0 = IsRoot? (0.1) (default : 0) ' 'ComputerInfo Strings: - '0 = Computer Name (default : shiftos) - '1 = Username (default : user) + '0 = Computer Name (0.1) (default : shiftos) + '1 = Username (0.1) (default : user) ' End Class diff --git a/ShiftOS-TheRevival/MainForms/Terminal.Designer.vb b/ShiftOS-TheRevival/MainForms/Terminal.Designer.vb index 21c4b62..5dec2f5 100644 --- a/ShiftOS-TheRevival/MainForms/Terminal.Designer.vb +++ b/ShiftOS-TheRevival/MainForms/Terminal.Designer.vb @@ -28,6 +28,7 @@ Partial Class Terminal 'TextBox1 ' Me.TextBox1.BackColor = System.Drawing.Color.Black + Me.TextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None Me.TextBox1.Dock = System.Windows.Forms.DockStyle.Fill Me.TextBox1.Font = New System.Drawing.Font("Consolas", 11.0!) Me.TextBox1.ForeColor = System.Drawing.Color.Silver diff --git a/ShiftOS-TheRevival/MainForms/Terminal.vb b/ShiftOS-TheRevival/MainForms/Terminal.vb index aa88625..2b8abd0 100644 --- a/ShiftOS-TheRevival/MainForms/Terminal.vb +++ b/ShiftOS-TheRevival/MainForms/Terminal.vb @@ -2,6 +2,7 @@ Public command As String Public DefaultPrompt As String Public TrackPos As Integer + Public AdvancedCommand As Boolean Private Sub Terminal_Load(sender As Object, e As EventArgs) Handles MyBase.Load FormBorderStyle = FormBorderStyle.None @@ -11,7 +12,11 @@ Strings.ComputerInfo(1) = "user" PrintPrompt() AssignPrompt() + Else + End If + TextBox1.Select(TextBox1.TextLength, 0) + TextBox1.ScrollToCaret() End Sub Public Sub PrintPrompt() @@ -44,6 +49,31 @@ command = command.ToLower() End Sub + Private Sub DoCommand() + AdvancedCommand = True + Select Case command + Case "clear" + TextBox1.Text = Nothing + AdvancedCommand = False + Case "ver" + TextBox1.Text = TextBox1.Text & Environment.NewLine & "ShiftOS TheRevival version 0.1.1" + AdvancedCommand = False + Case "shutdown", "shut down" + ShiftOSMenu.Show() + Close() + End Select + + If AdvancedCommand = True Then + If command Like "print *" Then + TextBox1.Text = TextBox1.Text & Environment.NewLine & command.Substring(6) + Dim printed As String = command.Replace("print ", "") + ''It has the same issue, only displays in lowercase + 'TextBox1.Text = TextBox1.Text & Environment.NewLine & printed + End If + AdvancedCommand = False + End If + End Sub + Private Sub txtterm_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown If e.KeyCode = Keys.T AndAlso e.Control Then Me.Hide() @@ -85,7 +115,7 @@ If e.KeyCode = Keys.Enter Then e.SuppressKeyPress = True ReadCommand() - 'DoCommand() + DoCommand() If command = "clear" Then PrintPrompt() diff --git a/ShiftOS-TheRevival/MainForms/app.manifest b/ShiftOS-TheRevival/MainForms/app.manifest new file mode 100644 index 0000000..438ee0d --- /dev/null +++ b/ShiftOS-TheRevival/MainForms/app.manifest @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="utf-8"?> +<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"> + <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/> + <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> + <security> + <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3"> + <!-- UAC Manifest Options + If you want to change the Windows User Account Control level replace the + requestedExecutionLevel node with one of the following. + + <requestedExecutionLevel level="asInvoker" uiAccess="false" /> + <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> + <requestedExecutionLevel level="highestAvailable" uiAccess="false" /> + + Specifying requestedExecutionLevel element will disable file and registry virtualization. + Remove this element if your application requires this virtualization for backwards + compatibility. + --> + <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> + </requestedPrivileges> + </security> + </trustInfo> + + <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> + <application> + <!-- A list of the Windows versions that this application has been tested on + and is designed to work with. Uncomment the appropriate elements + and Windows will automatically select the most compatible environment. --> + + <!-- Windows Vista --> + <!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />--> + + <!-- Windows 7 --> + <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />--> + + <!-- Windows 8 --> + <!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />--> + + <!-- Windows 8.1 --> + <!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />--> + + <!-- Windows 10 --> + <!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />--> + + </application> + </compatibility> + + <!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher + DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need + to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should + also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. + + Makes the application long-path aware. See https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation --> + <!-- + <application xmlns="urn:schemas-microsoft-com:asm.v3"> + <windowsSettings> + <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware> + <longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware> + </windowsSettings> + </application> + --> + + <!-- Enable themes for Windows common controls and dialogs (Windows XP and later) --> + <!-- + <dependency> + <dependentAssembly> + <assemblyIdentity + type="win32" + name="Microsoft.Windows.Common-Controls" + version="6.0.0.0" + processorArchitecture="*" + publicKeyToken="6595b64144ccf1df" + language="*" + /> + </dependentAssembly> + </dependency> + --> + +</assembly> |
