Exemplo n.º 1
0
 /// <summary>
 /// Resets the job worker.
 /// </summary>
 private void ResetJobWorker()
 {
     this.jobWorker = new JobWorker();
     this.jobWorker.CreatedDirectory        += jobWorker_CreatedDirectory;
     this.jobWorker.CreatedFile             += jobWorker_CreatedFile;
     this.jobWorker.CreatingDirectory       += jobWorker_CreatingDirectory;
     this.jobWorker.CreatingFile            += jobWorker_CreatingFile;
     this.jobWorker.DeletedDirectory        += jobWorker_DeletedDirectory;
     this.jobWorker.DeletedFile             += jobWorker_DeletedFile;
     this.jobWorker.DeletingDirectory       += jobWorker_DeletingDirectory;
     this.jobWorker.DeletingFile            += jobWorker_DeletingFile;
     this.jobWorker.DirectoryCreationError  += jobWorker_DirectoryCreationError;
     this.jobWorker.DirectoryDeletionError  += jobWorker_DirectoryDeletionError;
     this.jobWorker.FileCopyError           += jobWorker_FileCopyError;
     this.jobWorker.FileCopyProgressChanged += jobWorker_FileCopyProgressChanged;
     this.jobWorker.FileDeletionError       += jobWorker_FileDeletionError;
     this.jobWorker.FilesCounted            += jobWorker_FilesCounted;
     this.jobWorker.Finished      += jobWorker_Finished;
     this.jobWorker.JobFinished   += jobWorker_JobFinished;
     this.jobWorker.JobStarted    += jobWorker_JobStarted;
     this.jobWorker.ModifiedFile  += jobWorker_ModifiedFile;
     this.jobWorker.ModifyingFile += jobWorker_ModifyingFile;
     this.jobWorker.ProceededFile += jobWorker_ProceededFile;
     this.ResetMessages();
     this.ResetBytes();
     this.averageSpeedBuffer = new CircularBuffer <long>(500);
     this.IsAborted          = false;
     this.IsDeleting         = false;
 }
