Esempio n. 1
0
        public static Icon GetDefaultFolderIcon(Configuration config)
        {
            Icon result = new Icon();
            result._config = config;
            result.LoadData(config["PG_SPAWFM_FILETYPES_ICON_FOLDER"].XmlNode.FirstChild);

            return result;
        }
Esempio n. 2
0
 public static Icon GetFileIcon(Configuration config, string filename)
 {
     if (filename.Contains("."))
     {
         string ext = filename.Substring(filename.LastIndexOf(".") + 1);
         XmlNode icon_node = config["PG_SPAWFM_FILETYPES_ICONS"].XmlNode.SelectSingleNode("icon[extension[@value=\"" + ext + "\"]]");
         if (icon_node != null)
         {
             Icon result = new Icon();
             result._config = config;
             result.LoadData(icon_node);
             return result;
         }
         else
             return Icon.GetDefaultFileIcon(config);
     }
     else
         return Icon.GetDefaultFileIcon(config);
 }