⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fpropertyfile.class

📁 Gambas is a graphical development environment based on a Basic interpreter, like Visual Basic. It us
💻 CLASS
字号:
' Gambas class fileSTATIC PRIVATE $sPath AS StringPRIVATE $bCheck AS BooleanSTATIC PUBLIC SUB Run(sPath AS String)  DIM hForm AS Form  $sPath = sPath  FPropertyFile.ShowModalENDPUBLIC SUB _new()  DIM sImg AS String  DIM sExt AS String  DIM hPict AS Picture  DIM sType AS String  'DIM bStartup AS Boolean  DIM sTemp AS String  DIM iSize AS Integer  DIM sPath AS String  INC Application.Busy  lblName.Text = File.Name($sPath)  lblPath.Text = Mid$(File.Dir($sPath), Len(Project.Dir) + 1)  ME.Title = lblName.Text & " - " & ("Properties")  WITH Stat($sPath)  IF .Type = gb.Directory THEN    hPict = Picture["img/32/folder.png"]    sType = ("Directory")    sTemp = Temp$    SHELL "(cd " & Project.Quote($sPath) & "; du -b | tail -n1 > " & sTemp & ")" WAIT    iSize = Val(File.Load(sTemp))  ELSE    sExt = LCase(File.Ext($sPath))    SELECT CASE sExt      CASE "module"        sType = ("Module")      CASE "class"        sType = ("Class")      CASE "form"        sType = ("Form")      CASE "png","jpg","gif","jpeg","svg"        sType = ("Picture")        sExt = "image"      CASE ELSE        sType = ("Text")        sExt = "text"    END SELECT    TRY hPict = Picture["img/32" &/ sExt & ".png"]    iSize = .Size  ENDIF  lblSize.Text = Subst(("&1 K"), CInt((iSize + 1023) \ 1024))  lblType.Text = sType  imgFile.Picture = hPict  lblDate.Text = Str(.Time)  txtInfo.Background = txtInfo.Parent.Background  GetInfo  END WITHFINALLY  DEC Application.BusyCATCH  Message.Error(Error.Text)ENDPUBLIC SUB btnCancel_Click()  ME.CloseENDPUBLIC SUB btnOK_Click()  ME.Close(TRUE)ENDPRIVATE SUB GetInfo()  DIM sTemp AS String  DIM sInfo AS String  SELECT CASE LCase(File.Ext($sPath))    CASE "form"      txtInfo.Text = ("Gambas form")    CASE "class"      txtInfo.Text = ("Gambas class")    CASE "module"      txtInfo.Text = ("Gambas module")    CASE ELSE      sTemp = Temp$      SHELL "file -b " & Project.Quote($sPath) & " > " & Project.Quote(sTemp) WAIT      IF Exist(sTemp) THEN        txtInfo.Text = File.Load(sTemp)      ENDIF      KILL sTemp  END SELECTEND

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -