예제 #1
0
        /// <summary>
        /// Returns true if ResponseTravelTimeStatistics instances are equal
        /// </summary>
        /// <param name="other">Instance of ResponseTravelTimeStatistics to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ResponseTravelTimeStatistics other)
        {
            if (other is null) return false;
            if (ReferenceEquals(this, other)) return true;

            return 
                (
                    Min == other.Min ||
                    
                    Min.Equals(other.Min)
                ) && 
                (
                    Max == other.Max ||
                    
                    Max.Equals(other.Max)
                ) && 
                (
                    Mean == other.Mean ||
                    
                    Mean.Equals(other.Mean)
                ) && 
                (
                    Median == other.Median ||
                    
                    Median.Equals(other.Median)
                );
        }
예제 #2
0
        void price_changed(object sender, PropertyChangedEventArgs e)
        {
            double d;

            if (!(double.TryParse(Max, out d)) && !Max.Equals(""))
            {
                Thickness myThickness = new Thickness(2, 2, 2, 2);
                max_box.BorderBrush     = Brushes.Red;
                max_box.BorderThickness = myThickness;
            }
            else
            {
                Thickness myThickness = new Thickness(1, 1, 1, 1);
                max_box.BorderBrush     = Brushes.Black;
                max_box.BorderThickness = myThickness;
            }
            if (!(double.TryParse(Min, out d)) && !Min.Equals(""))
            {
                Thickness myThickness = new Thickness(2, 2, 2, 2);
                min_box.BorderBrush     = Brushes.Red;
                min_box.BorderThickness = myThickness;
            }
            else
            {
                Thickness myThickness = new Thickness(1, 1, 1, 1);
                min_box.BorderBrush     = Brushes.Black;
                min_box.BorderThickness = myThickness;
            }
        }
예제 #3
0
        public override bool Equals(object o)
        {
            if (this == o) {
                return true;
            }

            if (o == null || GetType() != o.GetType()) {
                return false;
            }

            var that = (StringRange) o;

            if (_hashCode != that._hashCode) {
                return false;
            }

            if (Max != null ? !Max.Equals(that.Max) : that.Max != null) {
                return false;
            }

            if (Min != null ? !Min.Equals(that.Min) : that.Min != null) {
                return false;
            }

            return true;
        }
예제 #4
0
        public bool Equals(Bucket other)
        {
            if (other == null)
            {
                return(false);
            }

            return(Min.Equals(other.Min) && Max.Equals(other.Max));
        }
        /// <inheritdoc />
        public bool Equals(AxisAlignedBoundingBox other)
        {
            if (other == null)
            {
                return(false);
            }

            return(Min.Equals(other.Min) && Max.Equals(other.Max));
        }
예제 #6
0
    public bool Equals(MRect?other)
    {
        if (other is null)
        {
            return(false);
        }

        return(Min.Equals(other.Min) && Max.Equals(other.Max));
    }
예제 #7
0
        public bool Equals(ClosedInterval <T> other)
        {
            if (other == null)
            {
                return(false);
            }

            return(Min.Equals(other.Min) && Max.Equals(other.Max));
        }
예제 #8
0
        public bool Equals(Limits <T> limits)
        {
            if (limits == null)
            {
                return(false);
            }

            return(Min.Equals(limits.Min) && Max.Equals(limits.Max));
        }
예제 #9
0
파일: Box.cs 프로젝트: sungaoyong/ProSuite
        public override bool Equals(object obj)
        {
            var cmpr = obj as Box;

            if (cmpr == null)
            {
                return(false);
            }

            return(Min.Equals(cmpr.Min) && Max.Equals(cmpr.Max));
        }
예제 #10
0
 public bool Equals(MeasureRange other)
 {
     if (IsEmpty && other.IsEmpty)
     {
         return(true);
     }
     if (IsEmpty || other.IsEmpty)
     {
         return(false);
     }
     return(Min.Equals(other.Min) && Max.Equals(other.Max));
 }
예제 #11
0
 public bool Equals(Rect other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     if (Ps.Count != other.Ps.Count)
     {
         return(false);
     }
     for (int i = 0; i < Ps.Count; ++i)
     {
         var mine   = Ps[i];
         var theirs = other.Ps[i];
         if (!Equals(mine, theirs))
         {
             return(false);
         }
     }
     if (Ls.Count != other.Ls.Count)
     {
         return(false);
     }
     for (int i = 0; i < Ls.Count; ++i)
     {
         var mine   = Ls[i];
         var theirs = other.Ls[i];
         if ((mine == null) != (theirs == null) || (mine != null && Math.Abs((double)mine - (double)theirs) >= 1E-06))
         {
             return(false);
         }
     }
     if (LLs.Count != other.LLs.Count)
     {
         return(false);
     }
     for (int i = 0; i < LLs.Count; ++i)
     {
         var mine   = LLs[i];
         var theirs = other.LLs[i];
         if (Math.Abs(mine - theirs) >= 1E-06)
         {
             return(false);
         }
     }
     return(Min.Equals(other.Min) &&
            Max.Equals(other.Max)
            );
 }
