git-svn-id: svn://localhost/gambas/trunk@5289 867c0c6c-44f3-4631-809d-bfa615b0a4ec

This commit is contained in:
Fabien Bodard 2012-11-02 15:29:22 +00:00
parent 68997e7d58
commit 5da0e292df
2 changed files with 2 additions and 47 deletions

View file

@ -1,43 +1,2 @@
' Gambas class file
Public Sub Form_Open()
Dim s As String
'Dim hDesktop As New DesktopFile
Dim sPath As String = User.home &/ "Documents/SCEA"
Dim hFilemime As DesktopMime
Dim sKey As String
'ColumnView1.Columns.Count = 2
For Each s In Dir(sPath, "*", gb.File)
sKey = sPath &/ s
If s Begins "." Then Continue
ColumnView1.Add(sKey, s)
hFilemime = DesktopMime.fromfile(sPath &/ s)
'ColumnView1[sKey][1] = hFilemime.Type
Try ColumnView1[sKey].Picture = hFilemime.GetIcon(48).Picture
Next
' For Each hFilemime In DesktopMime
' Print hFilemime.Type
' Next
End
Public Sub ColumnView1_Activate()
Try DesktopFile.FindMime(ColumnView1[ColumnView1.Current.Key][1])[0].run(ColumnView1.Current.Key)
End
Public Sub ColumnView1_Click()
Dim hFile As DesktopFile
If Mouse.Right Then
For Each hFile In DesktopMime.FromFile(ColumnView1.Key).GetApplications()
Print hFile.Exec
Next
Endif
End

View file

@ -1,9 +1,5 @@
# Gambas Form File 3.0
{ Form Form
MoveScaled(0,0,100,65)
Arrangement = Arrange.Fill
{ ColumnView1 IconView
MoveScaled(3,1,96,65)
}
{ Form11 Form
MoveScaled(0,0,64,64)
}