Example #1
0
        public override string ToString()
        {
            if (!String.IsNullOrEmpty(Name))
            {
                return(Name);
            }

            var branchName = branch == null ? "<no branch>" : branch.Name;
            var str        = GetType().Name + ": " + branchName + ", " + Chainage.ToString("g4");

            if (Length > 0)
            {
                str = GetType().Name + ": " + branchName + ", [" + Chainage.ToString("g4") + " - " + (Chainage + Length).ToString("g4") + "]";
            }
            return(str);
        }
Example #2
0
        public override string ToString()
        {
            if (!String.IsNullOrEmpty(Name))
            {
                return(Name);
            }

            var branchName = Branch == null ? "<no branch>" : Branch.Name;
            var str        = GetType().Name + ": " + branchName + ", " + Chainage.ToString("g4");

            if (Length > 0)
            {
                var endChainage = DirectionIsPositive ? Chainage + Length : Chainage - Length;
                str = GetType().Name + ": " + branchName + ", [" + Chainage.ToString("g4") + " - " + endChainage.ToString("g4") + "]";
            }
            return(str);
        }