예제 #12
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (obj == this)
            {
                return(true);
            }
            var o = obj as DataRange;

            return(o != null && Min.Equals(o.Min) && Max.Equals(o.Max));
        }
예제 #13
0
 public bool Equals(PriceRange <T> other)
 {
     if (other == null)
     {
         return(false);
     }
     if (!Min.Equals(other.Min))
     {
         return(false);
     }
     if (!Max.Equals(other.Max))
     {
         return(false);
     }
     return(true);
 }
예제 #14
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is Range other &&
                   ((Min == null && other.Min == null) || (Min?.Equals(other.Min) == true)) &&
                   ((Max == null && other.Max == null) || (Max?.Equals(other.Max) == true)));
        }
예제 #15
0
        public bool Equals(Zone other)
        {
            if (other == null)
            {
                return(false);
            }

            return(Name.Equals(other.Name) &&
                   Min.Equals(other.Min) &&
                   Max.Equals(other.Max) &&
                   Type.Equals(other.Type) &&
                   Level.Equals(other.Level) &&
                   ZoneInfoDay.Equals(other.ZoneInfoDay) &&
                   ZoneInfoNight.Equals(other.ZoneInfoNight) &&
                   ChildZoneIndex.Equals(other.ChildZoneIndex) &&
                   ParentZoneIndex.Equals(other.ParentZoneIndex) &&
                   NextZoneIndex.Equals(other.NextZoneIndex));
        }
예제 #16
0
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }

            if (!(obj is SupportFilterSpecParamRange))
            {
                return(false);
            }

            var other = (SupportFilterSpecParamRange)obj;

            if (!base.Equals(other))
            {
                return(false);
            }

            return(Min.Equals(other.Min) &&
                   Max.Equals(other.Max));
        }
예제 #17
0
        /// <summary>
        /// Returns true if ZoneRange instances are equal
        /// </summary>
        /// <param name="other">Instance of ZoneRange to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ZoneRange other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Min == other.Min ||
                     Min != null &&
                     Min.Equals(other.Min)
                     ) &&
                 (
                     Max == other.Max ||
                     Max != null &&
                     Max.Equals(other.Max)
                 ));
        }
예제 #18
0
 public bool Equals(Bucket other)
 {
     return(Min.Equals(other?.Min) && Max.Equals(other?.Max));
 }
예제 #19
0
 private bool Equals(Damage other)
 {
     return Min.Equals(other.Min) && Max.Equals(other.Max);
 }
예제 #20
0
파일: Bounds.cs 프로젝트: bmjoy/Osnowa
 public bool Equals(Bounds other)
 {
     return(Min.Equals(other.Min) && Size.Equals(other.Size));
 }
예제 #21
0
 public bool Equals(ImageSizeRange other)
 {
     return(Min.Equals(other.Min) && Max.Equals(other.Max));
 }
예제 #22
0
 public bool Equals(UnityVersionRange other) => Min.Equals(other?.Min) &&
 ((Max != null && Max.Equals(other?.Max)) ||
  (Max == null && other != null && other.Max == null));
예제 #23
0
 /// <summary>
 /// Return true if the two RangeF equals
 /// </summary>
 /// <param name="other">The other RangeF to compare with</param>
 /// <returns>True if the two RangeF equals</returns>
 public bool Equals(RangeF other)
 {
     return(Min.Equals(other.Min) && Max.Equals(other.Max));
 }
 protected bool Equals(CardMinMaxCurrent other)
 {
     return(Min.Equals(other.Min) && Max.Equals(other.Max) && Current.Equals(other.Current));
 }
예제 #25
0
 public bool Equals(Range <T> value) => Min.Equals(value.Min) && Max.Equals(value.Max);