Exemplo n.º 2
0
        public ActionResult DeleteConfirmed(int id)
        {
            JobWorker jobWorker = db.JobWorkers.Find(id);

            db.JobWorkers.Remove(jobWorker);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 3
0
 public void StartWorker()
 {
     worker = new JobWorker(this);
     worker.SuccessEvent += OnWorkerSuccess;
     workerThread         = new Thread(new ThreadStart(worker.Work));
     LogText("NEW THREAD ID: " + workerThread.ManagedThreadId);
     workerThread.Start();
 }
Exemplo n.º 4
0
        public ActionResult CreateJobWorker(MainApplication model, HttpPostedFileBase file)
        {
            MainApplication mainapp = new MainApplication()
            {
                user = new User(),
            };

            JobWorker worker = _JobWorkerService.GetLastRow();
            int       Val    = 0;
            int       length = 0;

            if (worker != null)
            {
                Val    = worker.Id;
                Val    = Val + 1;
                length = Val.ToString().Length;
            }
            else
            {
                Val    = 1;
                length = 1;
            }
            string Code = _utilityService.getName("JW", length, Val);


            string msgbox = string.Empty;

            if (file != null)
            {
                var fileName = Path.GetFileName(file.FileName);
                var path     = ConfigurationManager.AppSettings["JobWorkerPhotos"].ToString() + "/" + fileName;
                file.SaveAs(path);

                model.JobWorkerDetails.Photo = fileName;
            }
            if (!string.IsNullOrEmpty(msgbox))
            {
                TempData["errorMsg"] = msgbox;
                return(RedirectToAction("CreateJobWorker", "JobWork"));
            }

            Int32 sid = Convert.ToInt32(model.JobWorkerDetails.State);

            model.JobWorkerDetails.State = _StateService.GetStateNamebyId(sid);
            Int32 cid = Convert.ToInt32(model.JobWorkerDetails.City);

            model.JobWorkerDetails.City        = _CityService.GetCityNamebyId(cid);
            model.JobWorkerDetails.Code        = Code;
            model.JobWorkerDetails.Status      = "Active";
            model.JobWorkerDetails.ModifiedOn  = DateTime.Now;
            model.JobWorkerDetails.CompanyCode = CompanyCode;
            _JobWorkerService.Create(model.JobWorkerDetails);

            var Id       = _JobWorkerService.GetLastRow().Id;
            var WorkerId = Encode(Id.ToString());

            return(RedirectToAction("CreateJobWorkerDetails/" + WorkerId, "JobWork"));
        }
Exemplo n.º 5
0
 public void Add(JobWorker w)
 {
     IndividualWorkerSummary i = new IndividualWorkerSummary();
     i.Worker = w;
     i.Dock = DockStyle.Bottom;
     panel1.Controls.Add(i);
     displays[w.Name] = i;
     RefreshInfo();
 }
Exemplo n.º 6
0
        static void Main(string[] args)
        {
            var jobProcessingContext = new JobProcessingContext(new BasicReadOnlyConfigurationManager(new AppSettingsSettingStore()));
            var worker = new JobWorker(
                jobProcessingContext,
                new[] { new ModifyJobProcessor() });

            worker.DoWorkAsync().GetAwaiter().GetResult();
        }
Exemplo n.º 7
0
        /// <summary>
        /// Initializes a new ThreadJob.
        /// </summary>
        /// <param name="worker">A delegate that will be called to perform the actual work.</param>
        /// <param name="workerArgs">A parameter that will be passed to the worker delegate. Can be null.</param>
        public ThreadJob(JobWorker worker, object workerArgs)
        {
            SyncRoot = new object();

            m_Worker    = worker;
            m_JobArgs   = workerArgs;
            m_Completed = null;
            m_Enqueued  = DateTime.MinValue;
            m_Status    = JobStatus.New;
        }
Exemplo n.º 8
0
        /// <summary>
        /// Initializes a new ThreadJob.
        /// </summary>
        /// <param name="worker">A delegate that will be called to perform the actual work.</param>
        /// <param name="workerArgs">A parameter that will be passed to the worker delegate.</param>
        /// <param name="completedcallback">A delegate that will be called in the main thread when the job has completed.</param>
        public ThreadJob(JobWorker worker, object workerArgs, JobCompletedCallback completedcallback)
        {
            SyncRoot = new object();

            m_Worker    = worker;
            m_Completed = completedcallback;
            m_JobArgs   = workerArgs;
            m_Enqueued  = DateTime.MinValue;
            m_Status    = JobStatus.New;
        }
Exemplo n.º 9
0
 public ActionResult Edit([Bind(Include = "posision,id_JobWorker,fk_OrderJobid_OrderJob,fk_UserID")] JobWorker jobWorker)
 {
     if (ModelState.IsValid)
     {
         db.Entry(jobWorker).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.fk_UserID = new SelectList(db.Userrs, "ID", "name", jobWorker.fk_UserID);
     ViewBag.fk_OrderJobid_OrderJob = new SelectList(db.OrderJobs, "id_OrderJob", "place", jobWorker.fk_OrderJobid_OrderJob);
     return(View(jobWorker));
 }
Exemplo n.º 10
0
        static void Main(string[] args)
        {
            Console.WriteLine("Console App");
            //Console.ReadKey(true); // This code prompts the user to press any key and then pauses the program until a key is pressed.

            int[] data = { 5, 3, 10, 75, 4, 73, 41, 8 };
            //int[] data = { 5, 5 };
            JobWorker jobWorker = new JobWorker(data, new JobWorkerCallback(MyJobWorkerCallback));

            Thread jobConsumer = new Thread(new ThreadStart(jobWorker.Run));

            jobConsumer.Start();
        }
        public ActionResult AppointJobsAndWorkers(Merged merged)
        {
            int           joborderid;
            int           k = 0;
            int           siaip;
            int           succes;
            int           successor;
            CustumerOrder CO        = new CustumerOrder();
            Userr         us        = new Userr();
            JobWorker     jbWorker  = new JobWorker();
            Job           jbs       = new Job();
            OrderJob      ordjooobs = new OrderJob();
            List <Job>    jobs      = jbs.SelectJobList();

            foreach (var jooob in jobs)
            {
                var obj = db.OrderJobs.Where(a => a.fk_CustumerOrderorderNumer.Equals(merged.id) && a.fk_JobworkNumer.Equals(jooob.workNumer)).FirstOrDefault();
                if (obj == null)
                {
                    joborderid = ordjooobs.InsertOrderJob(jooob.workNumer, merged.id);
                    if (k == 0)
                    {
                        siaip = jbWorker.InsertJobWorker(joborderid, merged.first); succes = us.UpdateWorkerStarus(merged.first);
                    }
                    else if (k == 1)
                    {
                        siaip = jbWorker.InsertJobWorker(joborderid, merged.second); succes = us.UpdateWorkerStarus(merged.second);
                    }
                    else if (k == 2)
                    {
                        siaip = jbWorker.InsertJobWorker(joborderid, merged.third); succes = us.UpdateWorkerStarus(merged.third);
                    }
                    else if (k == 3)
                    {
                        siaip = jbWorker.InsertJobWorker(joborderid, merged.fourth); succes = us.UpdateWorkerStarus(merged.fourth);
                    }
                    else if (k == 4)
                    {
                        siaip = jbWorker.InsertJobWorker(joborderid, merged.fifth); succes = us.UpdateWorkerStarus(merged.fifth);
                    }
                    else if (k == 5)
                    {
                        siaip = jbWorker.InsertJobWorker(joborderid, merged.six); succes = us.UpdateWorkerStarus(merged.six);
                    }
                }
                k++;
            }
            successor = CO.UpdateOrderStatus(merged.id);

            return(RedirectToAction("Index", "CustumerOrders", new { area = "Index" }));
        }
Exemplo n.º 12
0
        // GET: JobWorkers/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            JobWorker jobWorker = db.JobWorkers.Find(id);

            if (jobWorker == null)
            {
                return(HttpNotFound());
            }
            return(View(jobWorker));
        }
Exemplo n.º 13
0
 public async Task ProcessJob(int jobTask)
 {
     try
     {
         //[2] start job in a ThreadPool, Background thread
         var T = Task.Factory.StartNew(() =>
         {
             JobWorker jobWorker = new JobWorker();
             jobWorker.Execute(jobTask);
         });
         //[3] await here will keep context of calling thread
         await T;     //... and release the calling thread
     }
     catch (Exception) { /*handle*/ }
 }
Exemplo n.º 14
0
        // GET: JobWorkers/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            JobWorker jobWorker = db.JobWorkers.Find(id);

            if (jobWorker == null)
            {
                return(HttpNotFound());
            }
            ViewBag.fk_UserID = new SelectList(db.Userrs, "ID", "name", jobWorker.fk_UserID);
            ViewBag.fk_OrderJobid_OrderJob = new SelectList(db.OrderJobs, "id_OrderJob", "place", jobWorker.fk_OrderJobid_OrderJob);
            return(View(jobWorker));
        }
