public void EnqueueTask(MgaFCO task) { if (this.iconPaths.Count == 0) { InitializeIconPaths(task); } string metaName = task.MetaBase.Name; if (metaName == "ExecutionTask") { TaskInfo taskInfo = new TaskInfo(metaName); SetTaskIconPath(taskInfo, EXECUTIONTASK_ICON_NAME); workflow.Enqueue(taskInfo); } else { workflow.Enqueue(new TaskInfo(task.StrAttrByName["COMName"], metaName)); } }
protected void SetTaskIconPath(TaskInfo task, string iconName) { foreach (var basePath in this.iconPaths) { var fullPath = Path.Combine(basePath, iconName); if (File.Exists(fullPath)) { task.SetIconPath(fullPath); break; } } }