private void SetBox(MonitorBoxCtrl box, int showRow, int showColumn) { //if (box.IsEnabled && !box.IsPlayVideo) // box.PlayVideo(); if (box.IsLocal) { return; } if (box.Visible) { if (box.IsEnabled && !box.IsPlayVideo) { box.PlayVideo(); } } else if (this.IsStopHideVideo) { if (box.IsPlayVideo) { box.StopVideo(); } } }
private void DoActiveBoxChanged(MonitorBoxCtrl box) { if (box != null) { box.BorderStyle = BorderStyle.Fixed3D; } if (OnActiveBoxChanged != null) { OnActiveBoxChanged(box); } }
private void DoActiveBoxChanging(MonitorBoxCtrl box) { if (box != null) { box.BorderStyle = BorderStyle.FixedSingle; } if (OnActiveBoxChanging != null) { OnActiveBoxChanging(box); } }
public void ShowConfig() { MonitorBoxCtrl curBox = ActiveBox; if (curBox != null && !mMonitorConfigCtrl.Visible) { mMonitorConfigCtrl.Hide(); mMonitorConfigCtrl.Parent = this; mMonitorConfigCtrl.Dock = DockStyle.Fill; mMonitorConfigCtrl.Show(); mMonitorConfigCtrl.SetEditConfig(curBox.Config); mMonitorConfigCtrl.BringToFront(); } }
private bool InitBox(MonitorBoxCtrl box) { box.MonitorName = String.Format("Monitor_{0}", panel_main.Controls.Count + 1); box.BorderStyle = BorderStyle.FixedSingle; box.SystemContext = CLocalSystem.LocalSystemContext; box.ShowButton = false; box.OnMonitorStateChanged += new MonitorStateChanged(DoMonitorStateChanged); box.OnMonitorAlarm += new MonitorAlarmEvent(DoMonitorAlarm); box.OnTransactAlarm += new TransactAlarm(DoTransactAlarm); box.MouseClick += new MouseEventHandler(MonitorBoxMouseClick); box.MouseDoubleClick += new MouseEventHandler(MonitorBoxMouseDoubleClick); return(true); }
public void ShowRecord() { if (!mAlarmRecordCtrl.Visible) { MonitorBoxCtrl curBox = ActiveBox; if (curBox == null) { curBox = mBoxManager.BoxList[0]; } mAlarmRecordCtrl.Hide(); mAlarmRecordCtrl.Parent = this; mAlarmRecordCtrl.Dock = DockStyle.Fill; mAlarmRecordCtrl.QueryMonitorRecord(curBox.Config); mAlarmRecordCtrl.Show(); mAlarmRecordCtrl.BringToFront(); } }
private void DoAfterChanged(object sender, IConfig config) { MonitorBoxCtrl curBox = ActiveBox; if (curBox != null) { if (mActiveBoxMonitorState > 0) { curBox.Init(); if (mActiveBoxMonitorState > 1) { curBox.Start(); } } else if (mActiveBoxVideoState) { curBox.PlayVideo(); } } }
private void DoBeforeChanged(object sender, IConfig config) { mActiveBoxVideoState = false; mActiveBoxMonitorState = 0; MonitorBoxCtrl curBox = ActiveBox; if (curBox != null) { mActiveBoxVideoState = curBox.IsPlayVideo; if (curBox.IsInit) { mActiveBoxMonitorState = (curBox.IsActive ? 2 : 1); curBox.Cleanup(); } curBox.StopVideo(); } }