Exemplo n.º 15
0
        public void AddJobWorker(JobWorker jw)
        {
            using (SchedulerEntities db = new SchedulerEntities())
            {
                JOBWORKER JW = new JOBWORKER();
                JW.CreatedBy      = HttpContext.Current.User.Identity.Name;
                JW.LastModifiedBy = HttpContext.Current.User.Identity.Name;
                JW.CreationDate   = DateTime.Now;

                JW.WorkerId = jw.WorkerId;
                JW.JobId    = jw.JobId;

                db.JOBWORKERs.Add(JW);
                db.SaveChanges();
            }
        }
Exemplo n.º 16
0
 /// <summary>
 /// Removes this job from the JobManager, if it has not yet began working. There is no way to restart an aborted job, a new one must be created.
 /// Locks: this.SyncRoot->JobManager.m_ThreadStatsLock
 /// </summary>
 public void Abort()
 {
     try
     {
         using (TimedLock.Lock(SyncRoot))                 // this.SyncRoot
         {
             m_Worker = null;
             m_Status = JobStatus.Aborted;
             JobManager.AbortedJobs++;
         }
     }
     catch (LockTimeoutException e)
     {
         Console.WriteLine("\n\nDeadlock detected!\n");
         Console.WriteLine(e.ToString());
     }
 }
