Как добавить пробел между двумя символами в VB.NET для светодиодного дисплея ?
AB должен отображаться как A B ( пробел должен состоять только из 1 или двух столбцов )
это для стандартного матричного шрифта 5*7.
Пожалуйста, помогите мне также для многострочного кодирования
Что я уже пробовал:
'This class is used for mapping characters into BitArrays. 'Nothing too complicated going on here. 'Characters are based on a 5X7 Matrix Display. Public Class MatrixCharacterMapper Private _maps() As BitArray Public Sub New() End Sub Public Sub New(ByVal text As String) GenerateCharacterMaps(text) End Sub Default Public Property CharacterMap(ByVal index As Long) As BitArray Get If index < 0 Or index > _maps.Length - 1 Then Return Nothing End If Return _maps(index) End Get Set(ByVal map As BitArray) If index < 0 Or index > _maps.Length - 1 Then Return End If _maps(index) = map End Set End Property Public ReadOnly Property CharacterMaps() As BitArray() Get If _maps Is Nothing Then Return Nothing End If Return _maps.Clone() End Get End Property 'we generate our bit arrays, feel free to modify these or create your own Public Sub GenerateCharacterMaps(ByVal text As String) If text.Length = 0 Then Return End If ReDim _maps(text.Length - 1) For i As Integer = 0 To text.Length - 1 'build this char into its relative bit array _maps(i) = BuildCharacterMap(text.Chars(i)) Next End Sub 'this is just cake '35 bits/char 5X7 matrix display Private Function BuildCharacterMap(ByVal character As Char) As BitArray Select Case character 'Lower Case Characters Case Is = "a" Return BitsOn(New Integer() {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1}) Case Is = "b" Return BitsOn(New Integer() {1, 0, 0, 0, 0, _ 1, 0, 0, 0, 0, _ 1, 0, 1, 1, 0, _ 1, 1, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 1, 1, 1, 0}) Case Is = "c" Return BitsOn(New Integer() {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0}) Case Is = "d" Return BitsOn(New Integer() {0, 0, 0, 0, 1, _ 0, 0, 0, 0, 1, _ 0, 1, 1, 0, 1, _ 1, 0, 0, 1, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 0, 1, 1, 1, 1}) Case Is = "e" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 1, 1, 1, 0, _ 1, 0, 0, 0, 1, _ 1, 1, 1, 1, 1, _ 1, 0, 0, 0, 0, _ 0, 1, 1, 1, 0}) Case Is = "f" Return BitsOn(New Integer() {0, 0, 1, 1, 0, _ 0, 1, 0, 0, 1, _ 0, 1, 0, 0, 0, _ 1, 1, 1, 1, 0, _ 0, 1, 0, 0, 0, _ 0, 1, 0, 0, 0, _ 0, 1, 0, 0, 0}) Case Is = "g" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 1, 1, 1, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 0, 1, 1, 1, 1, _ 0, 0, 0, 0, 1, _ 0, 1, 1, 1, 0}) Case Is = "h" Return BitsOn(New Integer() {1, 0, 0, 0, 0, _ 1, 0, 0, 0, 0, _ 1, 0, 1, 1, 0, _ 1, 1, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1}) Case Is = "i" Return BitsOn(New Integer() {0, 0, 1, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 1, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 1, 1, 1, 0}) Case Is = "j" Return BitsOn(New Integer() {0, 0, 0, 1, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 1, 1, 0, _ 0, 0, 0, 1, 0, _ 0, 0, 0, 1, 0, _ 1, 0, 0, 1, 0, _ 0, 1, 1, 0, 0}) Case Is = "k" Return BitsOn(New Integer() {1, 0, 0, 0, 0, _ 1, 0, 0, 0, 0, _ 1, 0, 0, 1, 0, _ 1, 0, 1, 0, 0, _ 1, 1, 0, 0, 0, _ 1, 0, 1, 0, 0, _ 1, 0, 0, 1, 0}) Case Is = "l" Return BitsOn(New Integer() {0, 1, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 1, 1, 1, 0}) Case Is = "m" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 1, 1, 0, 1, 0, _ 1, 0, 1, 0, 1, _ 1, 0, 1, 0, 1, _ 1, 0, 1, 0, 1, _ 1, 0, 1, 0, 1}) Case Is = "n" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 1, 0, 1, 1, 0, _ 1, 1, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1}) Case Is = "o" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 1, 1, 1, 0, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 0, 1, 1, 1, 0}) Case Is = "p" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 1, 1, 1, 1, 0, _ 1, 0, 0, 0, 1, _ 1, 1, 1, 1, 0, _ 1, 0, 0, 0, 0, _ 1, 0, 0, 0, 0}) Case Is = "q" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 1, 1, 0, 1, _ 1, 0, 0, 1, 1, _ 0, 1, 1, 1, 1, _ 0, 0, 0, 0, 1, _ 0, 0, 0, 0, 1}) Case Is = "r" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 1, 0, 1, 1, 0, _ 1, 1, 0, 0, 1, _ 1, 0, 0, 0, 0, _ 1, 0, 0, 0, 0, _ 1, 0, 0, 0, 0}) Case Is = "s" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 1, 1, 1, 0, _ 1, 0, 0, 0, 0, _ 0, 1, 1, 1, 0, _ 0, 0, 0, 0, 1, _ 1, 1, 1, 1, 0}) Case Is = "t" Return BitsOn(New Integer() {0, 1, 0, 0, 0, _ 0, 1, 0, 0, 0, _ 1, 1, 1, 0, 0, _ 0, 1, 0, 0, 0, _ 0, 1, 0, 0, 0, _ 0, 1, 0, 0, 1, _ 0, 0, 1, 1, 0}) Case Is = "u" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 1, 1, _ 0, 1, 1, 0, 1}) Case Is = "v" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 0, 1, 0, 1, 0, _ 0, 0, 1, 0, 0}) Case Is = "w" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 1, 0, 1, _ 1, 0, 1, 0, 1, _ 0, 1, 0, 1, 0}) Case Is = "x" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 1, 0, 0, 0, 1, _ 0, 1, 0, 1, 0, _ 0, 0, 1, 0, 0, _ 0, 1, 0, 1, 0, _ 1, 0, 0, 0, 1}) Case Is = "y" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 0, 1, 1, 1, 1, _ 0, 0, 0, 0, 1, _ 0, 1, 1, 1, 0}) Case Is = "z" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 1, 1, 1, 1, 1, _ 0, 0, 0, 1, 0, _ 0, 0, 1, 0, 0, _ 0, 1, 0, 0, 0, _ 1, 1, 1, 1, 1}) 'Upper Case Characters Case Is = "A" Return BitsOn(New Integer() {0, 1, 1, 1, 0, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 1, 1, 1, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1}) Case Is = "B" Return BitsOn(New Integer() {1, 1, 1, 1, 0, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 1, 1, 1, 0, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 1, 1, 1, 0}) Case Is = "C" Return BitsOn(New Integer() {0, 1, 1, 1, 0, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 0, _ 1, 0, 0, 0, 0, _ 1, 0, 0, 0, 0, _ 1, 0, 0, 0, 1, _ 0, 1, 1, 1, 0}) Case Is = "D" Return BitsOn(New Integer() {1, 1, 1, 0, 0, _ 1, 0, 0, 1, 0, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 1, 0, _ 1, 1, 1, 0, 0}) Case Is = "E" Return BitsOn(New Integer() {1, 1, 1, 1, 1, _ 1, 0, 0, 0, 0, _ 1, 0, 0, 0, 0, _ 1, 1, 1, 1, 0, _ 1, 0, 0, 0, 0, _ 1, 0, 0, 0, 0, _ 1, 1, 1, 1, 1}) Case Is = "F" Return BitsOn(New Integer() {1, 1, 1, 1, 1, _ 1, 0, 0, 0, 0, _ 1, 0, 0, 0, 0, _ 1, 1, 1, 1, 0, _ 1, 0, 0, 0, 0, _ 1, 0, 0, 0, 0, _ 1, 0, 0, 0, 0}) Case Is = "G" Return BitsOn(New Integer() {0, 1, 1, 1, 0, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 0, _ 1, 0, 1, 1, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 0, 1, 1, 1, 1}) Case Is = "H" Return BitsOn(New Integer() {1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 1, 1, 1, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1}) Case Is = "I" Return BitsOn(New Integer() {0, 1, 1, 1, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 1, 1, 1, 0}) Case Is = "J" Return BitsOn(New Integer() {0, 0, 1, 1, 1, _ 0, 0, 0, 1, 0, _ 0, 0, 0, 1, 0, _ 0, 0, 0, 1, 0, _ 0, 0, 0, 1, 0, _ 1, 0, 0, 1, 0, _ 0, 1, 1, 0, 0}) Case Is = "K" Return BitsOn(New Integer() {1, 0, 0, 0, 1, _ 1, 0, 0, 1, 0, _ 1, 0, 1, 0, 0, _ 1, 1, 0, 0, 0, _ 1, 0, 1, 0, 0, _ 1, 0, 0, 1, 0, _ 1, 0, 0, 0, 1}) Case Is = "L" Return BitsOn(New Integer() {1, 0, 0, 0, 0, _ 1, 0, 0, 0, 0, _ 1, 0, 0, 0, 0, _ 1, 0, 0, 0, 0, _ 1, 0, 0, 0, 0, _ 1, 0, 0, 0, 0, _ 1, 1, 1, 1, 1}) Case Is = "M" Return BitsOn(New Integer() {1, 0, 0, 0, 1, _ 1, 1, 0, 1, 1, _ 1, 0, 1, 0, 1, _ 1, 0, 1, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1}) Case Is = "N" Return BitsOn(New Integer() {1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 1, 0, 0, 1, _ 1, 0, 1, 0, 1, _ 1, 0, 0, 1, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1}) Case Is = "O" Return BitsOn(New Integer() {0, 1, 1, 1, 0, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 0, 1, 1, 1, 0}) Case Is = "P" Return BitsOn(New Integer() {1, 1, 1, 1, 0, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 1, 1, 1, 0, _ 1, 0, 0, 0, 0, _ 1, 0, 0, 0, 0, _ 1, 0, 0, 0, 0}) Case Is = "Q" Return BitsOn(New Integer() {0, 1, 1, 1, 0, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 1, 0, 1, _ 1, 0, 0, 1, 0, _ 0, 1, 1, 0, 1}) Case Is = "R" Return BitsOn(New Integer() {1, 1, 1, 1, 0, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 1, 1, 1, 0, _ 1, 0, 1, 0, 0, _ 1, 0, 0, 1, 0, _ 1, 0, 0, 0, 1}) Case Is = "S" Return BitsOn(New Integer() {0, 1, 1, 1, 1, _ 1, 0, 0, 0, 0, _ 1, 0, 0, 0, 0, _ 0, 1, 1, 1, 0, _ 0, 0, 0, 0, 1, _ 0, 0, 0, 0, 1, _ 1, 1, 1, 1, 0}) Case Is = "T" Return BitsOn(New Integer() {1, 1, 1, 1, 1, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0}) Case Is = "U" Return BitsOn(New Integer() {1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 0, 1, 1, 1, 0}) Case Is = "V" Return BitsOn(New Integer() {1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 0, 1, 0, 1, 0, _ 0, 0, 1, 0, 0}) Case Is = "W" Return BitsOn(New Integer() {1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 1, 0, 1, _ 1, 0, 1, 0, 1, _ 1, 0, 1, 0, 1, _ 0, 1, 0, 1, 0}) Case Is = "X" Return BitsOn(New Integer() {1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 0, 1, 0, 1, 0, _ 0, 0, 1, 0, 0, _ 0, 1, 0, 1, 0, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1}) Case Is = "Y" Return BitsOn(New Integer() {1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 0, 1, 1, 1, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0}) Case Is = "Z" Return BitsOn(New Integer() {1, 1, 1, 1, 1, _ 0, 0, 0, 0, 1, _ 0, 0, 0, 1, 0, _ 0, 0, 1, 0, 0, _ 0, 1, 0, 0, 0, _ 1, 0, 0, 0, 0, _ 1, 1, 1, 1, 1}) 'Numbers Case Is = "0" Return BitsOn(New Integer() {0, 1, 1, 1, 0, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 1, 1, _ 1, 0, 1, 0, 1, _ 1, 1, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 0, 1, 1, 1, 0}) Case Is = "1" Return BitsOn(New Integer() {0, 0, 1, 0, 0, _ 0, 1, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 1, 1, 1, 0}) Case Is = "2" Return BitsOn(New Integer() {0, 1, 1, 1, 0, _ 1, 0, 0, 0, 1, _ 0, 0, 0, 0, 1, _ 0, 0, 0, 1, 0, _ 0, 0, 1, 0, 0, _ 0, 1, 0, 0, 0, _ 1, 1, 1, 1, 1}) Case Is = "3" Return BitsOn(New Integer() {1, 1, 1, 1, 1, _ 0, 0, 0, 1, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 0, 1, 0, _ 0, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 0, 1, 1, 1, 0}) Case Is = "4" Return BitsOn(New Integer() {0, 0, 0, 1, 0, _ 0, 0, 1, 1, 0, _ 0, 1, 0, 1, 0, _ 1, 1, 1, 1, 1, _ 0, 0, 0, 1, 0, _ 0, 0, 0, 1, 0, _ 0, 0, 0, 1, 0}) Case Is = "5" Return BitsOn(New Integer() {1, 1, 1, 1, 1, _ 1, 0, 0, 0, 0, _ 1, 1, 1, 1, 1, _ 0, 0, 0, 0, 1, _ 0, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 0, 1, 1, 1, 0}) Case Is = "6" Return BitsOn(New Integer() {0, 0, 1, 1, 0, _ 0, 1, 0, 0, 0, _ 1, 0, 0, 0, 0, _ 1, 1, 1, 1, 0, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 0, 1, 1, 1, 0}) Case Is = "7" Return BitsOn(New Integer() {1, 1, 1, 1, 1, _ 0, 0, 0, 0, 1, _ 0, 0, 0, 1, 0, _ 0, 0, 1, 0, 0, _ 0, 1, 0, 0, 0, _ 0, 1, 0, 0, 0, _ 0, 1, 0, 0, 0}) Case Is = "8" Return BitsOn(New Integer() {0, 1, 1, 1, 0, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 0, 1, 1, 1, 0, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 0, 1, 1, 1, 0}) Case Is = "9" Return BitsOn(New Integer() {0, 1, 1, 1, 0, _ 1, 0, 0, 0, 1, _ 1, 0, 0, 0, 1, _ 0, 1, 1, 1, 1, _ 0, 0, 0, 0, 1, _ 0, 0, 0, 1, 0, _ 0, 1, 1, 0, 0}) 'Shift + 1-9 Case Is = "!" Return BitsOn(New Integer() {0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 1, 0, 0}) Case Is = "@" Return BitsOn(New Integer() {0, 1, 1, 1, 0, _ 1, 0, 0, 0, 1, _ 0, 0, 0, 0, 1, _ 0, 1, 1, 0, 1, _ 1, 0, 1, 0, 1, _ 1, 0, 1, 0, 1, _ 0, 1, 1, 1, 0}) Case Is = "#" Return BitsOn(New Integer() {0, 1, 0, 1, 0, _ 0, 1, 0, 1, 0, _ 1, 1, 1, 1, 1, _ 0, 1, 0, 1, 0, _ 1, 1, 1, 1, 1, _ 0, 1, 0, 1, 0, _ 0, 1, 0, 1, 0}) Case Is = "$" Return BitsOn(New Integer() {0, 0, 1, 0, 0, _ 0, 1, 1, 1, 1, _ 1, 0, 1, 0, 0, _ 0, 1, 1, 1, 0, _ 0, 0, 1, 0, 1, _ 1, 1, 1, 1, 0, _ 0, 0, 1, 0, 0}) Case Is = "%" Return BitsOn(New Integer() {1, 1, 0, 0, 0, _ 1, 1, 0, 0, 1, _ 0, 0, 0, 1, 0, _ 0, 0, 1, 0, 0, _ 0, 1, 0, 0, 0, _ 1, 0, 0, 1, 1, _ 0, 0, 0, 1, 1}) Case Is = "^" Return BitsOn(New Integer() {0, 0, 1, 0, 0, _ 0, 1, 0, 1, 0, _ 1, 0, 0, 0, 1, _ 0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0}) Case Is = "&" Return BitsOn(New Integer() {0, 1, 1, 0, 0, _ 1, 0, 0, 1, 0, _ 1, 0, 1, 0, 0, _ 0, 1, 0, 0, 0, _ 1, 0, 1, 0, 1, _ 1, 0, 0, 1, 0, _ 0, 1, 1, 0, 1}) Case Is = "*" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 0, 1, 0, 0, _ 1, 0, 1, 0, 1, _ 0, 1, 1, 1, 0, _ 1, 0, 1, 0, 1, _ 0, 0, 1, 0, 0, _ 0, 0, 0, 0, 0}) Case Is = "(" Return BitsOn(New Integer() {0, 0, 0, 1, 0, _ 0, 0, 1, 0, 0, _ 0, 1, 0, 0, 0, _ 0, 1, 0, 0, 0, _ 0, 1, 0, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 0, 1, 0}) Case Is = ")" Return BitsOn(New Integer() {0, 1, 0, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 0, 1, 0, _ 0, 0, 0, 1, 0, _ 0, 0, 0, 1, 0, _ 0, 0, 1, 0, 0, _ 0, 1, 0, 0, 0}) 'Misc Case Is = " " Return New BitArray(35, False) Case Is = Chr(34) Return BitsOn(New Integer() {0, 1, 0, 1, 0, _ 0, 1, 0, 1, 0, _ 0, 1, 0, 1, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0}) Case Is = "'" Return BitsOn(New Integer() {0, 0, 1, 1, 0, _ 0, 0, 0, 1, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0}) Case Is = "," Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 1, 1, 0, _ 0, 0, 0, 1, 0, _ 0, 0, 1, 0, 0}) Case Is = "-" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 1, 1, 1, 1, 1, _ 0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0}) Case Is = "_" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 1, 1, 1, 1, 1}) Case Is = "." Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 1, 1, 0, 0, _ 0, 1, 1, 0, 0}) Case Is = "/" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 0, 0, 0, 1, _ 0, 0, 0, 1, 0, _ 0, 0, 1, 0, 0, _ 0, 1, 0, 0, 0, _ 1, 0, 0, 0, 0, _ 0, 0, 0, 0, 0}) Case Is = "\" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 1, 0, 0, 0, 0, _ 0, 1, 0, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 0, 1, 0, _ 0, 0, 0, 0, 1, _ 0, 0, 0, 0, 0}) Case Is = "=" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0, _ 1, 1, 1, 1, 1, _ 0, 0, 0, 0, 0, _ 1, 1, 1, 1, 1, _ 0, 0, 0, 0, 0, _ 0, 0, 0, 0, 0}) Case Is = "+" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 1, 1, 1, 1, 1, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 0, 0, 0}) Case Is = ":" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 1, 1, 0, 0, _ 0, 1, 1, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 1, 1, 0, 0, _ 0, 1, 1, 0, 0, _ 0, 0, 0, 0, 0}) Case Is = ";" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 1, 1, 0, 0, _ 0, 1, 1, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 1, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 1, 0, 0, 0}) Case Is = "<" Return BitsOn(New Integer() {0, 0, 0, 1, 0, _ 0, 0, 1, 0, 0, _ 0, 1, 0, 0, 0, _ 1, 0, 0, 0, 0, _ 0, 1, 0, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 0, 1, 0}) Case Is = ">" Return BitsOn(New Integer() {0, 1, 0, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 0, 1, 0, _ 0, 0, 0, 0, 1, _ 0, 0, 0, 1, 0, _ 0, 0, 1, 0, 0, _ 0, 1, 0, 0, 0}) Case Is = "?" Return BitsOn(New Integer() {0, 1, 1, 1, 0, _ 1, 0, 0, 0, 1, _ 0, 0, 0, 0, 1, _ 0, 0, 0, 1, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 0, 0, 0, _ 0, 0, 1, 0, 0}) Case Is = "[" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 1, 1, 1, 0, _ 0, 1, 0, 0, 0, _ 0, 1, 0, 0, 0, _ 0, 1, 0, 0, 0, _ 0, 1, 0, 0, 0, _ 0, 1, 1, 1, 0}) Case Is = "]" Return BitsOn(New Integer() {0, 0, 0, 0, 0, _ 0, 1, 1, 1, 0, _ 0, 0, 0, 1, 0, _ 0, 0, 0, 1, 0, _ 0, 0, 0, 1, 0, _ 0, 0, 0, 1, 0, _ 0, 1, 1, 1, 0}) Case Is = "{" Return BitsOn(New Integer() {0, 0, 0, 1, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 1, 0, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 0, 1, 0}) Case Is = "}" Return BitsOn(New Integer() {0, 1, 0, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 0, 1, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 1, 0, 0, 0}) Case Is = "|" Return BitsOn(New Integer() {0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0, _ 0, 0, 1, 0, 0}) Case Else Return New BitArray(48, False) End Select End Function 'just a helper method, turns the corresponding bits on or in the 1 state Private Function BitsOn(ByVal values() As Integer) As BitArray Dim bits As New BitArray(values.Length, False) For i As Integer = 0 To bits.Length - 1 If values(i) = 1 Then bits(i) = True End If Dim charspace As Double = " " If values.Length > 5 Then _maps(j) = BuildCharacterMap(values(i) + charspace) End If Next Return bits End Function End Class