Exemplo n.º 1
0
        /// <summary>
        /// Used for sorting and follows the image specification
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public int CompareTo(object obj)
        {
            if (obj is CImage)
            {
                CImage other = obj as CImage;
                int    res   = Type.CompareTo(other.Type);
                return(res != 0 ? res : ResourcesString.CompareTo(other.ResourcesString));
            }

            return(0);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Method to compare two CImage object to check if the are "the same"
 /// </summary>
 /// <param name="obj">Other object</param>
 /// <returns>True if the objects can be considered "the same"</returns>
 public override bool Equals(object obj)
 {
     if (obj is CImage)
     {
         CImage temp = obj as CImage;
         return(ResourcesString.Equals(temp.ResourcesString) && Type.Equals(temp.Type));
     }
     else
     {
         return(false);
     }
 }