/// <summary> /// Formats the methods used for a given pollutant or waste. Notice that each of these can have multiple methods reported /// Each method will be seperated by linebreaks to be uused in tooltips ( ) /*public static string MethodFormatToolTip(string typeCodes, string designations, bool confidential) * { * return format(typeCodes, designations, confidential, " "); * }*/ /// <summary> /// formats the methods used /// </summary> private static string format(string typeCodes, string designations, bool confidential, string delimiter) { string result = string.Empty; string[] designationSplit = null; string[] typecodeSplit = null; //designations will never be given without type codes. if (String.IsNullOrEmpty(typeCodes)) { return(ConfidentialFormat.Format(null, confidential)); } else { typecodeSplit = typeCodes.Split(DELIMITER, StringSplitOptions.None); if (!String.IsNullOrEmpty(designations)) { designationSplit = designations.Split(DELIMITER, StringSplitOptions.None); } for (int i = 0; i < typecodeSplit.Length; i++) { string typeCode = typecodeSplit[i]; string designation = designationSplit != null ? designationSplit[i] : null; if (!String.IsNullOrEmpty(typeCode)) { //CEN/ISO is removed as this is also part of the designation if (!typeCode.ToUpper().Equals("CEN/ISO")) { result += String.Format("<abbr title=\"{0}\"> {1} </abbr>", LOVResources.MethodTypeName(typeCode), typeCode); } if (!String.IsNullOrEmpty(designation)) { result += " " + String.Format("<span title=\"{0}\">{0}</span>", designation); } result += delimiter; } } } return(result); }