void CommService_TaskDeleted(DataModel.TaskInfoV3_1 obj)
 {
     if (TaskDeleted != null)
     {
         TaskDeleted(obj);
     }
 }
        private void OnSearchBegin(SearchItemGroup items)
        {
            if (InvokeRequired)
            {
                this.Invoke(new Action <SearchItemGroup>(OnSearchBegin), items);
            }
            else
            {
                if (items.SearchType == SearchType)
                {
                    DataModel.TaskInfoV3_1 task = timeTrackControl1.Tag as DataModel.TaskInfoV3_1;

                    foreach (var item in items.SearchItems)
                    {
                        if (task.TaskId == item.TaskId)
                        {
                            SearchHandle = item.SearchHandle;
                            DateTime end = (task.EndTime - task.StartTime).TotalMinutes > 30 ? task.EndTime : task.StartTime.AddMinutes(30);
                            timeTrackControl1.Init(task.StartTime, end);
                            break;
                        }
                    }
                }
            }
        }
Beispiel #3
0
        void m_viewModel_TaskDeleted(DataModel.TaskInfoV3_1 obj)
        {
            if (!m_isInited)
            {
                return;
            }

            if (InvokeRequired)
            {
                this.Invoke(new Action <DataModel.TaskInfoV3_1>(m_viewModel_TaskDeleted), obj);
            }
            else
            {
                string key = m_viewModel.GetTaskTimeLineKeyValue(obj);
                DevComponents.DotNetBar.ItemContainer itemContainer
                    = itemPanel1.GetItem("itemContainer_" + key) as DevComponents.DotNetBar.ItemContainer;
                DevComponents.DotNetBar.LabelItem labelItem
                               = itemPanel1.GetItem("labelItem_" + key) as DevComponents.DotNetBar.LabelItem;
                labelItem.Text = "<b>" + m_viewModel.GetTaskTimeLineByKey(key).ToString() + "</b>";

                if (itemContainer.SubItems.Contains("buttonItemTask_" + obj.TaskId))
                {
                    var item = itemContainer.SubItems["buttonItemTask_" + obj.TaskId] as ucTaskInfo;
                    if (item != null && ShownTaskList.Contains(item))
                    {
                        ShownTaskList.Remove(item);
                    }
                    itemContainer.SubItems.Remove("buttonItemTask_" + obj.TaskId);
                    itemPanel1.Refresh();
                }
            }
        }
        private void StartGetTimeline()
        {
            if (!NeedShowTimeLine)
            {
                return;
            }

            DataModel.TaskInfoV3_1 task = timeTrackControl1.Tag as DataModel.TaskInfoV3_1;
            m_viewModel.SearchItems = new DataModel.SearchItemGroup()
            {
                SearchItems = new List <DataModel.SearchItemV3_1>(),
                SearchType  = this.SearchType,
            };
            m_viewModel.SearchItems.SearchItems.Add(task.ToSearchItem());

            m_viewModel.PassLineSet   = new List <PassLine>();
            m_viewModel.RegionSet     = new List <BreakRegion>();
            m_viewModel.PictureData   = new System.Drawing.Bitmap(1, 1);
            m_viewModel.StartTime     = DataModel.Common.ZEROTIME;
            m_viewModel.StopTime      = DataModel.Common.MAXTIME;
            timeTrackControl1.Enabled = false;
            string msg = "";

            if (m_viewModel.Commit(out msg))
            {
            }
            else
            {
                timeTrackControl1.Enabled = false;
                labelMsg.Text             = msg;
            }
        }
