aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS-TheRevival/MainForms/TerminalInternalApps.vb
diff options
context:
space:
mode:
authorEverythingWindows <[email protected]>2022-11-09 06:30:53 +0700
committerEverythingWindows <[email protected]>2022-11-09 06:30:53 +0700
commit680d108f072a4505ba6e2148d619bc8b6de6ad84 (patch)
tree34e1e50788d9a63478fcc812f7f165a2efb504aa /ShiftOS-TheRevival/MainForms/TerminalInternalApps.vb
parent344a0ff99e1adc6b3cd97e0d4ce7496b12d624b9 (diff)
downloadshiftos-therevival-old-680d108f072a4505ba6e2148d619bc8b6de6ad84.tar.gz
shiftos-therevival-old-680d108f072a4505ba6e2148d619bc8b6de6ad84.tar.bz2
shiftos-therevival-old-680d108f072a4505ba6e2148d619bc8b6de6ad84.zip
rev and cowsay added
Diffstat (limited to 'ShiftOS-TheRevival/MainForms/TerminalInternalApps.vb')
-rw-r--r--ShiftOS-TheRevival/MainForms/TerminalInternalApps.vb85
1 files changed, 85 insertions, 0 deletions
diff --git a/ShiftOS-TheRevival/MainForms/TerminalInternalApps.vb b/ShiftOS-TheRevival/MainForms/TerminalInternalApps.vb
new file mode 100644
index 0000000..b757cb6
--- /dev/null
+++ b/ShiftOS-TheRevival/MainForms/TerminalInternalApps.vb
@@ -0,0 +1,85 @@
+Module TerminalInternalApps
+ Public Sub Cowsay_Say(Say As String)
+ Select Case Say.Length
+ Case 1 To 40
+ Dim SubtractLength As Integer = Say.Length + 1
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & " "
+ Do
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & "_"
+ SubtractLength = SubtractLength - 1
+ If SubtractLength = 0 Then
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & "_"
+ SubtractLength = Say.Length + 1
+ Exit Do
+ End If
+ Loop
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "< " & Say & " >"
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & " "
+ Do
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & "-"
+ SubtractLength = SubtractLength - 1
+ If SubtractLength = 0 Then
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & "-"
+ SubtractLength = Say.Length + 1
+ Exit Do
+ End If
+ Loop
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & " \ ^__^"
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & " \ (oo)\_______"
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & " (__)\ )\/\"
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & " ||----w |"
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & " || ||"
+ Case 41 To 80
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & " __________________________________________ "
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "/ " & Say.Substring(0, 40) & " \"
+ Say = Say.Substring(40, Say.Length - 40)
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "\ " & Say
+ Dim Spaces As Integer = 40 - Say.Length
+ Do
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & " "
+ If Spaces = 0 Then
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & "/"
+ Exit Do
+ End If
+ Spaces = Spaces - 1
+ Loop
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & " ------------------------------------------ "
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & " \ ^__^"
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & " \ (oo)\_______"
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & " (__)\ )\/\"
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & " ||----w |"
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & " || ||"
+ Case >= 81
+ Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "cowsay: Character limit exceeded"
+ 'Dim SubtractLength As Integer = Say.Length + 1
+ 'Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & " __________________________________________ "
+ 'Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "/ " & Say.Substring(0, 40) & " \"
+ 'Dim CurrentLength As Integer = 40
+ 'Dim WhatSay As String
+ 'Dim Spaces As Integer
+ 'Do
+ ' Try
+ ' WhatSay = Say.Substring(CurrentLength, 40)
+ ' Catch ex As Exception
+ ' WhatSay = Say.Substring(CurrentLength, (CurrentLength + 40) - Say.Length)
+ ' End Try
+ ' Spaces = 40 - WhatSay.Length
+ ' If Spaces > 0 Then
+ ' Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "\ " & WhatSay
+ ' Do
+ ' Terminal.TextBox1.Text = Terminal.TextBox1.Text & " "
+ ' If Spaces = 0 Then
+ ' Terminal.TextBox1.Text = Terminal.TextBox1.Text & "/"
+ ' Exit Do
+ ' End If
+ ' Spaces = Spaces - 1
+ ' Loop
+ ' Exit Do
+ ' Else
+ ' Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "| " & WhatSay & " |"
+ ' CurrentLength = CurrentLength + 40
+ ' End If
+ 'Loop
+ End Select
+ End Sub
+End Module