Esempio n. 1
0
        public Frm_ComplexScreenDisplay(UC_ComplexScreenLayout complexScreenInfo,
                                        ClickLinkLabelType hightLightType)
        {
            InitializeComponent();

            _complexScreenInfo = complexScreenInfo;
            _curHightLightType = hightLightType;

            _complexScreenInfo.Parent = this.dbfPanel_ComplexScreenDisplay;
            _complexScreenInfo.Dock   = DockStyle.Fill;
        }
        /// <summary>
        /// ��ʾ��������ݹ���ؼ�  --- ��������List<ILEDDisplayInfo>�仯ΪDictionary<string, List<ILEDDisplayInfo>>��
        ///                             keyֵΪ�������ƣ����Ҹ�������Ϣʵ��Ϊ��Ҫ��ص�������Ϣ
        /// </summary>
        public MarsScreenMonitorDataViewer()
        {
            InitializeComponent();
            CurrentFont = this.Font;
            _customToolTipFont = this.Font;
            _complexScreenFont = this.Font;
            _simpleOrStandardScreenFont = this.Font;
            _needUpdateFont = this.Font;

            _updateMonitorDataForNotUpdateDic = new Dictionary<string, Dictionary<string, ScannerMonitorData>>();
            CompeleteConfigScanBoardDisplayEvent += new EventHandler(MarsScreenMonitorDataViewer_CompeleteConfigScanBoardDisplayEvent);

            _curMonitorConfigInfo = new MonitorConfigData();
            _curAllLedScreenRectDic = new Dictionary<string, List<ScreenGridBindObj>>();
            //_physicalScreenInfo = new PhysicalDisplayInfo();
            _curTempMaxMinKeyInfo = new TempAndHumiInfo();
            _curHumiMaxMinKeyInfo = new TempAndHumiInfo();
            _tempStatisInfo = new TempAndHumiStatisticsInfo();
            _humiStatisInfo = new TempAndHumiStatisticsInfo();
            _curOperateStep = OperateStep.None;

            _indicator.BackColor = Color.White;
            _indicator.CircleColor = Color.Blue;
            _indicator.AnimationSpeed = 50;

            #region ��ʼ������ؼ�
            _complexScreenLayout = new UC_ComplexScreenLayout();
            _complexScreenLayout.Parent = panel_Display;
            _complexScreenLayout.Dock = DockStyle.Fill;
            _complexScreenLayout.ClearAllMonitorInfo();
            _complexScreenLayout.CurType = _curType;

            _statusRectangleLayout = new UC_StatusRectangleLayout();
            _statusRectangleLayout.DefaultFocusStyle.BackColor = Color.White;
            _statusRectangleLayout.DefaultFocusStyle.BoardColor = Color.Yellow;
            _statusRectangleLayout.IsCanSelect = false;
            _statusRectangleLayout.Parent = panel_Display;
            _statusRectangleLayout.Dock = DockStyle.Fill;
            //_statusRectangleLayout.BorderStyle = BorderStyle.FixedSingle;
            _statusRectangleLayout.BackColor = Color.Transparent;
            _statusRectangleLayout.ClearAllRectangularGrid();
            _statusRectangleLayout.CurType = _curType;

            _sbStatusInfoUC = new UC_StatusInfo(CommonStaticValue.SBStatusDisplayStr[0],
                                                CommonStaticValue.SBStatusDisplayStr[1],
                                                CommonStaticValue.SBStatusDisplayStr[2]);
            _sbStatusInfoUC.Parent = panel_Info;
            _sbStatusInfoUC.Dock = DockStyle.Fill;

            _fanInfoUC = new UC_SmokeFanPowerInfo(CommonStaticValue.FanDisplayStr[0], CommonStaticValue.FanDisplayStr[1]);
            _fanInfoUC.Parent = panel_Info;
            _fanInfoUC.Dock = DockStyle.Fill;

            _powerInfoUC = new UC_SmokeFanPowerInfo(CommonStaticValue.PowerDisplayStr[0], CommonStaticValue.PowerDisplayStr[1]);
            _powerInfoUC.Parent = panel_Info;
            _powerInfoUC.Dock = DockStyle.Fill;

            _smokeInfo = new UC_SmokeFanPowerInfo(CommonStaticValue.SmokeDisplayStr[0], CommonStaticValue.SmokeDisplayStr[1]);
            _smokeInfo.Parent = panel_Info;
            _smokeInfo.Dock = DockStyle.Fill;

            _tempInfoUC = new UC_TempAndHumiInfo(CommonStaticValue.TemperatureDisplayStr[0], CommonStaticValue.TemperatureDisplayStr[1],
                                                 CommonStaticValue.TemperatureDisplayStr[2], CommonStaticValue.TemperatureDisplayStr[3],
                                                 CommonStaticValue.TemperatureDisplayStr[4], CommonStaticValue.CelsiusUnit,
                                                 new ClickMaxMinValueEventHandler(ClickTempMaxMinValue));
            _tempInfoUC.Parent = panel_Info;
            _tempInfoUC.Dock = DockStyle.Fill;

            _humidityInfoUC = new UC_TempAndHumiInfo(CommonStaticValue.HumidityDisplayStr[0], CommonStaticValue.HumidityDisplayStr[1],
                                                     CommonStaticValue.HumidityDisplayStr[2], CommonStaticValue.HumidityDisplayStr[3],
                                                     CommonStaticValue.HumidityDisplayStr[4], CommonStaticValue.HUMIDITY_UNIT,
                                                     new ClickMaxMinValueEventHandler(ClickHumiMaxMinValue));
            _humidityInfoUC.Parent = panel_Info;
            _humidityInfoUC.Dock = DockStyle.Fill;

            _rowLineInfoUC = new UC_RowLineCabinetDoorInfo(CommonStaticValue.RowLineStr[0], CommonStaticValue.RowLineStr[1]);
            _rowLineInfoUC.Parent = panel_Info;
            _rowLineInfoUC.Dock = DockStyle.Fill;

            _mcStatusInfoUC = new UC_StatusInfo(CommonStaticValue.MCStatusDisplayStr[0],
                                                CommonStaticValue.MCStatusDisplayStr[1],
                                                CommonStaticValue.MCStatusDisplayStr[2]);
            _mcStatusInfoUC.Parent = panel_Info;
            _mcStatusInfoUC.Dock = DockStyle.Fill;

            _generalStatuInfoUC = new UC_RowLineCabinetDoorInfo(CommonStaticValue.GeneralStatusStr[0], CommonStaticValue.GeneralStatusStr[1]);
            _generalStatuInfoUC.Parent = panel_Info;
            _generalStatuInfoUC.Dock = DockStyle.Fill;

            _tempCorNoticeUC = new UC_TempAndHumidityCorNotice(MinTempValue, _curMonitorConfigInfo.TempAlarmThreshold,
                                                               MaxTempValue, CommonStaticValue.CelsiusUnit);
            _tempCorNoticeUC.Parent = panel_ColorMotice;
            _tempCorNoticeUC.Dock = DockStyle.Fill;

            _humidityCorNoticeUC = new UC_TempAndHumidityCorNotice(MinHumidityValue, _curMonitorConfigInfo.HumiAlarmThreshold,
                                                                   MaxHumidityValue, CommonStaticValue.HUMIDITY_UNIT);
            _humidityCorNoticeUC.Parent = panel_ColorMotice;
            _humidityCorNoticeUC.Dock = DockStyle.Fill;

            _sbStatusCorNotice = new UC_StatusCorNotice();
            _sbStatusCorNotice.Parent = panel_ColorMotice;
            _sbStatusCorNotice.Dock = DockStyle.Fill;

            _mcStatusCorNotice = new UC_StatusCorNotice();
            _mcStatusCorNotice.Parent = panel_ColorMotice;
            _mcStatusCorNotice.Dock = DockStyle.Fill;

            _smokeOrPowerCorNotice = new UC_SmokeFanPowerCorNotice(MonitorDisplayType.Smoke);
            _smokeOrPowerCorNotice.Parent = panel_ColorMotice;
            _smokeOrPowerCorNotice.Dock = DockStyle.Fill;

            _fanCorNotice = new UC_SmokeFanPowerCorNotice(MonitorDisplayType.Fan);
            _fanCorNotice.Parent = panel_ColorMotice;
            _fanCorNotice.Dock = DockStyle.Fill;

            _rowLineCorNotice = new UC_RowLineCorNotice();
            _rowLineCorNotice.Parent = panel_ColorMotice;
            _rowLineCorNotice.Dock = DockStyle.Fill;

            _generalStatusCorNotice = new UC_SmokeFanPowerCorNotice(MonitorDisplayType.GeneralSwitch);
            _generalStatusCorNotice.Parent = panel_ColorMotice;
            _generalStatusCorNotice.Dock = DockStyle.Fill;

            _statusRectangleLayout.GridMouseDoubleClick += new RectangularGridMouseEventHandler(StatusRectangleLayout_GridMouseDoubleClick);
            _statusRectangleLayout.GridMouseMove += new RectangularGridMouseEventHandler(StatusRectangleLayout_GridMouseMove);
            #endregion

            this.Disposed += new EventHandler(MarsScreenMonitorDataViewer_Disposed);
            vScrollBar_PixelLength.Value = (int)(DefaultLengthOnePixel * 100);
            vScrollBar_PixelLength_Scroll(null, null);

            _isNeedSetScaleRatio = false;
            _isHasValidMonitorInfo = false;
            //���ý����ϲ�ͬ��ʾ���Ϳؼ�������
            SetDisplayTypeControl();
            this.CurCtrlSystemMode = _curCtrlSystemMode;
        }