Beispiel #5
0
 public FormSingleTask(DataModel.TaskInfoV3_1 task)
 {
     InitializeComponent();
     m_task = task;
     //buttonItem1.Enabled = !(task.AlgthmType == E_VIDEO_ANALYZE_TYPE.E_ANALYZE_BRIEAF || task.AlgthmType== E_VIDEO_ANALYZE_TYPE.E_ANALYZE_DYNAMIC_VEHICLE);
     //buttonReAnalyse.Enabled = (task.Status!= E_VDA_TASK_STATUS.E_TASK_STATUS_ANALYSE_EXECUTING && task.Status != E_VDA_TASK_STATUS.E_TASK_STATUS_ANALYSE_WAIT);
     //comboBoxExSplitTime.SelectedIndex = 0;
 }
        void ucPlayHistory1_VideoPos(uint obj)
        {
            if (NeedShowTimeLine)
            {
                DataModel.TaskInfoV3_1 task = timeTrackControl1.Tag as DataModel.TaskInfoV3_1;

                timeTrackControl1.CurrentTime = task.StartTime.AddSeconds(obj);
            }
        }
 public FormPlayHistoryNew(DataModel.TaskInfoV3_1 task)
 {
     InitializeComponent();
     ucPlayHistory1.Task              = task;
     ucPlayHistory1.VideoPos         += ucPlayHistory1_VideoPos;
     timeTrackControl1.Tag            = task;
     timeTrackControl1.OnDoubleClick += timeTrackControl1_OnDoubleClick;
     panel1.Visible = ucPlayHistory1.ShowGotoCompare = NeedShowTimeLine = task.StatusList.Exists(xx => xx.AlgthmType == E_VIDEO_ANALYZE_TYPE.E_ANALYZE_MOVEOBJ_PLATFORM);
     timeTrackControl1.TimeTrackModel = TimeTrackControl.TimeTrackModel.Seconds;
     WinFormAppUtil.AppContainer.Instance.EvtAggregator.GetEvent <SearchFinishedEvent>().Subscribe(OnSearchResultReturned, Microsoft.Practices.Prism.Events.ThreadOption.PublisherThread);
     WinFormAppUtil.AppContainer.Instance.EvtAggregator.GetEvent <SearchBeginEvent>().Subscribe(OnSearchBegin, Microsoft.Practices.Prism.Events.ThreadOption.PublisherThread);
 }
Beispiel #8
0
        void m_viewModel_TaskAdded(DataModel.TaskInfoV3_1 obj)
        {
            if (!m_isInited)
            {
                return;
            }

            if (InvokeRequired)
            {
                this.Invoke(new Action <DataModel.TaskInfoV3_1>(m_viewModel_TaskAdded), obj);
            }
            else
            {
                string key = m_viewModel.GetTaskTimeLineKeyValue(obj);

                if (itemPanel1.GetItem("NullValueLabel") != null)
                {
                    itemPanel1.Items.Remove("NullValueLabel");
                }

                DevComponents.DotNetBar.ItemContainer itemContainer
                    = itemPanel1.GetItem("itemContainer_" + key) as DevComponents.DotNetBar.ItemContainer;
                if (itemContainer == null)
                {
                    itemContainer = AddContainerItem(key, new TaskTimeLine()
                    {
                        TaskList = new List <DataModel.TaskInfoV3_1>()
                        {
                            obj
                        }, Type = key
                    });
                }
                DevComponents.DotNetBar.LabelItem labelItem
                               = itemPanel1.GetItem("labelItem_" + key) as DevComponents.DotNetBar.LabelItem;
                labelItem.Text = "<b>" + m_viewModel.GetTaskTimeLineByKey(key).ToString() + "</b>";
                var item = AddButtonItem(itemContainer, obj);
                if (OpenedList.Contains(key))
                {
                    ShownTaskList.Add(item);
                }
                itemPanel1.Refresh();
            }
        }
        public void Init(DataModel.TaskInfoV3_1 task, IVX.DataModel.E_VDA_TASK_STATUS stat, int progress)
        {
            if (InvokeRequired)
            {
                this.Invoke(new Action <DataModel.TaskInfoV3_1, IVX.DataModel.E_VDA_TASK_STATUS, int>(Init), task, stat, progress);
            }
            else
            {
                this.Visible = (task != null);

                if (task != null)
                {
                    Task                  = task;
                    labelTaskId.Text      = task.TaskId.ToString();
                    labelAnalyseType.Text = "DataModel.Constant.VideoAnalyzeTypeInfo.Single(item => item.Type == task.AlgthmType).Name";
                    labelName.Text        = task.TaskName;
                    labelStartTime.Text   = task.StartTime.ToString("yyyy-MM-dd HH:mm:ss");
                    BuildTooltipBody();
                }
                labelStatus.Text = DataModel.Constant.TaskStatusInfos.Single(item => item.Status == stat).Name;
                if (m_viewModel != null)
                {
                    progressBar.Value = m_viewModel.CalcProgress(stat, progress);
                }
                else
                {
                    progressBar.Value = 0;
                }
                if (task != null)
                {
                    if (progressBar.Value < progressBar.Maximum)
                    {
                        progressBar.Text = (task.Order > 0) ? string.Format("等待排序号:{0}", task.Order) : string.Format("剩余时间:{0}", TimeSpan.FromSeconds(0 /*task.LeftTime*/));
                    }
                    else
                    {
                        progressBar.Text = "";
                    }
                }
            }
        }
