internal void SetValue(object value, double maxValue, double direction, string directionTextual) { bool changed = false; if ((Value == null && value != null) || (Value != null && !Value.Equals(value))) { Value = value; changed = true; } if (!MaxValue.Equals(maxValue)) { MaxValue = maxValue; changed = true; } if ((DirectionTextual == null && directionTextual != null) || (DirectionTextual != null && !DirectionTextual.Equals(directionTextual))) { DirectionTextual = directionTextual; changed = true; } if (!Direction.Equals(direction)) { Direction = direction; changed = true; } if (changed) { InvokeValueChanged(); } }
public bool Equals(NumberType other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(IsInteger == other.IsInteger && MaxValue.Equals(other.MaxValue) && MinValue.Equals(other.MinValue)); }
/// <summary> /// Returns true if RangeValidator instances are equal /// </summary> /// <param name="other">Instance of RangeValidator to be compared</param> /// <returns>Boolean</returns> public bool Equals(RangeValidator other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( MaxValue == other.MaxValue || MaxValue != null && MaxValue.Equals(other.MaxValue) ) && ( MinValue == other.MinValue || MinValue != null && MinValue.Equals(other.MinValue) )); }
/// <summary> /// Returns true if WidgetDTO instances are equal /// </summary> /// <param name="input">Instance of WidgetDTO to be compared</param> /// <returns>Boolean</returns> public bool Equals(WidgetDTO input) { if (input == null) { return(false); } return (( WidgetId == input.WidgetId || (WidgetId != null && WidgetId.Equals(input.WidgetId)) ) && ( Type == input.Type || (Type != null && Type.Equals(input.Type)) ) && ( Name == input.Name || (Name != null && Name.Equals(input.Name)) ) && ( Visibility == input.Visibility || (Visibility != null && Visibility.Equals(input.Visibility)) ) && ( Label == input.Label || (Label != null && Label.Equals(input.Label)) ) && ( Icon == input.Icon || (Icon != null && Icon.Equals(input.Icon)) ) && ( Labelcolor == input.Labelcolor || (Labelcolor != null && Labelcolor.Equals(input.Labelcolor)) ) && ( Valuecolor == input.Valuecolor || (Valuecolor != null && Valuecolor.Equals(input.Valuecolor)) ) && ( Mappings == input.Mappings || Mappings != null && Mappings.SequenceEqual(input.Mappings) ) && ( SwitchSupport == input.SwitchSupport || (SwitchSupport != null && SwitchSupport.Equals(input.SwitchSupport)) ) && ( SendFrequency == input.SendFrequency || (SendFrequency != null && SendFrequency.Equals(input.SendFrequency)) ) && ( Separator == input.Separator || (Separator != null && Separator.Equals(input.Separator)) ) && ( Refresh == input.Refresh || (Refresh != null && Refresh.Equals(input.Refresh)) ) && ( Height == input.Height || (Height != null && Height.Equals(input.Height)) ) && ( MinValue == input.MinValue || (MinValue != null && MinValue.Equals(input.MinValue)) ) && ( MaxValue == input.MaxValue || (MaxValue != null && MaxValue.Equals(input.MaxValue)) ) && ( Step == input.Step || (Step != null && Step.Equals(input.Step)) ) && ( Url == input.Url || (Url != null && Url.Equals(input.Url)) ) && ( Encoding == input.Encoding || (Encoding != null && Encoding.Equals(input.Encoding)) ) && ( Service == input.Service || (Service != null && Service.Equals(input.Service)) ) && ( Period == input.Period || (Period != null && Period.Equals(input.Period)) ) && ( Legend == input.Legend || (Legend != null && Legend.Equals(input.Legend)) ) && ( State == input.State || (State != null && State.Equals(input.State)) ) && ( Item == input.Item || (Item != null && Item.Equals(input.Item)) ) && ( LinkedPage == input.LinkedPage || (LinkedPage != null && LinkedPage.Equals(input.LinkedPage)) ) && ( Widgets == input.Widgets || Widgets != null && Widgets.SequenceEqual(input.Widgets) )); }