예제 #26
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            double max, min;
            double d;

            if (Max.Equals(""))
            {
                max = double.MaxValue;
            }
            else if (!(double.TryParse(Max, out d)))
            {
                return;
            }
            else
            {
                max = d;
            }

            if (Min.Equals(""))
            {
                min = double.MinValue;
            }
            else if (!(double.TryParse(Min, out d)))
            {
                return;
            }
            else
            {
                min = d;
            }

            List <Res> l = new List <Res>( );

            listRes.Clear( );
            for (int i = 0; i < MainWindow.Resources.Len( ); i++)
            {
                WpfApp3.Res r = MainWindow.Resources.GetResourceAtI(i);

                String ek = r.eksploatisanje ? "DA" : "NE";
                String o  = r.obnovljiv ? "DA" : "NE";
                String s  = r.strateskiVazan ? "DA" : "NE";

                Regex match = new Regex(Ime, RegexOptions.IgnoreCase);
                Match mIme  = match.Match(r.ime);

                match = new Regex(Oznaka, RegexOptions.IgnoreCase);
                Match mOznaka = match.Match(r.oznaka);

                String etiketeStr = "";
                for (int j = 0; j < r.etikete.Count; j++)
                {
                    etiketeStr += r.etikete[j].oznaka + " ";
                }
                Double cena = double.Parse(r.cena);
                if (((mIme.Success && mIme.Value.Length == r.ime.Length) || Ime.Equals("")) &&
                    ((mOznaka.Success && mOznaka.Value.Length == r.oznaka.Length) || Oznaka.Equals("")) &&
                    (Tip.Equals("") || Tip.Equals(r.tip)) &&
                    cena <= max && cena >= min)
                {
                    l.Add(new Res( )
                    {
                        Ime = r.ime, Opis = r.opis, Oznaka = r.oznaka, Tip = r.tip, Slika = r.tipImg, Frekvencija = r.frekvencija, Ikonica = r.oznaka, Obnovljiv = o, Eksploatisanje = ek, StrateskiVazan = s, Mera = r.mera, Cena = r.cena, Datum = r.datum, Etikete = etiketeStr
                    });
                    listRes.Add(new Res( )
                    {
                        Ime = r.ime, Opis = r.opis, Oznaka = r.oznaka, Tip = r.tip, Slika = r.tipImg, Frekvencija = r.frekvencija, Ikonica = r.oznaka, Obnovljiv = o, Eksploatisanje = ek, StrateskiVazan = s, Mera = r.mera, Cena = r.cena, Datum = r.datum, Etikete = etiketeStr
                    });
                }
            }

            /*this.Close( );
             * var tablefil = new Table(l);
             * tablefil.ShowDialog( );*/
        }
        public override Dictionary <string, object> ToUpdate(IMemoryCache memoryCache, out BaseModel updatedElement)
        {
            Dictionary <string, object> changes = new Dictionary <string, object>();

            PropertyKey refInCache = null;

            if (Id != string.Empty)
            {
                refInCache = CacheHelper.GetPropertyKeyFromCache(memoryCache, Id);

                if (refInCache != null)
                {
                    if (!Name.Equals(refInCache.Name))
                    {
                        changes.Add("Name", Name);
                    }
                    if (!PrimitiveDataType.Equals(refInCache.PrimitiveDataType))
                    {
                        changes.Add("PrimitiveDataType", this.PrimitiveDataType.ToString());
                    }
                    if (!Category.Equals(refInCache.Category))
                    {
                        changes.Add("Category", Category);
                    }
                    if (!Description.Equals(refInCache.Description))
                    {
                        changes.Add("Description", Description);
                    }
                    if (!SpaceId.Equals(refInCache.SpaceId))
                    {
                        changes.Add("SpaceId", SpaceId);
                    }
                    if (!Scope.Equals(refInCache.Scope))
                    {
                        changes.Add("Scope", Scope.ToString());
                    }
                    if (!ValidationData.Equals(refInCache.ValidationData))
                    {
                        changes.Add("ValidationData", ValidationData);
                    }
                    if (!Min.Equals(refInCache.Min))
                    {
                        changes.Add("Min", Min);
                    }
                    if (!Max.Equals(refInCache.Max))
                    {
                        changes.Add("Max", Max);
                    }
                }
                else
                {
                    refInCache = this;

                    if (Name != null)
                    {
                        changes.Add("Name", Name);
                    }
                    changes.Add("PrimitiveDataType", this.PrimitiveDataType.ToString());
                    if (Category != null)
                    {
                        changes.Add("Category", Category);
                    }
                    if (Description != null)
                    {
                        changes.Add("Description", Description);
                    }
                    if (SpaceId != null)
                    {
                        changes.Add("SpaceId", SpaceId);
                    }
                    changes.Add("Scope", Scope.ToString());
                    if (ValidationData != null)
                    {
                        changes.Add("ValidationData", ValidationData);
                    }
                    if (Min != null)
                    {
                        changes.Add("Min", Min);
                    }
                    if (Max != null)
                    {
                        changes.Add("Max", Max);
                    }
                }
            }
            updatedElement = refInCache;
            return(changes);
        }
        /// <summary>
        /// Returns true if ConfigDescriptionParameterDTO instances are equal
        /// </summary>
        /// <param name="input">Instance of ConfigDescriptionParameterDTO to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ConfigDescriptionParameterDTO input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     Context == input.Context ||
                     (Context != null &&
                      Context.Equals(input.Context))
                     ) &&
                 (
                     DefaultValue == input.DefaultValue ||
                     (DefaultValue != null &&
                      DefaultValue.Equals(input.DefaultValue))
                 ) &&
                 (
                     Description == input.Description ||
                     (Description != null &&
                      Description.Equals(input.Description))
                 ) &&
                 (
                     Label == input.Label ||
                     (Label != null &&
                      Label.Equals(input.Label))
                 ) &&
                 (
                     Name == input.Name ||
                     (Name != null &&
                      Name.Equals(input.Name))
                 ) &&
                 (
                     Required == input.Required ||
                     (Required != null &&
                      Required.Equals(input.Required))
                 ) &&
                 (
                     Type == input.Type ||
                     (Type != null &&
                      Type.Equals(input.Type))
                 ) &&
                 (
                     Min == input.Min ||
                     (Min != null &&
                      Min.Equals(input.Min))
                 ) &&
                 (
                     Max == input.Max ||
                     (Max != null &&
                      Max.Equals(input.Max))
                 ) &&
                 (
                     Stepsize == input.Stepsize ||
                     (Stepsize != null &&
                      Stepsize.Equals(input.Stepsize))
                 ) &&
                 (
                     Pattern == input.Pattern ||
                     (Pattern != null &&
                      Pattern.Equals(input.Pattern))
                 ) &&
                 (
                     ReadOnly == input.ReadOnly ||
                     (ReadOnly != null &&
                      ReadOnly.Equals(input.ReadOnly))
                 ) &&
                 (
                     Multiple == input.Multiple ||
                     (Multiple != null &&
                      Multiple.Equals(input.Multiple))
                 ) &&
                 (
                     MultipleLimit == input.MultipleLimit ||
                     (MultipleLimit != null &&
                      MultipleLimit.Equals(input.MultipleLimit))
                 ) &&
                 (
                     GroupName == input.GroupName ||
                     (GroupName != null &&
                      GroupName.Equals(input.GroupName))
                 ) &&
                 (
                     Advanced == input.Advanced ||
                     (Advanced != null &&
                      Advanced.Equals(input.Advanced))
                 ) &&
                 (
                     Verify == input.Verify ||
                     (Verify != null &&
                      Verify.Equals(input.Verify))
                 ) &&
                 (
                     LimitToOptions == input.LimitToOptions ||
                     (LimitToOptions != null &&
                      LimitToOptions.Equals(input.LimitToOptions))
                 ) &&
                 (
                     Unit == input.Unit ||
                     (Unit != null &&
                      Unit.Equals(input.Unit))
                 ) &&
                 (
                     UnitLabel == input.UnitLabel ||
                     (UnitLabel != null &&
                      UnitLabel.Equals(input.UnitLabel))
                 ) &&
                 (
                     Options == input.Options ||
                     Options != null &&
                     Options.SequenceEqual(input.Options)
                 ) &&
                 (
                     FilterCriteria == input.FilterCriteria ||
                     FilterCriteria != null &&
                     FilterCriteria.SequenceEqual(input.FilterCriteria)
                 ));
        }
예제 #29
0
 protected bool Equals(Temp other)
 {
     return(Day.Equals(other.Day) && Min.Equals(other.Min) && Max.Equals(other.Max) && Night.Equals(other.Night) && Eve.Equals(other.Eve) && Morn.Equals(other.Morn));
 }
예제 #30
0
 /// <summary>
 /// Determines whether the specified <see cref="RangeF"/> is equal to this instance.
 /// </summary>
 /// <param name="value">The <see cref="RangeF"/> to compare with this instance.</param>
 /// <returns>
 ///     <c>true</c> if the specified <see cref="RangeF"/> is equal to this instance; otherwise, <c>false</c>.
 /// </returns>
 public bool Equals(Range value)
 {
     return(Min.Equals(value.Min) &&
            Max.Equals(value.Max));
 }