Exemplo n.º 17
0
        public async Task <IActionResult> CreateJob([FromBody] NewJob newJob, Guid teamId, Guid userId, Guid boardId)
        {
            var team = await _timelineContext.Teams.Where(x => x.Id == teamId)
                       .Include(x => x.Associations).ThenInclude(x => x.Job).ThenInclude(x => x.AssociatedUsers)
                       .ThenInclude(x => x.User).FirstOrDefaultAsync();

            var user = await _timelineContext.Users.Where(x => x.Id == userId).FirstOrDefaultAsync();

            if (team == null || user == null)
            {
                return(BadRequest());
            }

            Console.WriteLine($"Creating job {newJob.Job.Name}");

            newJob.Job.CreatedBy = user;

            await _timelineContext.Jobs.AddAsync(newJob.Job);

            newJob.Job.AssociatedUsers = new List <JobWorker>();
            foreach (var newJobUser in newJob.Users)
            {
                var jobWorker = new JobWorker {
                    JobId = newJob.Job.JobId, UserId = newJobUser.Id
                };
                newJob.Job.AssociatedUsers.Add(jobWorker);
                Console.WriteLine($"Adding job worker {jobWorker.JobId} -> {jobWorker.UserId}");
            }


            Console.WriteLine($"job id {newJob.Job.JobId}");
            _log.LogInformation("New job {name} : {id} on {teamId}", newJob.Job.Name, newJob.Job.JobId, team.Id);

            var association = new Associations
            {
                TeamId = teamId, UserId = userId, JobId = newJob.Job.JobId, BoardId = boardId
            };

            team.Associations.Add(association);


            await _timelineContext.SaveChangesAsync();

            return(Ok(newJob.Job));
        }
Exemplo n.º 18
0
        private void InitNewGame()
        {
            EngineController.rnd         = new Random();
            EngineController.gameRunning = true;
            EngineController.inMenu      = false;

            //Second Thread - Fire thread runs at same frame time as main thread
            secondThread = new Thread(UpdateSecondThread);
            secondThread.IsBackground = true;
            secondThread.Priority     = ThreadPriority.Highest;
            secondThreadRunning       = true;
            secondThreadState         = UpdateState.IDLE;
            secondThread.Start();

            //job Worker - Runs continously looking for pathfinding jobs
            jobWorker = new JobWorker();
            jobWorker.StartWorker();
        }
Exemplo n.º 19
0
        public ActionResult CreateJobWorker()
        {
            MainApplication model = new MainApplication()
            {
                JobWorkerDetails = new JobWorker(),
            };
            JobWorker worker = _JobWorkerService.GetLastRow();
            int       Val    = 0;
            int       length = 0;

            if (worker != null)
            {
                Val    = worker.Id;
                Val    = Val + 1;
                length = Val.ToString().Length;
            }
            else
            {
                Val    = 1;
                length = 1;
            }
            string code = _utilityService.getName("JW", length, Val);

            model.JobWorkerDetails.Code   = code;
            TempData["PreviousJobWorker"] = code;

            string mssgbox = string.Empty;

            model.BankNameList       = _BankNameService.getAllBankNames();
            model.StateList          = _StateService.GetStateByCountry(1);
            model.BloodGroups        = _BloodGroupService.GetBloodGroup();
            model.totalExpYears      = _YearExperienceService.GetYearExp();
            model.totalExpmonths     = _MonthExperienceService.GetMonthExp();
            model.DepartmentList     = _DepartmentService.getAllDepartments();
            model.DesignationList    = _DesignationMasterService.getAllDesignation();
            model.TypeOfSupplierList = _TypeOfSupplierService.GetTypeOfSuppliers();

            model.userCredentialList = _IUserCredentialService.GetUserCredentialsByEmail(UserEmail);
            model.modulelist         = _ModuleService.getAllModules();
            model.CompanyCode        = CompanyCode;
            model.CompanyName        = CompanyName;
            model.FinancialYear      = FinancialYear;
            return(View(model));
        }
Exemplo n.º 20
0
        public async Task TestJobWorkerWithWrongUrlExecute()
        {
            JobAgsService agsService = new JobAgsService(
                "http://ags101.portalinflor.com.br/arcgis/rest/services/TreinamentoTeste/GPServer/Script/submitJob?f=json",
                "http://ags101.portalinflor.com.br/arcgis/rest/services/TreinamentoTeste/GPServer/Script/jobs/{jobId}?f=json",
                "http://ags101.portalinflor.com.br/arcgis/rest/services/TreinamentoTeste/GPServer/Script/jobs/{jobId}/cancel");

            var progress = new Progress <JobStatus>();

            progress.ProgressChanged += (s, e) =>
            {
            };

            JobWorker jw = new JobWorker(agsService, progress);
            await Task.Run(() => jw.DoWork());

            JobStatus status = jw.Status;

            Assert.AreNotEqual(status, JobStatus.none);
        }
