shiftos-next/shiftos_next/TextPad.vb
TheUltimateHacker 57e6eec1bc Basic Window Manager implemented
WARNING: Due to a bug that made the save engine think it was ShiftOS
0.0.8, I had to change the actualshiftversion variable to prevent older
ShiftOS versions opening the save file thus crashing. Due to this,
ShiftOS-Next will automatically delete C:\ShiftOS and rewrite the save.

Besides that, I've added a new Window Manager that can be bought after
buying Gray, Basic GUI Server, File Skimmer, and Textpad. This window
manager allows you to run multiple apps at once in their own window, as
well as having up to 3 Terminals running at once. It is a
work-in-progress feature, but it's currently stable.
2015-05-23 10:21:24 -04:00

87 lines
No EOL
3.4 KiB
VB.net

Public Class TextPad
Private Sub OpenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles OpenToolStripMenuItem.Click
file_skimmer.mode = "open"
file_skimmer.application = "textpad"
file_skimmer.Show()
End Sub
Private Sub SaveToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles SaveToolStripMenuItem.Click
file_skimmer.mode = "save"
file_skimmer.application = "textpad"
file_skimmer.Show()
End Sub
Private Sub ExitToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ExitToolStripMenuItem.Click
Me.Close()
End Sub
Private Sub NewToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles NewToolStripMenuItem.Click
txtfilebody.Text = ""
End Sub
Private Sub CutToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles CutToolStripMenuItem.Click
txtfilebody.Cut()
End Sub
Private Sub CopyToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles CopyToolStripMenuItem.Click
txtfilebody.Copy()
End Sub
Private Sub PasteToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles PasteToolStripMenuItem.Click
txtfilebody.Paste()
End Sub
Private Sub UndoToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles UndoToolStripMenuItem.Click
txtfilebody.Undo()
End Sub
Private Sub RedoToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles RedoToolStripMenuItem.Click
txtfilebody.Redo()
End Sub
Private Sub SelectAllToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles SelectAllToolStripMenuItem.Click
txtfilebody.SelectAll()
End Sub
Private Sub FindToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles FindToolStripMenuItem.Click
basicwm_infobox.showinfo("Find", "Please specify a phrase to find:", True)
txtfilebody.Find(basicwm_infobox.userinput)
End Sub
Private Sub ReplaceToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ReplaceToolStripMenuItem.Click
basicwm_infobox.showinfo("Find", "Please specify a phrase to find:", True)
Dim whattofind As String = basicwm_infobox.userinput
basicwm_infobox.showinfo("Replace", "What shall we replace """ & whattofind & """ with?", True)
txtfilebody.Text = txtfilebody.Text.Replace(whattofind, basicwm_infobox.userinput)
End Sub
Private Sub TextPad_Load(sender As Object, e As EventArgs) Handles Me.Load
MenuStrip1.Renderer = New basicwm_renderer()
setupmenufonts()
Me.WindowState = FormWindowState.Maximized
If boughtbasicwm = True Then
pnltop.Show()
Me.WindowState = FormWindowState.Normal
Me.Left = (Screen.PrimaryScreen.Bounds.Width - Me.Width) / 2
Me.Top = (Screen.PrimaryScreen.Bounds.Height - Me.Height) / 2
Me.TopMost = True
Else
pnltop.Hide()
Me.WindowState = FormWindowState.Maximized
Me.TopMost = False
End If
End Sub
Public Sub setupmenufonts()
For Each item In MenuStrip1.Items
item.ForeColor = Color.White
item.Font = New Font("Courier New", 8.25)
For Each SubItem In item.DropDownItems
SubItem.ForeColor = Color.White
SubItem.font = New Font("Courier New", 8.25)
Next
Next
End Sub
End Class