A
algebgeo
Guest
I have a variable that changes by external device which is a camera that detect faces this variable is an array of bytes which is always zero when no face is detected but when face is detected the bytes that describes the face is stored in this variable i am currently using an approach which i don't like that is using a timer
timer = new DispatcherTimer();
timer.Interval = TimeSpan.FromMilliseconds(0);
timer.Tick += Timer_Tick;
timer.IsEnabled = true;
timer.Start();
private void Timer_Tick(object sender, EventArgs e)
{
FaceCamera.Authenticate(cameraAddress, faceCode);
}
i want to change this approach and use a listener which listen to this variable and run a function when this variable change and continue listening for another change for this variable any suggestions.
Continue reading...
timer = new DispatcherTimer();
timer.Interval = TimeSpan.FromMilliseconds(0);
timer.Tick += Timer_Tick;
timer.IsEnabled = true;
timer.Start();
private void Timer_Tick(object sender, EventArgs e)
{
FaceCamera.Authenticate(cameraAddress, faceCode);
}
i want to change this approach and use a listener which listen to this variable and run a function when this variable change and continue listening for another change for this variable any suggestions.
Continue reading...