Exemplo n.º 1
0
        public bool Equals(LayoutQuery other)
        {
            LayoutQuery query1 = this;
            LayoutQuery query2 = other;

            if (query1.MaxHeight != query2.MaxHeight)
            {
                return(false);
            }
            if (query1.MaxWidth != query2.MaxWidth)
            {
                return(false);
            }
            if (query1.MinScore.CompareTo(query2.MinScore) != 0)
            {
                return(false);
            }
            if (query1.MinimizesHeight() != query2.MinimizesHeight())
            {
                return(false);
            }
            if (query1.MinimizesWidth() != query2.MinimizesWidth())
            {
                return(false);
            }
            if (query1.MaximizesScore() != query2.MaximizesScore())
            {
                return(false);
            }
            return(true);
        }
Exemplo n.º 2
0
 public bool SameType(LayoutQuery other)
 {
     if (this.MinimizesWidth() != other.MinimizesWidth())
     {
         return(false);
     }
     if (this.MinimizesHeight() != other.MinimizesHeight())
     {
         return(false);
     }
     if (this.MaximizesScore() != other.MaximizesScore())
     {
         return(false);
     }
     return(true);
 }