Platforms to show: All Mac Windows Linux Cross-Platform
/MacClassic/WakeNotifier with Timer
Required plugins for this example: MBS MacClassic Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacClassic/WakeNotifier with Timer
This example is the version from Sun, 17th Mar 2012.
Project "WakeNotifier with Timer.xojo_binary_project"
Class Window1 Inherits Window
Control Timer1 Inherits Timer
ControlInstance Timer1 Inherits Timer
EventHandler Sub Action()
update
End EventHandler
End Control
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control hadsleeped Inherits xStaticText
ControlInstance hadsleeped Inherits xStaticText
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 wakecount Inherits xStaticText
ControlInstance wakecount Inherits xStaticText
End Control
Control sleepcount Inherits xStaticText
ControlInstance sleepcount Inherits xStaticText
End Control
Control lastsleeptime Inherits xStaticText
ControlInstance lastsleeptime Inherits xStaticText
End Control
Control lastwaketime Inherits xStaticText
ControlInstance lastwaketime Inherits xStaticText
End Control
Control sleepeventcount Inherits xStaticText
ControlInstance sleepeventcount Inherits xStaticText
End Control
Control StaticText7 Inherits Label
ControlInstance StaticText7 Inherits Label
End Control
Control valid Inherits xStaticText
ControlInstance valid Inherits xStaticText
End Control
EventHandler Sub Open()
wn = new WakeNotifierMBS
update
End EventHandler
Sub update()
valid.set wn.valid
hadsleeped.set wn.HadSleeped
wakecount.set wn.wakeCount
sleepcount.set wn.sleepcount
lastsleeptime.set wn.lastsleepTime
lastwaketime.set wn.lastwakeTime
sleepeventcount.set wn.SleepEventCount
End Sub
Property wn As WakeNotifierMBS
End Class
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class xStaticText Inherits Label
Sub set(v as variant)
dim s as string
s=v
if s<>text then
text=s
end if
End Sub
End Class
Class App Inherits Application
End Class
End Project
See also:
The items on this page are in the following plugins: MBS MacClassic Plugin.