Example #1
0
        private async void OnTimedEvent(object sender, ElapsedEventArgs e)
        {
            var image = textureView.GetBitmap((int)(textureView.Width * CMP_RATE), (int)(textureView.Height * CMP_RATE));

            Counter++;
            System.Diagnostics.Debug.WriteLine("FRANK: " + Counter + " " + DateTime.Now.ToString("mm:ss"));
            try
            {
                await RestAPI.StartCall(image);
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine("FRANK: " + ex.Message);
            }
            //if (Counter < NUMBER_PER_SEC)
            //{
            //	var image = textureView.Bitmap;
            //	Counter++;
            //	System.Diagnostics.Debug.WriteLine("FRANK: " + Counter + " " + DateTime.Now.ToString("mm:ss"));
            //	try
            //	{
            //		await RestAPI.StartCall(image);
            //	}
            //	catch (Exception ex)
            //	{
            //		System.Diagnostics.Debug.WriteLine("FRANK: " + ex.Message);
            //	}
            //	System.Diagnostics.Debug.WriteLine("FRANK: coulicouli");
            //}
            //else
            //{
            //	DisableCam();
            //	System.Diagnostics.Debug.WriteLine("FRANK: cam disable");
            //}
        }