diff options
| author | EverythingWindows <[email protected]> | 2022-11-17 11:22:51 +0700 |
|---|---|---|
| committer | EverythingWindows <[email protected]> | 2022-11-17 11:22:51 +0700 |
| commit | be79ac82e2a542d21f15222119be99051f32dfa8 (patch) | |
| tree | 0a2191a3273856e40c9180363be4753c98344b38 /ShiftOS-TheRevival/TerminalApplications/External/Textpad/App_TextPad.vb | |
| parent | f9c724e547a659671174d264ba74603ac8227b6e (diff) | |
| download | shiftos-therevival-old-be79ac82e2a542d21f15222119be99051f32dfa8.tar.gz shiftos-therevival-old-be79ac82e2a542d21f15222119be99051f32dfa8.tar.bz2 shiftos-therevival-old-be79ac82e2a542d21f15222119be99051f32dfa8.zip | |
More structured in functions
Diffstat (limited to 'ShiftOS-TheRevival/TerminalApplications/External/Textpad/App_TextPad.vb')
| -rw-r--r-- | ShiftOS-TheRevival/TerminalApplications/External/Textpad/App_TextPad.vb | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/ShiftOS-TheRevival/TerminalApplications/External/Textpad/App_TextPad.vb b/ShiftOS-TheRevival/TerminalApplications/External/Textpad/App_TextPad.vb new file mode 100644 index 0000000..80e9599 --- /dev/null +++ b/ShiftOS-TheRevival/TerminalApplications/External/Textpad/App_TextPad.vb @@ -0,0 +1,34 @@ +Imports System.IO + +Module App_TextPad + Public Sub TextPad_CheckExist(TxtFileName As String) + If File.Exists(Console.CurrentDirectory & "\" & TxtFileName) = True Then + Console.TextBox1.Text = My.Computer.FileSystem.ReadAllText(Console.CurrentDirectory & "\" & TxtFileName) + End If + End Sub + + Public Sub TextPad_GenerateCP_SavedFile() + Select Case Console.TextBox1.TextLength + Case 1 To 9 + Dim GetCP As New Random + Dim GotCP As Integer = GetCP.Next(1, 3) + ChangeCP(True, GotCP) + Case 10 To 99 + Dim GetCP As New Random + Dim GotCP As Integer = GetCP.Next(4, 26) + ChangeCP(True, GotCP) + Case 100 To 999 + Dim GetCP As New Random + Dim GotCP As Integer = GetCP.Next(27, 251) + ChangeCP(True, GotCP) + Case 1000 To 9999 + Dim GetCP As New Random + Dim GotCP As Integer = GetCP.Next(252, 2501) + ChangeCP(True, GotCP) + End Select + End Sub + + Public Sub TextPad_WarnFile() + NewLine("Type any filename after 'textpad'!, ex: textpad text.txt") + End Sub +End Module |
