mirror of
https://github.com/EverythingWindows/ShiftOS-TheRevival-Old.git
synced 2025-01-22 18:02:16 +00:00
moving more from Console to Terminal Internal/External Apps
This commit is contained in:
parent
5fe61b8fe4
commit
b37a6e60c9
5 changed files with 92 additions and 61 deletions
|
@ -131,42 +131,7 @@ Public Class Console
|
||||||
AdvancedCommand = False
|
AdvancedCommand = False
|
||||||
BadCommand = False
|
BadCommand = False
|
||||||
Case "date"
|
Case "date"
|
||||||
If Strings.AvailableFeature(24) = 1 Then
|
DateTerm()
|
||||||
NewLine("The date is " & Date.Now.DayOfYear & " days since the first day of the year")
|
|
||||||
AdvancedCommand = False
|
|
||||||
BadCommand = False
|
|
||||||
ElseIf Strings.AvailableFeature(24) = 3 Then
|
|
||||||
If Strings.AvailableFeature(25) = 1 Then
|
|
||||||
Dim TheWeek As String = Date.Now.DayOfYear / 7
|
|
||||||
NewLine("The date is " & TheWeek.Substring(0, 2) & " weeks since the first week of the year")
|
|
||||||
AdvancedCommand = False
|
|
||||||
BadCommand = False
|
|
||||||
ElseIf Strings.AvailableFeature(25) = 3 Then
|
|
||||||
If Strings.AvailableFeature(26) = 1 Then
|
|
||||||
NewLine("The date is " & Date.Now.Month & " months since the first month of the year")
|
|
||||||
AdvancedCommand = False
|
|
||||||
BadCommand = False
|
|
||||||
ElseIf Strings.AvailableFeature(26) = 3 Then
|
|
||||||
If Strings.AvailableFeature(27) = 1 Then
|
|
||||||
NewLine("The year is " & Date.Now.Year)
|
|
||||||
AdvancedCommand = False
|
|
||||||
BadCommand = False
|
|
||||||
ElseIf Strings.AvailableFeature(27) = 3 Then
|
|
||||||
If Strings.AvailableFeature(28) = 1 Then
|
|
||||||
NewLine("The date is " & Date.Now.Day & "/" & Date.Now.Month)
|
|
||||||
AdvancedCommand = False
|
|
||||||
BadCommand = False
|
|
||||||
ElseIf Strings.AvailableFeature(28) = 3 Then
|
|
||||||
If Strings.AvailableFeature(29) = 1 Then
|
|
||||||
NewLine("The date is " & Date.Now.Day & "/" & Date.Now.Month & "/" & Date.Now.Year)
|
|
||||||
AdvancedCommand = False
|
|
||||||
BadCommand = False
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Case "dir"
|
Case "dir"
|
||||||
If Strings.AvailableFeature(16) = "1" Then
|
If Strings.AvailableFeature(16) = "1" Then
|
||||||
TerminalDirectories(CurrentDirectory)
|
TerminalDirectories(CurrentDirectory)
|
||||||
|
@ -240,27 +205,7 @@ Public Class Console
|
||||||
BadCommand = False
|
BadCommand = False
|
||||||
End If
|
End If
|
||||||
Case "time"
|
Case "time"
|
||||||
If Strings.AvailableFeature(5) = "1" Then
|
TimeTerm()
|
||||||
NewLine(Math.Floor(Date.Now.Subtract(Date.Today).TotalSeconds) & " seconds passed since midnight")
|
|
||||||
ElseIf Strings.AvailableFeature(5) = "3" Then
|
|
||||||
If Strings.AvailableFeature(6) = "1" Then
|
|
||||||
NewLine(Math.Floor(Date.Now.Subtract(Date.Today).TotalMinutes) & " minutes passed since midnight")
|
|
||||||
ElseIf Strings.AvailableFeature(6) = "3" Then
|
|
||||||
If Strings.AvailableFeature(7) = "1" Then
|
|
||||||
NewLine(Math.Floor(Date.Now.Subtract(Date.Today).TotalHours) & " hours passed since midnight")
|
|
||||||
ElseIf Strings.AvailableFeature(7) = "3" Then
|
|
||||||
If Strings.AvailableFeature(12) = "1" Then
|
|
||||||
If Date.Now.Hour < 12 Then
|
|
||||||
NewLine("The time is " & TimeOfDay.Hour & " AM")
|
|
||||||
Else
|
|
||||||
NewLine("The time is " & TimeOfDay.Hour - 12 & " PM")
|
|
||||||
End If
|
|
||||||
ElseIf Strings.AvailableFeature(23) = "1" Then
|
|
||||||
NewLine("The time is " & TimeOfDay.Hour & ":" & TimeOfDay.Minute)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
AdvancedCommand = False
|
AdvancedCommand = False
|
||||||
BadCommand = False
|
BadCommand = False
|
||||||
Case "su"
|
Case "su"
|
||||||
|
|
|
@ -10,6 +10,7 @@ Public Class ShiftOSMenu
|
||||||
|
|
||||||
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
CheckInstall()
|
CheckInstall()
|
||||||
|
lbl_BuildString.Text = My.Resources.CurrentVersion
|
||||||
BannerChange.Start()
|
BannerChange.Start()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
NewLine("(textpad | 100 CP) TextPad")
|
NewLine("(textpad | 100 CP) TextPad")
|
||||||
Else
|
Else
|
||||||
If Strings.AvailableFeature(30) = "0" Then
|
If Strings.AvailableFeature(30) = "0" Then
|
||||||
NewLine("(script | 100 CP) ShiftOS Batch Script Support")
|
NewLine("(batchscript | 100 CP) ShiftOS Batch Script Support")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
@ -88,6 +88,26 @@
|
||||||
Else
|
Else
|
||||||
If Strings.AvailableFeature(24) = "0" Then
|
If Strings.AvailableFeature(24) = "0" Then
|
||||||
NewLine("(date | 70 CP) Date command")
|
NewLine("(date | 70 CP) Date command")
|
||||||
|
Else
|
||||||
|
If Strings.AvailableFeature(25) = "0" Then
|
||||||
|
NewLine("(woy | 75 CP) Date by week of year")
|
||||||
|
Else
|
||||||
|
If Strings.AvailableFeature(26) = "0" Then
|
||||||
|
NewLine("(moy | 80 CP) Date by month of year")
|
||||||
|
Else
|
||||||
|
If Strings.AvailableFeature(27) = "0" Then
|
||||||
|
NewLine("(year | 85 CP) Date by year")
|
||||||
|
Else
|
||||||
|
If Strings.AvailableFeature(28) = "0" Then
|
||||||
|
NewLine("(mmyyyy | 90 CP) Date by month and year")
|
||||||
|
Else
|
||||||
|
If Strings.AvailableFeature(29) = "0" Then
|
||||||
|
NewLine("(generaldate | 95 CP) Date by general format")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
|
@ -205,7 +205,7 @@ Module TerminalExternalApps
|
||||||
Select Case GetText
|
Select Case GetText
|
||||||
Case "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
|
Case "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
|
||||||
BC_CurrentNumber = BC_CurrentNumber & GetText
|
BC_CurrentNumber = BC_CurrentNumber & GetText
|
||||||
Case "+", "-", "*", "/"
|
Case "+", "-", "*", "/", "^"
|
||||||
Dim BC_Numbers3 As Integer
|
Dim BC_Numbers3 As Integer
|
||||||
Select Case BC_ThriceMoreValue
|
Select Case BC_ThriceMoreValue
|
||||||
Case 1
|
Case 1
|
||||||
|
@ -224,7 +224,7 @@ Module TerminalExternalApps
|
||||||
End Select
|
End Select
|
||||||
BC_Operation2 = GetText
|
BC_Operation2 = GetText
|
||||||
Case "."
|
Case "."
|
||||||
Console.TextBox1.Text = Console.TextBox1.Text & "Decimals aren't supported yet!"
|
NewLine("Decimals aren't supported yet!")
|
||||||
Case Else
|
Case Else
|
||||||
'BC_Counting(BC_Numbers1, BC_Numbers2, BC_Operation2)
|
'BC_Counting(BC_Numbers1, BC_Numbers2, BC_Operation2)
|
||||||
End Select
|
End Select
|
||||||
|
@ -251,6 +251,8 @@ Module TerminalExternalApps
|
||||||
BC_Result = FirstNum * SecondNum
|
BC_Result = FirstNum * SecondNum
|
||||||
Case "/"
|
Case "/"
|
||||||
BC_Result = FirstNum / SecondNum
|
BC_Result = FirstNum / SecondNum
|
||||||
|
Case "^"
|
||||||
|
BC_Result = FirstNum ^ SecondNum
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
|
@ -83,6 +83,45 @@
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Sub DateTerm()
|
||||||
|
If Strings.AvailableFeature(24) = 1 Then
|
||||||
|
NewLine("The date is " & Date.Now.DayOfYear & " days since the first day of the year")
|
||||||
|
AdvancedCommand = False
|
||||||
|
Console.BadCommand = False
|
||||||
|
ElseIf Strings.AvailableFeature(24) = 3 Then
|
||||||
|
If Strings.AvailableFeature(25) = 1 Then
|
||||||
|
Dim TheWeek As String = Date.Now.DayOfYear / 7
|
||||||
|
NewLine("The date is " & TheWeek.Substring(0, 2) & " weeks since the first week of the year")
|
||||||
|
AdvancedCommand = False
|
||||||
|
Console.BadCommand = False
|
||||||
|
ElseIf Strings.AvailableFeature(25) = 3 Then
|
||||||
|
If Strings.AvailableFeature(26) = 1 Then
|
||||||
|
NewLine("The date is " & Date.Now.Month & " months since the first month of the year")
|
||||||
|
AdvancedCommand = False
|
||||||
|
Console.BadCommand = False
|
||||||
|
ElseIf Strings.AvailableFeature(26) = 3 Then
|
||||||
|
If Strings.AvailableFeature(27) = 1 Then
|
||||||
|
NewLine("The year is " & Date.Now.Year)
|
||||||
|
AdvancedCommand = False
|
||||||
|
Console.BadCommand = False
|
||||||
|
ElseIf Strings.AvailableFeature(27) = 3 Then
|
||||||
|
If Strings.AvailableFeature(28) = 1 Then
|
||||||
|
NewLine("The date is " & Date.Now.Day & "/" & Date.Now.Month)
|
||||||
|
AdvancedCommand = False
|
||||||
|
Console.BadCommand = False
|
||||||
|
ElseIf Strings.AvailableFeature(28) = 3 Then
|
||||||
|
If Strings.AvailableFeature(29) = 1 Then
|
||||||
|
NewLine("The date is " & Date.Now.Day & "/" & Date.Now.Month & "/" & Date.Now.Year)
|
||||||
|
AdvancedCommand = False
|
||||||
|
Console.BadCommand = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Public Sub Help()
|
Public Sub Help()
|
||||||
NewLine("ShiftOS Help Manual")
|
NewLine("ShiftOS Help Manual")
|
||||||
NewLine(Nothing)
|
NewLine(Nothing)
|
||||||
|
@ -207,7 +246,7 @@
|
||||||
Dim mancommand As String = Command.Replace("man ", "")
|
Dim mancommand As String = Command.Replace("man ", "")
|
||||||
Dim TempUsage As String = "'" & mancommand & "' Usage: "
|
Dim TempUsage As String = "'" & mancommand & "' Usage: "
|
||||||
Select Case mancommand
|
Select Case mancommand
|
||||||
'In process to convert every command from printing from code to printing from text file
|
'In process to convert every command from printing from code to printing from text file
|
||||||
Case "bc"
|
Case "bc"
|
||||||
If Strings.AvailableFeature(9) = "1" Then
|
If Strings.AvailableFeature(9) = "1" Then
|
||||||
TempUsage = TempUsage & "bc"
|
TempUsage = TempUsage & "bc"
|
||||||
|
@ -381,4 +420,28 @@
|
||||||
NewLine(" .~?55Y?!^:... ")
|
NewLine(" .~?55Y?!^:... ")
|
||||||
NewLine(" .:~~^~^^::. ")
|
NewLine(" .:~~^~^^::. ")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Sub TimeTerm()
|
||||||
|
If Strings.AvailableFeature(5) = 1 Then
|
||||||
|
NewLine(Math.Floor(Date.Now.Subtract(Date.Today).TotalSeconds) & " seconds passed since midnight")
|
||||||
|
ElseIf Strings.AvailableFeature(5) = 3 Then
|
||||||
|
If Strings.AvailableFeature(6) = 1 Then
|
||||||
|
NewLine(Math.Floor(Date.Now.Subtract(Date.Today).TotalMinutes) & " minutes passed since midnight")
|
||||||
|
ElseIf Strings.AvailableFeature(6) = 3 Then
|
||||||
|
If Strings.AvailableFeature(7) = 1 Then
|
||||||
|
NewLine(Math.Floor(Date.Now.Subtract(Date.Today).TotalHours) & " hours passed since midnight")
|
||||||
|
ElseIf Strings.AvailableFeature(7) = 3 Then
|
||||||
|
If Strings.AvailableFeature(12) = 1 Then
|
||||||
|
If Date.Now.Hour < 12 Then
|
||||||
|
NewLine("The time is " & TimeOfDay.Hour & " AM")
|
||||||
|
Else
|
||||||
|
NewLine("The time is " & TimeOfDay.Hour - 12 & " PM")
|
||||||
|
End If
|
||||||
|
ElseIf Strings.AvailableFeature(23) = 1 Then
|
||||||
|
NewLine("The time is " & TimeOfDay.Hour & ":" & TimeOfDay.Minute)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Module
|
End Module
|
||||||
|
|
Loading…
Reference in a new issue