void CommService_TaskMonified(TaskInfoV3_1 obj) { System.Diagnostics.Trace.WriteLine("CommService_TaskMonified " + obj.ToString()); int index = m_lastTaskidList.IndexOf(obj.TaskId); if (index >= 0) { if (obj.Status != TaskShowStatus) { if (TaskModified != null) { TaskModified(obj); } } else { if (UpdateTaskProgress != null) { UpdateTaskProgress(index, obj.TaskId, obj.Status, obj.Progress); } } } if (obj.Status == TaskShowStatus && TaskModified != null) { TaskModified(obj); } if (TaskMdfNotify != null) { TaskMdfNotify(obj); } }
void CommService_TaskMonified(TaskInfoV3_1 obj) { System.Diagnostics.Trace.WriteLine("CommService_TaskMonified " + obj.ToString()); if (obj.StatusList.Count > 0) { E_VDA_TASK_STATUS s = obj.StatusList[0].Status; uint p = obj.StatusList[0].Progress; int index = m_lastTaskidList.IndexOf(obj.TaskId); if (index >= 0) { if (s != TaskShowStatus) { if (TaskModified != null) { TaskModified(obj); } } else { if (UpdateTaskProgress != null) { UpdateTaskProgress(index, obj.TaskId, s, p); } } } if (s == TaskShowStatus && TaskModified != null) { TaskModified(obj); } } }
void CommService_TaskAdded(TaskInfoV3_1 obj) { System.Diagnostics.Trace.WriteLine("CommService_TaskAdded " + obj.ToString()); if (TaskAdded != null) { TaskAdded(obj); } }
void CommService_TaskDeleted(TaskInfoV3_1 obj) { System.Diagnostics.Trace.WriteLine("CommService_TaskDeleted " + obj.ToString()); if (m_lastTaskidList.Contains(obj.TaskId) && TaskDeleted != null) { TaskDeleted(obj); } }
void CommService_TaskAdded(TaskInfoV3_1 obj) { if (obj.TaskType == TaskType.Realtime) { System.Diagnostics.Trace.WriteLine("CommService_TaskAdded " + obj.ToString()); TotalCount++; if (TaskAdded != null) { TaskAdded(obj); } } }
void CommService_TaskDeleted(TaskInfoV3_1 obj) { if (obj.TaskType == TaskType.History) { System.Diagnostics.Trace.WriteLine("CommService_TaskDeleted " + obj.TaskId + " " + obj.ToString()); TotalCount--; if (TaskDeleted != null) { TaskDeleted(obj); } } }
private DevComponents.AdvTree.Node AddTaskTreeNode(TaskInfoV3_1 item) { DevComponents.AdvTree.Node n = new DevComponents.AdvTree.Node(item.TaskId.ToString()); DevComponents.AdvTree.Cell c = new DevComponents.AdvTree.Cell(); //c.Images.Image = global::IVX.Live.MainForm.Properties.Resources.bkjpg; c.Images.ImageIndex = 0; c.Text = item.ToString(); E_VDA_TASK_STATUS totalstatus = 0; E_VIDEO_ANALYZE_TYPE totalalaysetype = 0; foreach (var s in item.StatusList) { totalstatus = s.Status; totalalaysetype = s.AlgthmType; } n.Cells.Add(c); string anaurl = DataModel.Constant.TaskStatusInfos.Single(it => it.Status == totalstatus).Name; if (totalstatus == E_VDA_TASK_STATUS.E_TASK_STATUS_ANALYSE_EXECUTING) { anaurl += " <a href=\"E_TASK_ACTION_TYPE_SUNPEND\">暂停分析</a> "; } if (totalstatus == E_VDA_TASK_STATUS.E_TASK_STATUS_ANALYSE_SUSPEND) { anaurl += " <a href=\"E_TASK_ACTION_TYPE_CONTINUE\">继续分析</a> "; } if (totalstatus == E_VDA_TASK_STATUS.E_TASK_STATUS_ANALYSE_FAILED || totalstatus == E_VDA_TASK_STATUS.E_TASK_STATUS_IMPORT_FAILED) { anaurl = "<font color=\"#ff0000\" ><b>" + anaurl + "</b></font>"; } DevComponents.AdvTree.Cell cellana = new DevComponents.AdvTree.Cell(anaurl); cellana.TagString = DataModel.Constant.TaskStatusInfos.Single(it => it.Status == totalstatus).Name; n.Cells.Add(cellana); n.Cells.Add(new DevComponents.AdvTree.Cell(DataModel.Constant.VideoAnalyzeTypeInfo.Single(it => it.Type == totalalaysetype).Name)); DevComponents.AdvTree.Cell c1 = new DevComponents.AdvTree.Cell(); string url = "<a href=\"E_TASK_ACTION_TYPE_INFO\">查看信息</a> "; if ((E_VDA_TASK_STATUS)totalstatus >= E_VDA_TASK_STATUS.E_TASK_STATUS_ANALYSE_WAIT) { url += "<a href=\"E_TASK_ACTION_TYPE_PLAYBACK\">视频播放</a> "; } url += m_viewModel.GetActionURL(totalstatus, totalalaysetype, item.TaskType); //url += "<a href=\"E_TASK_ACTION_TYPE_DELETE\">删除任务</a>"; c1.Text = url; n.Cells.Add(c1); DevComponents.DotNetBar.ButtonItem sbuttonItem = new DevComponents.DotNetBar.ButtonItem(); sbuttonItem.Text = "";// "删除任务"; sbuttonItem.Click += sbuttonItem_Click; //sbuttonItem.Image = Properties.Resources._305_Close_24x24_72; sbuttonItem.Symbol = "";// "/uf014"; sbuttonItem.Tooltip = "删除任务"; //sbuttonItem.Tag = new Tuple<uint, E_VIDEO_ANALYZE_TYPE>(item.TaskId, totalalaysetype); DevComponents.AdvTree.Cell c2 = new DevComponents.AdvTree.Cell(); c2.HostedItem = sbuttonItem; n.Cells.Add(c2); n.Tag = item; return(n); }