/// <summary> /// 设置新值 /// </summary> /// <param name="NewConfig"></param> public void SetValue(CConfiguration NewConfig) { this.LoginPassword = NewConfig.LoginPassword; this.ControllerPort = NewConfig.ControllerPort; this.SqlServerIP = NewConfig.SqlServerIP; this.SqlServerUser = NewConfig.SqlServerUser; this.SqlServerPassword = NewConfig.SqlServerPassword; this.TargetTemperature = NewConfig.TargetTemperature; this.TempTuneSilence = NewConfig.TempTuneSilence; this.TemperatureTuneDeadArea = NewConfig.TemperatureTuneDeadArea; this.TemperatureTuneThreshold = NewConfig.TemperatureTuneThreshold; strCDKEY = NewConfig.CDKEY; this.CDKEY_Expired = NewConfig.CDKEY_Expired; this.CDKEY_DaysLeft = NewConfig.CDKEY_DaysLeft; this.LastCureDuration = NewConfig.LastCureDuration; this.MaxCureTimeAllowed = NewConfig.MaxCureTimeAllowed; this.HVGLevel = NewConfig.HVGLevel; this.MaxCureBandServieTime = NewConfig.MaxCureBandServieTime; this.CompleteVoiceFilePrefix = NewConfig.CompleteVoiceFilePrefix; }
public override bool Equals(object obj) { CConfiguration Config = obj as CConfiguration; return ((this.LoginPassword == Config.LoginPassword) && (this.ControllerPort == Config.ControllerPort) && (this.SqlServerIP == Config.SqlServerIP) && (this.SqlServerUser == Config.SqlServerUser) && (this.SqlServerPassword == Config.SqlServerPassword) && (this.BloodType == Config.BloodType) && (this.TargetTemperature == Config.TargetTemperature) && (this.ZoneCode == Config.ZoneCode) && (this.TempTuneSilence == Config.TempTuneSilence) && (this.TemperatureTuneDeadArea == Config.TemperatureTuneDeadArea) && (this.TemperatureTuneThreshold == Config.TemperatureTuneThreshold) && (this.CDKEY == Config.CDKEY) && (this.MachineCode == Config.MachineCode) && (this.ActiveCode == Config.ActiveCode) && (this.CDKEY_DaysLeft == Config.CDKEY_DaysLeft) && (this.CDKEY_Expired == Config.CDKEY_Expired) && (this.LastCureDuration == Config.LastCureDuration) && (this.MaxCureTimeAllowed == Config.MaxCureTimeAllowed) && (this.HVGLevel == Config.HVGLevel) && (this.MaxCureBandServieTime == Config.MaxCureBandServieTime) && (this.CompleteVoiceFilePrefix == Config.CompleteVoiceFilePrefix)); }
public CConfiguration(CConfiguration Cloned) { strStationName = Cloned.StationName; strSystemUserName = Cloned.SystemUserName; strSystemIP = Cloned.SystemIP; this.ControllerPort = Cloned.ControllerPort; this.SqlServerIP = Cloned.SqlServerIP; this.SqlServerUser = Cloned.SqlServerUser; this.SqlServerPassword = Cloned.SqlServerPassword; this.BloodType = Cloned.BloodType; this.TargetTemperature = Cloned.TargetTemperature; this.ZoneCode = Cloned.ZoneCode; this.TempTuneSilence = Cloned.TempTuneSilence; this.TemperatureTuneDeadArea = Cloned.TemperatureTuneDeadArea; this.TemperatureTuneThreshold = Cloned.TemperatureTuneThreshold; strMachineCode = Cloned.MachineCode; strActiveCode = Cloned.ActiveCode; strCDKEY = Cloned.CDKEY; this.CDKEY_Expired = Cloned.CDKEY_Expired; this.CDKEY_DaysLeft = Cloned.CDKEY_DaysLeft; this.LastCureDuration = Cloned.LastCureDuration; this.MaxCureTimeAllowed = Cloned.MaxCureTimeAllowed; /* 获取设备使用时长 */ Int64 duration; using (CDatabase db = new CDatabase()) { db.GetRunDuration(out duration); this.RunningHours = duration; } this.HVGLevel = Cloned.HVGLevel; /* 返回程序版本号 */ this.AssemblyVersion = Cloned.AssemblyVersion; this.MaxCureBandServieTime = Cloned.MaxCureBandServieTime; this.CompleteVoiceFilePrefix = Cloned.CompleteVoiceFilePrefix; }