Exam Alarm Clock in C sharp

Posted by Nuwan under C# on 8/29/2016 | Points: 10 | Views : 148 | Status : [Member] | Replies : 1
I want to create exam alarm clock. in this case have 10 questions and 30 minits. every question has 3 min. so i want to create if start the exam every 3min want to ring the bell. in 30 min want to ring the bell every 3min. so please help me solve that matter.

Thank You.



Posted by: Jopito on: 8/30/2016 [Member] Starter | Points: 25

Here is what i would do.On button click start,i would have a variable which will pick the completion date from datetime.now plus 30 minutes to be able to track the actual end time.On every question step,i would compare the current time against the variable which holds the actual user cut off time to finish the exam.Remember you can store this variable in session if you dont want to make database calls.

So on every next click of question,check against the session variable and do the subtraction to see the time differrence.If difference is less than 3 minutes,you can call a function which plays a certain sound from your application to alert user time is almost over

Mark as answer if satisfied

Nuwan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response