📄 fabout.class
字号:
' Gambas class fileSTATIC PRIVATE $aSupport AS String[]STATIC PRIVATE $iWait AS IntegerSTATIC PRIVATE $iSupport AS IntegerSTATIC PUBLIC SUB Run() hForm AS FAbout hForm = NEW FAbout hForm.ShowModalENDPUBLIC SUB Form_Open() DIM sText AS String txtAuthor.BackColor = svwAuthor.BackColor GetVersion GetAuthor GetSupport txtGift.X = 0' panGift.ClientW' sText = Trim(File.Load("support.txt"))' txtGift.Text = "<b>" & ("Thanks to") & "</b>..." & Replace("\n" & sText, "\n", String$(8, " "))' txtGift.W = txtGift.Font.Width(Replace(sText, "\n", " ")) + 128ENDPRIVATE SUB GetVersion() lblVersion.Text = Subst(("version &1"), Project.Version)ENDPUBLIC SUB btnClose_Click() ME.CloseENDPUBLIC SUB timAuthor_Timer() DIM Y AS Integer Y = svwAuthor.ScrollY INC svwAuthor.ScrollY IF Y = svwAuthor.ScrollY THEN svwAuthor.ScrollY = 0 ENDIF WITH txtGift IF $iWait > 0 THEN DEC $iWait ELSE IF .X > 0 THEN .X = Max(0, .X - 8) IF .X = 0 THEN $iWait = 50 ELSE .X = panGift.Width txtGift.Text = $aSupport[$iSupport] INC $iSupport IF $iSupport >= $aSupport.Count THEN $iSupport = 0 ENDIF END WITHENDPRIVATE SUB GetAuthor() DIM hFic AS File DIM sText AS String DIM sLig AS String DIM nLig AS Integer OPEN "about.txt" FOR READ AS #hFic WHILE NOT Eof(hFic) LINE INPUT #hFic, sLig IF NOT sLig THEN CONTINUE sText = sText & "<p><font size=+1><b>" & sLig & "</b></font></p><blockquote>\n" nLig = nLig + 2 LINE INPUT #hFic, sLig ' e-mail sText = sText & "<u>" & sLig & "</u><br>" INC nLig DO LINE INPUT #hFic, sLig IF NOT sLig THEN BREAK sText = sText & sLig & "<br>" INC nLig LOOP 'IF Right$(sText, 4) = "<br>" THEN sText = Left$(sText, -4) sText = sText & "</blockquote>\n" INC nLig WEND CLOSE #hFic txtAuthor.Text = sText 'nLig * txtAuthor.Font.Height("a") * 0.95 + 256FINALLY txtAuthor.Height = txtAuthor.TextHeight '+ 256 'PRINT txtAuthor.TextHeightCATCH txtAuthor.Text = Error.TextENDPRIVATE SUB GetSupport() DIM iInd AS Integer $aSupport = Split(Trim(File.Load("support.txt")), "\n") FOR iInd = 0 TO $aSupport.Count - 1 $aSupport[iInd] = "<b>" & $aSupport[iInd] & "...</b>" NEXT $aSupport.Add("<b>" & ("Thanks to") & "...</b>", 0)ENDPUBLIC SUB Form_Show() txtAuthor.Height = txtAuthor.TextHeight + 256ENDPUBLIC SUB btnGift_Click() Project.OpenWebPage("https://www.paypal.com/xclick/business=gambas%40users.sourceforge.net&no_note=1&tax=0¤cy_code=EUR")END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -