Platforms to show: All Mac Windows Linux Cross-Platform

/Util/FileDate Properties


Required plugins for this example: MBS Util Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Util/FileDate Properties

This example is the version from Sun, 17th Mar 2012.

Project "FileDate Properties.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control StaticText2 Inherits Label
ControlInstance StaticText2 Inherits Label
End Control
Control StaticText3 Inherits Label
ControlInstance StaticText3 Inherits Label
End Control
Control StaticText4 Inherits Label
ControlInstance StaticText4 Inherits Label
End Control
Control StaticText5 Inherits Label
ControlInstance StaticText5 Inherits Label
End Control
Control StaticText6 Inherits Label
ControlInstance StaticText6 Inherits Label
End Control
Control StaticText7 Inherits Label
ControlInstance StaticText7 Inherits Label
End Control
Control StaticText8 Inherits Label
ControlInstance StaticText8 Inherits Label
End Control
Control tModificationDateMBS Inherits Label
ControlInstance tModificationDateMBS Inherits Label
End Control
Control tCreationDateMBS Inherits Label
ControlInstance tCreationDateMBS Inherits Label
End Control
Control tBackupDateMBS Inherits Label
ControlInstance tBackupDateMBS Inherits Label
End Control
Control tAttributeModificationDateMBS Inherits Label
ControlInstance tAttributeModificationDateMBS Inherits Label
End Control
Control tAccessDateMBS Inherits Label
ControlInstance tAccessDateMBS Inherits Label
End Control
Control tModificationDate Inherits Label
ControlInstance tModificationDate Inherits Label
End Control
Control tCreationDate Inherits Label
ControlInstance tCreationDate Inherits Label
End Control
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action() last.ModificationDateMBS = new date run last End EventHandler
End Control
Control PushButton2 Inherits PushButton
ControlInstance PushButton2 Inherits PushButton
EventHandler Sub Action() last.CreationDateMBS = new date run last End EventHandler
End Control
Control PushButton3 Inherits PushButton
ControlInstance PushButton3 Inherits PushButton
EventHandler Sub Action() last.BackupDateMBS = new date run last End EventHandler
End Control
Control PushButton4 Inherits PushButton
ControlInstance PushButton4 Inherits PushButton
EventHandler Sub Action() last.AttributeModificationDateMBS = new date run last End EventHandler
End Control
Control PushButton5 Inherits PushButton
ControlInstance PushButton5 Inherits PushButton
EventHandler Sub Action() last.AccessDateMBS = new date run last End EventHandler
End Control
Control PushButton6 Inherits PushButton
ControlInstance PushButton6 Inherits PushButton
EventHandler Sub Action() last.ModificationDate = new date run last End EventHandler
End Control
Control PushButton7 Inherits PushButton
ControlInstance PushButton7 Inherits PushButton
EventHandler Sub Action() last.CreationDate = new date run last End EventHandler
End Control
EventHandler Sub DropObject(obj As DragItem, action As Integer) do if obj.FolderItemAvailable then run obj.FolderItem end if loop until not obj.NextItem End EventHandler
EventHandler Sub Open() me.AcceptFileDrop FileTypes1.any me.AcceptFileDrop FileTypes1.SpecialFolder me.AcceptFileDrop FileTypes1.SpecialDisk End EventHandler
Function formatDate(d as date) As string if d = nil then Return "Nil" else Return d.AbbreviatedDate+" "+d.LongTime end if End Function
Sub run(f as FolderItem) tCreationDate.text = formatDate(f.CreationDate) tCreationDateMBS.text = formatDate(f.CreationDateMBS) tModificationDate.text = formatDate(f.ModificationDate) tModificationDateMBS.text = formatDate(f.ModificationDateMBS) tBackupDateMBS.text = formatDate(f.BackupDateMBS) tAttributeModificationDateMBS.text = formatDate(f.AttributeModificationDateMBS) tAccessDateMBS.text = formatDate(f.AccessDateMBS) last=f PushButton1.Enabled=true PushButton2.Enabled=true PushButton3.Enabled=true PushButton4.Enabled=true PushButton5.Enabled=true PushButton6.Enabled=true PushButton7.Enabled=true End Sub
Property last As FolderItem
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
FileTypes1
Filetype special/any
Filetype special/folder
Filetype special/disk
End FileTypes1
End Project

The items on this page are in the following plugins: MBS Util Plugin.


The biggest plugin in space...