예제 #1
0
        /// <summary>
        /// Gets the properties text.
        /// </summary>
        /// <param name="ps">The ps.</param>
        /// <returns></returns>
        private static String GetPropertiesText(SpecialPropertySet ps)
        {
            if (ps == null)
            {
                // Not defined, oh well
                return("");
            }

            StringBuilder text = new StringBuilder();

            Wellknown.PropertyIDMap idMap = ps.PropertySetIDMap;
            Property[] props = ps.Properties;
            for (int i = 0; i < props.Length; i++)
            {
                String type    = props[i].ID.ToString(CultureInfo.InvariantCulture);
                Object typeObj = idMap.Get(props[i].ID);
                if (typeObj != null)
                {
                    type = typeObj.ToString();
                }

                String val = HelperPropertySet.GetPropertyValueText(props[i].Value);
                text.Append(type + " = " + val + "\n");
            }

            return(text.ToString());
        }
예제 #2
0
 public static String GetPropertyValueText(Object val)
 {
     if (val == null)
     {
         return("(not set)");
     }
     return(SpecialPropertySet.GetPropertyStringValue(val));
 }