Exemplo n.º 1
0
        public int CompareTo(object obj)
        {
            //return 0;
            if (obj == null)
            {
                return(1);
            }
            PathCardN fp = (PathCardN)obj;

            if (fp.Parent == null && Parent != null)
            {
                return(-1);
            }
            if (fp.Parent != null && Parent == null)
            {
                return(1);
            }
            int i = 0;

            if (Parent != null)
            {
                i = Parent.CompareTo(fp.Parent);
            }
            return((i == 0) ? CodeN.CompareTo(fp.CodeN) : i);
        }
Exemplo n.º 2
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            if (Parent != null)
            {
                sb.Append(Parent.ToString());
            }
            sb.Append("\\");
            //if (Code > 0)
            sb.Append(CodeN.ToString());
            return(sb.ToString());
        }