示例#1
0
        public override bool Equals(System.Object obj)
        {
            // If parameter is null, return false;
            if (obj == null)
            {
                return(false);
            }

            // If parameter cannot be cast to GridColumns return false.
            GridColumns that = obj as GridColumns;

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

            // Compare column sets.
            if (this.Count != that.Count)
            {
                return(false);
            }

            for (int index = 0; index < this.Count; index++)
            {
                if (this[index].OriginalPosition != that[index].OriginalPosition)
                {
                    return(false);
                }
                //also check for hidden
                if (this[index].IsHidden != that[index].IsHidden)
                {
                    return(false);
                }
            }

            // Return true if the fields match:
            return(true);
        }
示例#2
0
 public GridTemplate()
 {
     Grid = new GridColumns();
 }