public bool IsEqual(RpdChannellDumpCondition anotherCondition) { bool result = true;//изначально считаем, что условия совпадают //затем проверяем все необходимые параметры объектов, если хотя бы один не совпадает - значит объекты не совпадают if (this.HighLimit != anotherCondition.HighLimit) { result = false; } else if (this.UseHighLimit != anotherCondition.UseHighLimit) { result = false; } else if (this.LowLimit != anotherCondition.LowLimit) { result = false; } else if (this.UseLowLimit != anotherCondition.UseLowLimit) { result = false; } else if (this.UseValueAbs != anotherCondition.UseValueAbs) { result = false; } else if (this.UseLogicalAnd != anotherCondition.UseLogicalAnd) { result = false; } else if (this.ControlValue != anotherCondition.ControlValue) { result = false; } else if (this.UseControlValue != anotherCondition.UseControlValue) { result = false; } return(result); }
public RpdChannel(IRpdMeter owner, int number, string name, bool isEnabled, bool isService, TrendType type) { InitWorker(); OwnerMeter = owner; Name = name; Number = number; IsEnabled = isEnabled; IsService = isService; CurrentValue = null; Type = type; //----------------------------- Trend = new List <IDataPoint>(); IsTrendExists = false; IsTrendLoaded = false; DumpCondition = new RpdChannellDumpCondition(); //this.Start = new DateTime(); //this.Start = new DateTime(); }