Example #1
0
        /// <summary> Build the information to display about the street, depending on what
        /// values are present in the Strongly typed street datarow </summary>
        /// <param name="thisStreet"> Strongly typed street datarow </param>
        /// <returns> text string (non-HTML) </returns>
        private string street_display(Map_Streets_DataSet.StreetsRow thisStreet)
        {
            // Start the return
            StringBuilder html = new StringBuilder(5000);

            // If there is a start and end streets, start with that
            if ((!thisStreet.IsStartAddressNull()) && (thisStreet.StartAddress > 0) && (!thisStreet.IsEndAddressNull()) && (thisStreet.EndAddress > 0))
            {
                // Add this to the string
                html.Append(thisStreet.StartAddress + " - " + thisStreet.EndAddress);
            }

            // Add segment info if there is some
            if ((!thisStreet.IsSegmentDescriptionNull()) && (thisStreet.SegmentDescription.Length > 0))
            {
                // If there is already start and end info, add a comma
                if (html.Length > 0)
                {
                    html.Append(", ");
                }

                // Add this segment info
                html.Append(thisStreet.SegmentDescription);
            }

            // Return this built string
            return(html.ToString());
        }