Tja, da scheint es noch mehr Probleme unter Mono zu geben ![]()
Unter Windows ist ein VAL("&h80")=128, das geht wohl unter Mono nicht. Müsste ich also die Hex-Umwandlung anders angehen... (Kleine Randnotiz: ich mochte die &h80-Notation eh noch nie, die 0x080 aber auch nicht, die einzig wahre Form ist doch ein $80!)
Insgesamt ist das aber wohl ein größerer Angang, dem ich mich dann wohl mit mehr Aufmerksamkeit widmen müsste.
Als Testmöglichkeit, ob es denn wenigstens danach klappt, müsste man in der Tokenlist alle $xx durch ihre Dezimal-Pendants ersetzen. Aber der Fehler bei ASC() macht mir noch große Sorgen...
Für abraXxl hier der Source für die ShowOneLine-Routine, an der Stelle mit dem "cNr = Asc(Zeile.Substring(x, 1))" scheint's ihn unter Mono ja zu zerbröseln
:
Private Sub ShowOneLine(ByVal myGraphic As System.Drawing.Graphics, ByVal Zeile As String, ByVal y As Integer, ByVal ShowSpace As Boolean)
Dim lInQuote As Boolean
Dim lRem As Boolean
Dim lData As Boolean
Dim fNrX As Integer
Dim Keyword As String
Dim lLineNo As Boolean
Dim x As Integer
Dim cNr As Integer
Dim fNr As Integer
Dim fNr2 As Integer
Dim lCur As Boolean
Dim Token As Integer
Dim p1 As Integer
Dim p2 As Integer
Dim sProof As String
If EditInfo.FontSize = 8 Then
fNr = 1
Else
fNr = 0
End If
lInQuote = False
lRem = False
lData = False
fNrX = -1
sProof = ""
If EditInfo.IsLabel Then
If Zeile.Trim().Length() > 0 Then
lLineNo = Zeile.Trim().Substring(Zeile.Trim().Length() - 1, 1) = ":"
Else
lLineNo = False
End If
Else
lLineNo = True
If ProofEnabled Then
sProof = EditCalcProof(Zeile, ProofFunction)
End If
End If
fNr2 = 0
lCur = False
For x = EditInfo.OffX To Zeile.Length() - 1
If (x - EditInfo.OffX) < EditInfo.MaxX Then
cNr = Asc(Zeile.Substring(x, 1))
cNr = AsciiToCBM(cNr)
If EditInfo.Inv Then
If x = EditInfo.X + EditInfo.OffX And y = EditInfo.Y + EditInfo.OffY Then
If EditInfo.Insert Then
lCur = True
Else
If cNr > 127 Then
cNr = cNr - 128
Else
cNr = cNr + 128
End If
End If
End If
End If
If EditIsInBlock(x, y) Then
fNr2 = 5
Else
If x <= fNrX Then
fNr2 = 1
Else
fNrX = -1
If lRem Then
fNr2 = 4
Else
If lInQuote Or ((cNr And 127) = 34) Then
fNr2 = 2
Else
' (normal, keyword, string, number, comment, blockmode)
If lData Then
Keyword = ""
If (cNr And 127) = 58 Then
lData = False
End If
Else
Keyword = GetToken(Zeile.Substring(x))
Token = CheckToken(Keyword)
End If
If Keyword = "rem" Then
lRem = True
lLineNo = False
ElseIf Keyword = "data" Then
lLineNo = False
lData = True
ElseIf Keyword <> "" Then
If GetLineType(Token) <> 0 Then
lLineNo = True
p1 = Zeile.Substring(x).IndexOf("=")
If p1 > -1 Then
p2 = Zeile.Substring(x).IndexOf(":")
If p2 = -1 Then
p2 = Zeile.Substring(x).Length()
End If
If p1 < p2 Then
lLineNo = False
End If
End If
Else
lLineNo = False
End If
Else
' If cNr = Asc("'") And EditInfo.IsLabel Then
If cNr = Asc("'") Then
lRem = True
lLineNo = False
End If
End If
If Keyword <> "" Then
fNrX = x + Keyword.Length() - 1
fNr2 = 1
Else
If EditInfo.IsLabel Then
If lLineNo Then
If cNr = Asc(":") Then
lLineNo = False
fNr2 = 0
Else
fNr2 = 3
End If
Else
fNr2 = 0
End If
Else
If (cNr >= 48 And cNr < 58) And lLineNo Then
fNr2 = 3
Else
If lLineNo And (cNr And 127) <> 44 And (cNr And 127) <> 32 Then
lLineNo = False
End If
fNr2 = 0
End If
End If
End If
End If
If (cNr And 127) = 34 Then
lInQuote = Not lInQuote
End If
End If
End If
End If
If (cNr <> 32) Or ShowSpace Then
myGraphic.DrawImageUnscaled(imgChars(cNr, EditInfo.FontNr, fNr, fNr2), (x - EditInfo.OffX) * EditInfo.FontSize, (y - EditInfo.OffY) * EditInfo.FontSize + MinY)
End If
If lCur Then
If cNr > 127 Then
myGraphic.DrawRectangle(Pens.White, (x - EditInfo.OffX) * EditInfo.FontSize, (y - EditInfo.OffY) * EditInfo.FontSize + MinY, 1, EditInfo.FontSize - 1)
Else
myGraphic.DrawRectangle(Pens.Black, (x - EditInfo.OffX) * EditInfo.FontSize, (y - EditInfo.OffY) * EditInfo.FontSize + MinY, 1, EditInfo.FontSize - 1)
End If
lCur = False
End If
End If
Next
If sProof <> "" Then
fNr2 = 3
For x = 0 To sProof.Length() - 1
cNr = Asc(sProof.Substring(x, 1))
cNr = cNr + 128
myGraphic.DrawImageUnscaled(imgChars(cNr, EditInfo.FontNr, fNr, fNr2), (EditInfo.MaxX + x) * EditInfo.FontSize, (y - EditInfo.OffY) * EditInfo.FontSize + MinY)
Next
End If
End Sub
Alles anzeigen