mirror of
https://github.com/EverythingWindows/ShiftOS-TheRevival-Old.git
synced 2025-01-22 03:11:48 -05: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
|
||||
BadCommand = False
|
||||
Case "date"
|
||||
If Strings.AvailableFeature(24) = 1 Then
|
||||
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
|
||||
DateTerm()
|
||||
Case "dir"
|
||||
If Strings.AvailableFeature(16) = "1" Then
|
||||
TerminalDirectories(CurrentDirectory)
|
||||
|
@ -240,27 +205,7 @@ Public Class Console
|
|||
BadCommand = False
|
||||
End If
|
||||
Case "time"
|
||||
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
|
||||
TimeTerm()
|
||||
AdvancedCommand = False
|
||||
BadCommand = False
|
||||
Case "su"
|
||||
|
|
|
@ -10,6 +10,7 @@ Public Class ShiftOSMenu
|
|||
|
||||
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
CheckInstall()
|
||||
lbl_BuildString.Text = My.Resources.CurrentVersion
|
||||
BannerChange.Start()
|
||||
End Sub
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
NewLine("(textpad | 100 CP) TextPad")
|
||||
Else
|
||||
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
|
||||
|
@ -88,6 +88,26 @@
|
|||
Else
|
||||
If Strings.AvailableFeature(24) = "0" Then
|
||||
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
|
||||
|
|
|
@ -205,7 +205,7 @@ Module TerminalExternalApps
|
|||
Select Case GetText
|
||||
Case "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
|
||||
BC_CurrentNumber = BC_CurrentNumber & GetText
|
||||
Case "+", "-", "*", "/"
|
||||
Case "+", "-", "*", "/", "^"
|
||||
Dim BC_Numbers3 As Integer
|
||||
Select Case BC_ThriceMoreValue
|
||||
Case 1
|
||||
|
@ -224,7 +224,7 @@ Module TerminalExternalApps
|
|||
End Select
|
||||
BC_Operation2 = GetText
|
||||
Case "."
|
||||
Console.TextBox1.Text = Console.TextBox1.Text & "Decimals aren't supported yet!"
|
||||
NewLine("Decimals aren't supported yet!")
|
||||
Case Else
|
||||
'BC_Counting(BC_Numbers1, BC_Numbers2, BC_Operation2)
|
||||
End Select
|
||||
|
@ -251,6 +251,8 @@ Module TerminalExternalApps
|
|||
BC_Result = FirstNum * SecondNum
|
||||
Case "/"
|
||||
BC_Result = FirstNum / SecondNum
|
||||
Case "^"
|
||||
BC_Result = FirstNum ^ SecondNum
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
|
|
|
@ -83,6 +83,45 @@
|
|||
End Select
|
||||
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()
|
||||
NewLine("ShiftOS Help Manual")
|
||||
NewLine(Nothing)
|
||||
|
@ -207,7 +246,7 @@
|
|||
Dim mancommand As String = Command.Replace("man ", "")
|
||||
Dim TempUsage As String = "'" & mancommand & "' Usage: "
|
||||
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"
|
||||
If Strings.AvailableFeature(9) = "1" Then
|
||||
TempUsage = TempUsage & "bc"
|
||||
|
@ -381,4 +420,28 @@
|
|||
NewLine(" .~?55Y?!^:... ")
|
||||
NewLine(" .:~~^~^^::. ")
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue