Exemplo n.º 1
0
        public void SaveDisplayMonitorData(string screenSN, OneDisplayMonitorData oneDisplayData)
        {
            if (IsAllScreen(screenSN))
            {
                foreach (string key in MonitorConfig.AllDisplayMonitorSysDataDic.Keys)
                {
                    MonitorConfig.AllDisplayMonitorSysDataDic[key] = (OneDisplayMonitorData)oneDisplayData.Clone();
                    //写入库
                }
                if (MonitorConfig.MonitorUIConfig.IsDisplayMonitorInfoSame == false)
                {
                    MonitorConfig.MonitorUIConfig.IsDisplayMonitorInfoSame = true;
                    SaveMonitorUIDisplayConfig(MonitorConfig.MonitorUIConfig);
                }
            }
            else
            {
                if (MonitorConfig.MonitorUIConfig.IsDisplayMonitorInfoSame == true)
                {
                    MonitorConfig.MonitorUIConfig.IsDisplayMonitorInfoSame = false;
                    SaveMonitorUIDisplayConfig(MonitorConfig.MonitorUIConfig);
                }

                MonitorConfig.AllDisplayMonitorSysDataDic[screenSN] = (OneDisplayMonitorData)oneDisplayData.Clone();
                //写入库
            }
        }
Exemplo n.º 2
0
        public object Clone()
        {
            OneDisplayMonitorData newObj = new OneDisplayMonitorData();
            bool res = this.CopyTo(newObj);

            if (!res)
            {
                return(null);
            }
            else
            {
                return(newObj);
            }
        }
Exemplo n.º 3
0
        public bool CopyTo(object obj)
        {
            if (!(obj is OneDisplayMonitorData))
            {
                return(false);
            }
            OneDisplayMonitorData temp = (OneDisplayMonitorData)obj;

            temp.FirstSenderSN         = this.FirstSenderSN;
            temp.IsUpdateSBStatus      = this.IsUpdateSBStatus;
            temp.IsUpdateMCStatus      = this.IsUpdateMCStatus;
            temp.IsUpdateHumidity      = this.IsUpdateHumidity;
            temp.IsDisplaySBValtage    = this.IsDisplaySBValtage;
            temp.IsUpdateSmoke         = this.IsUpdateSmoke;
            temp.IsUpdateFan           = this.IsUpdateFan;
            temp.IsUpdateRowLine       = this.IsUpdateRowLine;
            temp.IsUpdateMCVoltage     = this.IsUpdateMCVoltage;
            temp.IsUpdateGeneralStatus = this.IsUpdateGeneralStatus;
            temp.MCFanInfo             = (ScanBdMonitoredParamUpdateData)this.MCFanInfo.Clone();
            temp.MCPowerInfo           = (ScanBdMonitoredPowerData)this.MCPowerInfo.Clone();
            return(true);
        }