public ImageController( ILogger <ImageController> logger, WebCamService webCamService) { _logger = logger; _webCamService = webCamService; }
private void InitializeServices() { _webCamService = new WebCamService(); _webCamService.ImageChanged += _webCamService_ImageChanged; _rekognitionService = new RekognitionService(); }
private string PerformWork(WebCamService.WebCamServiceClient client) { Thread.Sleep(2000); string res = client.arduinoUploading(); return res; }
private string PerformWork(WebCamService.WebCamServiceClient client, string arduinoSource) { Thread.Sleep(2000);//do work here... string res = client.arduinoCompiling(arduinoSource); //return result of work return res; }
private void frmMain_Load(object sender, EventArgs e) { this.Text = String.Format("{0} {1} - {2}" , zsi.dtrs.camera.About.AssemblyProduct , zsi.dtrs.camera.About.AssemblyVersion , zsi.dtrs.camera.About.AssemblyCompany ); if (!DesignMode) { _WebCam = new WebCamService(picture, comboBoxCameras); } }
private void frmMain_Load(object sender, EventArgs e) { this.Text = String.Format("{0} {1} - {2}" , zsi.PhotoFingCapture.About.AssemblyProduct , zsi.PhotoFingCapture.About.AssemblyVersion , zsi.PhotoFingCapture.About.AssemblyCompany ); cbImagePosition.SelectedIndex = 0; if (!DesignMode) { _WebCam = new WebCamService(picture, comboBoxCameras); } }
public Task<string> DoWork(WebCamService.WebCamServiceClient c, string s) { //create task, of which runs our work of a thread pool thread return Task.Factory.StartNew<string>(() => PerformWork(c, s)); }
public Task<string> DoWork(WebCamService.WebCamServiceClient c) { return Task.Factory.StartNew<string>(() => PerformWork(c)); }
public MainViewModel() { WebCamList = new WebCamService().GetWebcams(); }
void ImgCap_NewFrame(object sender, WebCamService.FrameEventArgs e) { pictureBox.Image = e.Frame; }