NotepadUltra/Status Bar Options.vb
2019-04-21 02:29:16 +10:00

29 lines
No EOL
1.1 KiB
VB.net

Public Class Status_Bar_Options
Dim StatBarSettings As String() = {"Chars", "Date", "Dir", "FontSize", "Size", "Status", "Mode"}
Private Sub MyForm_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
Icon = ProgramIcon()
For i = 0 To 6
OptionBox.SetItemChecked(i, CallByName(My.Settings, "StatBar" & StatBarSettings(i), CallType.Get))
Next
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
If MsgBox("Restore the default options?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
' CHARS DATE DIR FONT SIZE STATS MODE
Dim defaults As Boolean() = {True, False, True, False, False, True, True}
For i = 0 To 6
OptionBox.SetItemChecked(i, defaults(i))
Next
End If
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
For i = 0 To 6
CallByName(My.Settings, "StatBar" & StatBarSettings(i), CallType.Set, OptionBox.GetItemChecked(i))
Next
NPUWindow.RedrawStatusBar()
My.Settings.Save()
Close()
End Sub
End Class