Beispiel #10
0
        public void Init(DataModel.TaskInfoV3_1 task, IVX.DataModel.E_VDA_TASK_STATUS stat, int progress)
        {
            if (InvokeRequired)
            {
                this.Invoke(new Action <DataModel.TaskInfoV3_1, IVX.DataModel.E_VDA_TASK_STATUS, int>(Init), task, stat, progress);
            }
            else
            {
                this.Visible = (task != null);

                if (task != null)
                {
                    Task                  = task;
                    labelTaskId.Text      = task.TaskId.ToString();
                    labelAnalyseType.Text = "DataModel.Constant.VideoAnalyzeTypeInfo.Single(item => item.Type == task.AlgthmType).Name";
                    labelName.Text        = task.ToString();
                    labelCameraId.Text    = "";
                    BuildTooltipBody();
                }
                labelStatus.Text = DataModel.Constant.TaskStatusInfos.Single(item => item.Status == stat).Name;
                if (stat == E_VDA_TASK_STATUS.E_TASK_STATUS_ANALYSE_SUSPEND)
                {
                    reflectionImage1.Image   = Properties.Resources.播放1;
                    reflectionImage1.Enabled = true;
                    this.toolTip1.SetToolTip(this.reflectionImage1, "继续分析");
                }
                else if (stat == E_VDA_TASK_STATUS.E_TASK_STATUS_ANALYSE_EXECUTING)
                {
                    reflectionImage1.Image   = Properties.Resources.暂停1;
                    reflectionImage1.Enabled = true;
                    this.toolTip1.SetToolTip(this.reflectionImage1, "暂停分析");
                }
                else
                {
                    reflectionImage1.Image = null; reflectionImage1.Enabled = false;
                }
            }
        }
        public string GetTaskTimeLineKeyValue(DataModel.TaskInfoV3_1 item)
        {
            string type = CalcTimelineType(item.StartTime);

            return(type);
        }
 public FormExportVideo(DataModel.TaskInfoV3_1 task)
 {
     InitializeComponent();
     ucExportVideo1.Task  = task;
     ucExportVideo1.OnOK += ucExportVideo1_OnOK;
 }
Beispiel #13
0
 public FormSingleRealtimeTask(DataModel.TaskInfoV3_1 task)
 {
     InitializeComponent();
     m_task = task;
     //buttonItem1.Enabled = task.AlgthmType != E_VIDEO_ANALYZE_TYPE.E_ANALYZE_BRIEAF;
 }
 public FormPlayRealtime(DataModel.TaskInfoV3_1 task)
 {
     InitializeComponent();
     ucPlayHistory1.Task = task;
 }