Exemplo n.º 21
0
        // GET: /ProductMaster/Delete/5

        public ActionResult Delete(int id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            JobWorker JobWorker = _JobWorkerService.GetJobWorker(id);

            if (JobWorker == null)
            {
                return(HttpNotFound());
            }

            ReasonViewModel vm = new ReasonViewModel()
            {
                id = id,
            };

            return(PartialView("_Reason", vm));
        }
Exemplo n.º 22
0
        public ActionResult AddToExisting(AddToExistingContactViewModel svm)
        {
            JobWorker jobworker = new JobWorker();

            jobworker.PersonID = svm.PersonId;
            _JobWorkerService.Create(jobworker);

            try
            {
                _unitOfWork.Save();
            }

            catch (Exception ex)
            {
                string message = _exception.HandleException(ex);
                ModelState.AddModelError("", message);
                return(PartialView("_Create", svm));
            }

            return(Json(new { success = true }));
        }
        public override void Run(IEnumerable <MyTask> tasks)
        {
            int maxConcurentTasks = (5 + 3 + 3) + 3;

            ThreadPool.SetMinThreads(maxConcurentTasks, maxConcurentTasks);
            ThreadPool.SetMaxThreads(maxConcurentTasks, maxConcurentTasks);

            int toProcess = Enumerable.Count(tasks);

            Queue.Init();


            using (ManualResetEvent resetEvent = new ManualResetEvent(false))
            {
                Task.Run(() =>
                {
                    JobWorker jobWorker1 = new JobWorker(1, 5);
                });


                Task.Run(() =>
                {
                    JobWorker jobWorker2 = new JobWorker(2, 3);
                });


                Task.Run(() =>
                {
                    JobWorker jobWorker3 = new JobWorker(3, 3, toProcess, resetEvent);
                });

                //initial Step 1 in queue
                foreach (MyTask task in tasks)
                {
                    Queue.Produce(1, task);
                }

                resetEvent.WaitOne();
            }
        }
Exemplo n.º 24
0
        public async Task <IActionResult> AddWorker([FromBody] WorkersUpdate workersUpdate)
        {
            var job = await _timelineContext.Jobs.Where(x => x.JobId == workersUpdate.JobId)
                      .Include(x => x.AssociatedUsers).FirstOrDefaultAsync();

            if (job == null)
            {
                return(BadRequest());
            }

            Console.WriteLine($"Updating workers for {workersUpdate.JobId}");

            var jobWorker = new JobWorker {
                JobId = workersUpdate.JobId, UserId = workersUpdate.UserId
            };

            job.AssociatedUsers.Add(jobWorker);

            await _timelineContext.SaveChangesAsync();

            return(Ok());
        }
Exemplo n.º 25
0
        public ActionResult AssignWorker(JobWorker jw)
        {
            //JobWorker jwork = new JobWorker
            //{
            //    JobId = "asdf",
            //    WorkerId = "fdaf"
            //};
            //  JobManager...;

            JobManager JM = new JobManager();

            if (ModelState.IsValid)
            {
                JM.AddJobWorker(jw);
                return(null);//RedirectToAction("Welcome", "Home");
            }
            else
            {
                ModelState.AddModelError("", "The password provided is incorrect.");
            }

            return(View());
        }
Exemplo n.º 26
0
 public JobWorker Create(JobWorker JobWorker)
 {
     JobWorker.ObjectState = ObjectState.Added;
     _JobworkerRepository.Add(JobWorker);
     return(JobWorker);
 }
Exemplo n.º 27
0
 public void Delete(JobWorker JobWorker)
 {
     _JobworkerRepository.Delete(JobWorker);
 }
Exemplo n.º 28
0
 public JobWorker Add(JobWorker JobWorker)
 {
     _JobworkerRepository.Insert(JobWorker);
     return(JobWorker);
 }
Exemplo n.º 29
0
		/// <summary>
		/// Initializes a new ThreadJob.
		/// </summary>
		/// <param name="worker">A delegate that will be called to perform the actual work.</param>
		/// <param name="workerArgs">A parameter that will be passed to the worker delegate. Can be null.</param>
		public ThreadJob(JobWorker worker, object workerArgs)
		{
			SyncRoot = new object();

			m_Worker = worker;
			m_JobArgs = workerArgs;
			m_Completed = null;
			m_Enqueued = DateTime.MinValue;
			m_Status = JobStatus.New;
		}
