Source

vinstall-gambas / src / scroller / FMain.class

' Gambas class file

'    vinstall-ng is free software: you can redistribute it and/or modify
'    it under the terms of the GNU General Public License as published by
'    the Free Software Foundation, either version 2 of the License, or
'    (at your option) any later version.

'    vinstall-ng  is distributed in the hope that it will be useful,
'    but WITHOUT ANY WARRANTY; without even the implied warranty of
'    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'    GNU General Public License for more details.

'    You should have received a copy of the GNU General Public License
'    along with vinstall-ng.  If not, see <http://www.gnu.org/licenses/>.



PUBLIC SUB _new()

END

PUBLIC SUB Form_Open()


prepare_array()
Timer1.Enabled = TRUE

END
PUBLIC SUB prepare_array()
  
  DIM sFile AS String
  DIM sList AS String[]
  DIM i AS Integer
  DIM tl AS TextLabel
  DIM sText, strline AS String
  
  sList = Split(Trim(File.Load("/mnt/source/CREDIT")), gb.NewLine)
  IF sList.Find("*newtor*") = -1 THEN sList.Push("Newtor")
  IF sList.Find("*stretchedthin*") = -1 THEN sList.Push("Stretchedthin")
  

tl = NEW TextLabel(scrollview1) ' blank text label
tl.Height = scrollview1.Height
tl.Expand = TRUE

  FOR i = 0 TO sList.Max
  'FOR EACH strline IN sList
  tl = NEW TextLabel(scrollview1)
  tl.Expand = TRUE
  tl.Height = 28
  tl.Alignment = Align.Center
    sText = Replace(sList[i], "(", "[ ")
    sText = Replace(sText, ")", " ]")
      IF InStr(sText, "M0E-lnx") THEN 
        tl.Height = 28 * 2
        tl.Text = "<b>" & Left(sText, InStr(sText, "[") - 1) & "</b><br>" & "[ Gui Installer, vpackager, vasmCC ]"
      ELSE IF InStr(sText, "Uelsk8s") THEN 
        tl.Height = 28 * 2
        tl.Text = "<b>" & Left(sText, InStr(sText, "[") - 1) & "</b><br>" & "[ ISO Master, Gui Installer ]"
      ELSE IF InStr(sText, "Vector") THEN 
        tl.Height = 28 * 2
        tl.Text = "<b>" & Left(sText, InStr(sText, "[") - 1) & "</b><br>" & Right(sText, Len(sText) - InStr(sText, "[") + 1)
      ELSE IF InStr(sText, "[") THEN 
      tl.Height = 28 * 2
        tl.Text = Left(sText, InStr(sText, "[") - 1) & "<br>" & Right(sText, Len(sText) - InStr(sText, "[") + 1)
      ELSE 
        tl.Text = sText
      END IF
          
  
  NEXT 
  
  tl = NEW TextLabel(scrollview1) ' blank text label
tl.Height = scrollview1.Height * 0.5
tl.Expand = TRUE
  
END

PUBLIC SUB Timer1_Timer()

  INC scrollview1.ScrollY
  IF scrollview1.ScrollY = ScrollView1.Scrollh - scrollview1.h THEN 
    Timer1.Enabled = FALSE
    REPEAT 
    scrollview1.Visible = FALSE
      DEC ScrollView1.ScrollY
    UNTIL scrollview1.ScrollY = 0
    scrollview1.Visible = TRUE
  END IF
  Timer1.Enabled = TRUE

END
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.