|
Hi developers
I want make a quiz program.
It use image recognition (recon the person from the given image) also.Every questions have a four options as answers.And the entire quiz is controlled with timer.Means it must end within the given time.Am really doubtful in so many factors.I searched many in CodeProject,but couldn't find an appropriate application to study.If you have any idea please help me.
I need help to build it in c#.net
varun
|
|
|
|
|
Hi,
the trickiest part will be the face detection. Here are two articles that describe some basics:
Face Detection in C#[^]
Face and Eyes Detection Using OpenCV[^]
You would need to capture an image with a webcam and try to recognize a face that is stored somewhere (image file or just in database). The whole quiz-timer thing should be quite simple. Try to break down your problem in simple tasks and solve them step for step.
|
|
|
|
|
Thanks first
Your help is so much valuable for me.but still i am confused in making that to work with in the given time.Can you point me to any c# source codes available
|
|
|
|
|
There is no ready to use source code that will do your task. This is why you need to develop it on your own. Try to learn about face recognition and the use of timers to control your quiz flow.
|
|
|
|
|
Thanks again
I will try to do that,and update it here
|
|
|
|
|
In the windows service, here is how I have setup the backgroundworker.
Question.
I do not know why the backgroundworker_progresschanged event does not get called.
Do you see what the problem is please?
Thanks
private BackgroundWorker backgroundWorker;
protected override void OnStart(string[] args)
{
backgroundWorker = new BackgroundWorker();
backgroundWorker.WorkerSupportsCancellation = true;
backgroundWorker.WorkerReportsProgress = true;
backgroundWorker.DoWork += new DoWorkEventHandler(backgroundWorker_DoWork);
backgroundWorker.ProgressChanged += new ProgressChangedEventHandler(backgroundWorker_ProgressChanged);
backgroundWorker.RunWorkerAsync();
}
private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
{
}
private void backgroundWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
}
|
|
|
|
|
|
I don't want to seem as though I'm being funny here, but how would it report progress. You have no functionality in your DoWork to report progress from. In your DoWork, you'd need to report progress using something like the following:
BackgroundWorker worker = sender as BackgroundWorker;
worker.ReportProgress(10);
|
|
|
|
|
Thanks for the reply...
I have read afew articles regarding the backgroundworker.
I am not sure if I am asking the correct question here, but my purpose is to make the backgroundworker to do some checking every few miliseconds.
1-
It seems to me that the checking has to be done in the progresschanged event. Am I correct?
2-
Where do I set the time interval in the backgroundworker?
Thank you
|
|
|
|
|
The purpose of the background worker is to run a task in the background. The purpose of the progress changed event is to indicate that some progress has been made, so you'd typically use this to update the UI to indicate that a task is working successfully. I wouldn't use a background worker for the purpose you want to - you'd be better off using a timer.
|
|
|
|
|
I did think about a timer at first but I do not think it is a good decision because of the following:
1-
There is a separate event which gets fired everytime a new message is received (i.e. every few milliseconds).
At this time, a collection is populated with the data being recieved in the above event.
2-
I am thinking of having a separate thread in the windows service to constantly check the collection and delete items where necessary...
What do you think?
Thanks
|
|
|
|
|
The checking can be done on the background thread which the DoWork event is called on and any updates to the UI can be done by reporting progress.
Two problems here:
Once the DoWork handler method returns then the RunWorkerCompleted event fires and the thread will be closed so you would either need to a. Ensure the DoWork handler never returns or b. start a new BackgroundWorker/restart from the RunWorkerCompleted handler. This is why Pete suggested a timer as it can raise an event on a background thread periodically for you.
The background thread is going to be chewing up processor cycles if you just loop in your DoWork handler - this isn't a good idea! Sleeping the thread on each loop may be a quick solution to this - but still a timer makes more sense.
|
|
|
|
|
|
hi,
I have a MDI Parent From, MDI Child Form & a third Dialog Form.
I call a third Form by clicking a button using ShowDialog() placed in MDI Child.
I like to refresh MDI Child after closing that third Form...
but after closing of third Form,
MDI Parent fired Activated event instead of MDI Child ...!
Give the solution...
|
|
|
|
|
Manish_84 wrote: I call a third Form by clicking a button using ShowDialog() placed in MDI Child.
I like to refresh MDI Child after closing that third Form...
The ShowDialog method is blocking; you can refresh your MDI child right after the line where you show the dialog. Once the dialog is closed, execution will continue there.
Manish_84 wrote: Give the solution...
I are Troll
|
|
|
|
|
please advice me a simlple unzip method in C#
other than using Shell object...
note : zip file contains files and multiple folders
modified on Wednesday, January 5, 2011 1:57 AM
|
|
|
|
|
|
this will help me to unzip multiple folders??
|
|
|
|
|
Yes it is.
If you can unzip one folder then further you can unzip any number of folders, There are lot of features in a language of looping, Just change your program accordingly.
|
|
|
|
|
thanks
i will try hiren .. will let you know
|
|
|
|
|
me too. I have a project but It's don't work in this case.
|
|
|
|
|
|
thanks a lot ravi
its working
|
|
|
|
|
you are always welcome.
|
|
|
|
|