Exemplo n.º 30
0
		/// <summary>
		/// Initializes a new ThreadJob.
		/// </summary>
		/// <param name="worker">A delegate that will be called to perform the actual work.</param>
		/// <param name="workerArgs">A parameter that will be passed to the worker delegate.</param>
		/// <param name="completedcallback">A delegate that will be called in the main thread when the job has completed.</param>
		public ThreadJob(JobWorker worker, object workerArgs, JobCompletedCallback completedcallback)
		{
			SyncRoot = new object();

			m_Worker = worker;
			m_Completed = completedcallback;
			m_JobArgs = workerArgs;
			m_Enqueued = DateTime.MinValue;
			m_Status = JobStatus.New;
		}
Exemplo n.º 31
0
		/// <summary>
		/// Removes this job from the JobManager, if it has not yet began working. There is no way to restart an aborted job, a new one must be created.
		/// Locks: this.SyncRoot->JobManager.m_ThreadStatsLock
		/// </summary>
		public void Abort()
		{
			try
			{
				using (TimedLock.Lock(SyncRoot)) // this.SyncRoot
				{
					m_Worker = null;
					m_Status = JobStatus.Aborted;
					JobManager.AbortedJobs++;
				}
			}
			catch (LockTimeoutException e)
			{
				Console.WriteLine("\n\nDeadlock detected!\n");
				Console.WriteLine(e.ToString());
			}
		}
Exemplo n.º 32
0
 private Handler()
 {
     FileDirInfo = new FileDirHandler();
     watcher     = new FileSystemWatcher();
     Worker      = new JobWorker();
 }
Exemplo n.º 33
0
        /// <summary>
        /// Initializes and Opens the Pylon Image Provider to the Camera.
        /// </summary>
        /// <param name="maxExposure">Maximum Exposure.</param>
        public void Initialize(int maxExposure)
        {
            log.Info("Initializing camera on Index: " + Index + "...");


            log.Info("Creating Buffermanager(" + Index + ")...");


            ImageBuffers = new BufferManager();

            ImageBuffers.Initialize();


            log.Info("Buffermanager (" + Index + ") Created with " + ImageBuffers.ThreadCount + " threads.");



            log.Info("Initializing Worker threads on Cam(" + Index + ")...");

            worker = new JobWorker(this, ImageBuffers);

            worker.Initialize();

            log.Info("Worker Threads(" + Index + ") Created with " + worker.ThreadCount + " threads.");


            log.Info("Creating Image Providers(" + Index + ")...");

            ImageProvider = new ImageProvider();

            ImageProvider.ImageReadyAction = OnImageReadyHandler;
            //ImageProvider.ImageReadyEvent += OnImageReadyHandler;
            ImageProvider.DeviceRemovedEvent += OnDeviceRemovedHandler;



            log.Info("Image Provider(" + Index + ") created successfully.");
            log.Info("Opening the Basler(" + Index + ") device...");

            Open();

            log.Info("Basler(" + Index + ") is now open!");


            /* Config part. */
            log.Info("Loading config for '" + Name + "'...");

            Config = new ConfigManager(Name);

            LoadConfigNodes(
                "Width", "Height",
                "OffsetX", "OffsetY"
                );

            LoadFloatNodes(
                "Gain", "ExposureTime",
                "AutoTargetBrightness"
                );

            LoadStringNode("ExposureAuto");

            // Setting max Exposure.
            var node = ImageProvider.GetNodeFromDevice("AutoExposureTimeUpperLimit");

            if (node.IsValid)
            {
                if (GenApi.NodeIsWritable(node))
                {
                    Pylon.DeviceSetFloatFeature(ImageProvider.m_hDevice, "AutoExposureTimeUpperLimit", maxExposure);
                }
            }


            log.Info("Loaded configurations for the camera '" + Name + "'.");

            /* Done config part. */
        }
Exemplo n.º 34
0
 public void Update(JobWorker JobWorker)
 {
     JobWorker.ObjectState = ObjectState.Modified;
     _JobworkerRepository.Update(JobWorker);
 }