private API_RETURN_CODE ActivatedChannelChangedHandler(ScanTask scanTask, object paras) { FormDisplay formImage = FindFormImage(scanTask); if (formImage == null) { Logger.Info(string.Format("scan task matching form image not found.")); return(API_RETURN_CODE.API_FAILED_SCAN_TASK_START_FAILED); } formImage.ActivatedChannelChanged(); return(API_RETURN_CODE.API_SUCCESS); }
private API_RETURN_CODE ScanTaskCreatedHandler(ScanTask scanTask, object paras) { FormDisplay formImage = FindFormImage(scanTask); if (formImage == null) { Logger.Info(string.Format("new scan task[{0}|{1}], create form image.", scanTask.TaskId, scanTask.TaskName)); formImage = new FormDisplay(scanTask); formImage.Show(this.dockPanel, DockState.Document); m_pFormImages.Add(formImage); } else { Logger.Info(string.Format("scan task[{0}|{1} alreay created.", scanTask.TaskId, scanTask.TaskName)); } formImage.ScanTaskCreated(); return(API_RETURN_CODE.API_SUCCESS); }