public Frm_ComplexScreenDisplay(UC_ComplexScreenLayout complexScreenInfo, ClickLinkLabelType hightLightType) { InitializeComponent(); _complexScreenInfo = complexScreenInfo; _curHightLightType = hightLightType; _complexScreenInfo.Parent = this.dbfPanel_ComplexScreenDisplay; _complexScreenInfo.Dock = DockStyle.Fill; }
/// <summary> /// ��ʼ�����м�ص���ʱ���� /// </summary> private void InitAllVariables() { #region ��ʼ������ _curHightLightType = ClickLinkLabelType.None; _curFaultInfo = new MonitorErrData(); _curAlarmInfo = new MonitorErrData(); _tempStatisInfo = new TempAndHumiStatisticsInfo(); _humiStatisInfo = new TempAndHumiStatisticsInfo(); _curScanBoardIndex = -1; _totalFanSwitchCount = 0; _totalPowerSwitchCount = 0; //_scanCntOfInfoValid = 0; //_curMinTempValue = 0; //_curMaxTempValue = 0; //_curMinHumidityValue = 0; //_curMaxHumidityValue = 0; //_curTotalTemp = 0; //_curTotalHumidity = 0; //_curScreenTempList.Clear(); //_curScreenHumidityList.Clear(); _curTempMaxMinIndexInfo.MaxSBIndexList.Clear(); _curTempMaxMinIndexInfo.MinSBIndexList.Clear(); _curHumiMaxMinIndexInfo.MaxSBIndexList.Clear(); _curHumiMaxMinIndexInfo.MinSBIndexList.Clear(); #endregion }
/// <summary> /// ��ʾ������Сֵ���� /// </summary> /// <param name="clickType"></param> public void ShowMaxMinRow(ClickLinkLabelType clickType) { _curHightLightType = clickType; if (clickType == ClickLinkLabelType.None) { //��ʾ����ΪNone return; } this.dbfDataGridView_ComplexScreenInfo.Refresh(); #region ���õ�ǰ��ʾ�� int rowIndex = 0; if (_curHightLightType == ClickLinkLabelType.MaxValue) { if (_curType == MonitorDisplayType.Temperature) { if (_curTempMaxMinIndexInfo != null && _curTempMaxMinIndexInfo.MaxSBIndexList != null && _curTempMaxMinIndexInfo.MaxSBIndexList.Count > 0) { //��ʾ�¶����ֵ�ĵ�һ���� rowIndex = _curTempMaxMinIndexInfo.MaxSBIndexList[0]; if (rowIndex < dbfDataGridView_ComplexScreenInfo.RowCount) { dbfDataGridView_ComplexScreenInfo.CurrentCell = dbfDataGridView_ComplexScreenInfo[0, rowIndex]; } } } else if (_curType == MonitorDisplayType.Humidity) { if (_curHumiMaxMinIndexInfo != null && _curHumiMaxMinIndexInfo.MaxSBIndexList != null && _curHumiMaxMinIndexInfo.MaxSBIndexList.Count > 0) { //��ʾʪ�����ֵ�ĵ�һ���� rowIndex = _curHumiMaxMinIndexInfo.MaxSBIndexList[0]; if (rowIndex < dbfDataGridView_ComplexScreenInfo.RowCount) { dbfDataGridView_ComplexScreenInfo.CurrentCell = dbfDataGridView_ComplexScreenInfo[0, rowIndex]; } } } } else { if (_curType == MonitorDisplayType.Temperature) { if (_curTempMaxMinIndexInfo != null && _curTempMaxMinIndexInfo.MinSBIndexList != null && _curTempMaxMinIndexInfo.MinSBIndexList.Count > 0) { //��ʾ�¶���Сֵ�ĵ�һ���� rowIndex = _curTempMaxMinIndexInfo.MinSBIndexList[0]; if (rowIndex < dbfDataGridView_ComplexScreenInfo.RowCount) { dbfDataGridView_ComplexScreenInfo.CurrentCell = dbfDataGridView_ComplexScreenInfo[0, rowIndex]; } } } else if (_curType == MonitorDisplayType.Humidity) { if (_curHumiMaxMinIndexInfo != null && _curHumiMaxMinIndexInfo.MinSBIndexList != null && _curHumiMaxMinIndexInfo.MinSBIndexList.Count > 0) { //��ʾʪ����Сֵ�ĵ�һ���� rowIndex = _curHumiMaxMinIndexInfo.MinSBIndexList[0]; if (rowIndex < dbfDataGridView_ComplexScreenInfo.RowCount) { dbfDataGridView_ComplexScreenInfo.CurrentCell = dbfDataGridView_ComplexScreenInfo[0, rowIndex]; } } } } #endregion }
/// <summary> /// ˢ�����н��տ�����Ϣ /// </summary> public void InvalidateAllScanBoardInfo() { _curHightLightType = ClickLinkLabelType.None; int nCount = _curAllScanBoardMonitorInfList.Count; if (dbfDataGridView_ComplexScreenInfo.RowCount > nCount) { //�Ƴ�������� int nDiffCount = dbfDataGridView_ComplexScreenInfo.RowCount - nCount; for (int i = 0; i < nDiffCount; i++) { dbfDataGridView_ComplexScreenInfo.Rows.RemoveAt(0); } } else if (dbfDataGridView_ComplexScreenInfo.RowCount < nCount) { //�������� dbfDataGridView_ComplexScreenInfo.RowCount = nCount; } //����ͷ��ʾ�������ַ��� dbfDataGridView_ComplexScreenInfo.Columns[0].HeaderText = CommonStaticValue.DisplayTypeStr[(int)_curType]; //TODO ˢ�������ж�Ӧ�Ľ��տ���Ϣ UpdateAllScanBoardInfo(); }
/// <summary> /// ����������� /// </summary> public void ClearAllMonitorInfo() { if (_customToolTip != null) { _customToolTip.Close(); _customToolTip.Dispose(); } _curHightLightType = ClickLinkLabelType.None; _allScanBoardMonitorDataIsValid = false; _curAllScanBoardMonitorInfList.Clear(); InitAllVariables(); }
public ClickMaxMinValueEventArgs(ClickLinkLabelType type) { _type = type; }