Oct 18, 2014 Replies: 8 This is an unfinished library. It will include more as time goes on, but I wanted to release the first version now because of the needs of Merlin2049. This is version 1.0 and only includes a countdown timer. A demo project is inside the zip file. Extract the files and copy the MLTime.jar and MLTime.xml to your additional libraries directory. MLTime Author: Jem Miller - Missing Link Software Version: 1 MLCountDownTimer Events: onFinish ( As ) onTick (Remaining as Long As ) Fields: isPaused As Boolean Methods: IsInitialized As Boolean Pause Pauses the countdown timer Resume Resumes the countdown timer from where it left off Start (Millisec As Long, Interval As Long, EventName As String) Starts a countdown timer MiliSec - Total time for the countdown in milliseconds Interval - Amount of time between updates in milliseconds EventName - The name of the event to use (Time_onTick for example) Example using mltime as the Dim'ed class name mltime.Start(60000,1000) will start a countdown timer for 60 seconds and will fire the onTick event every 1 second This method triggers 2 events that you can use. Assuming you initialize the class with the event name of Time, they would look like this : Time_onTick(Remaining as Long) Remaining is the countdown time remaining until done in milliseconds Time_onFinish This event fires when the countdown is finished Stop Stops the countdown timer Version 1.0 - First release . Attachments mltime-1.00.zip mltime-1.00.zip 10.7 KB · Views: 579 Last edited: Oct 19, 2014 Click to expand...
This is an unfinished library. It will include more as time goes on, but I wanted to release the first version now because of the needs of Merlin2049. This is version 1.0 and only includes a countdown timer. A demo project is inside the zip file. Extract the files and copy the MLTime.jar and MLTime.xml to your additional libraries directory. MLTime Author: Jem Miller - Missing Link Software Version: 1 MLCountDownTimer Events: onFinish ( As ) onTick (Remaining as Long As ) Fields: isPaused As Boolean Methods: IsInitialized As Boolean Pause Pauses the countdown timer Resume Resumes the countdown timer from where it left off Start (Millisec As Long, Interval As Long, EventName As String) Starts a countdown timer MiliSec - Total time for the countdown in milliseconds Interval - Amount of time between updates in milliseconds EventName - The name of the event to use (Time_onTick for example) Example using mltime as the Dim'ed class name mltime.Start(60000,1000) will start a countdown timer for 60 seconds and will fire the onTick event every 1 second This method triggers 2 events that you can use. Assuming you initialize the class with the event name of Time, they would look like this : Time_onTick(Remaining as Long) Remaining is the countdown time remaining until done in milliseconds Time_onFinish This event fires when the countdown is finished Stop Stops the countdown timer Version 1.0 - First release .
merlin2049er Well-Known Member Licensed User Longtime User Oct 19, 2014 #2 You've bundled the wrong test app (MLStrings). Is there a method to initializing the timer.
sanjibnanda Active Member Licensed User Longtime User Oct 19, 2014 #3 merlin2049er said: You've bundled the wrong test app (MLStrings). Is there a method to initializing the timer. Click to expand... very true, the app is about MLStr - perhaps, some one new , but still a welcome!
merlin2049er said: You've bundled the wrong test app (MLStrings). Is there a method to initializing the timer. Click to expand... very true, the app is about MLStr - perhaps, some one new , but still a welcome!
HotShoe Well-Known Member Licensed User Longtime User Oct 19, 2014 #4 Oh good grief... I have uploaded the new package. Nothing has changed but the test project. Thanks guys, --- Jem
Oh good grief... I have uploaded the new package. Nothing has changed but the test project. Thanks guys, --- Jem
HotShoe Well-Known Member Licensed User Longtime User Oct 19, 2014 #5 merlin2049er said: You've bundled the wrong test app (MLStrings). Is there a method to initializing the timer. Click to expand... The Start method initializes everything with the values you pass. --- Jem
merlin2049er said: You've bundled the wrong test app (MLStrings). Is there a method to initializing the timer. Click to expand... The Start method initializes everything with the values you pass. --- Jem
merlin2049er Well-Known Member Licensed User Longtime User Oct 21, 2014 #6 Thanks! This helps a lot. I guess you can pass the time format? "mm:ss.ms" ?
slugger Member Licensed User Longtime User Nov 10, 2014 #7 Hello, thanks for this library. I am trying it right now but it seems to me no matter what Eventname I pass in the Start method the library always expect it to be "cd". If I try to use another one the Tick event never occur. Something like this: Code: Copy Dim cdRipp22 As MLCountDownTimer cdRipp22.Start(120000,100,"cdRipp22") Sub cdRipp22_onTick(Remaining As Long) Log("="&Remaining) End Sub If I change "cdRipp22" into "cd" as in your example everything works ok.
Hello, thanks for this library. I am trying it right now but it seems to me no matter what Eventname I pass in the Start method the library always expect it to be "cd". If I try to use another one the Tick event never occur. Something like this: Code: Copy Dim cdRipp22 As MLCountDownTimer cdRipp22.Start(120000,100,"cdRipp22") Sub cdRipp22_onTick(Remaining As Long) Log("="&Remaining) End Sub If I change "cdRipp22" into "cd" as in your example everything works ok.
slugger Member Licensed User Longtime User Nov 10, 2014 #8 Another thing. The on_finish event, which should occur when the countdown is finished, is also called when the Pause method is invoked.
Another thing. The on_finish event, which should occur when the countdown is finished, is also called when the Pause method is invoked.
HotShoe Well-Known Member Licensed User Longtime User Nov 10, 2014 #9 slugger said: Another thing. The on_finish event, which should occur when the countdown is finished, is also called when the Pause method is invoked. Click to expand... Thanks, I'll look at both of these tonight. --- Jem
slugger said: Another thing. The on_finish event, which should occur when the countdown is finished, is also called when the Pause method is invoked. Click to expand... Thanks, I'll look at both of these tonight. --- Jem