Exemplo n.º 1
0
 /// <summary>
 /// Генерация стандартных превьюшек
 /// </summary>
 static void GenerateDefault()
 {
     folderPreview    = new Preview(SpriteBoy.InspectorIcons.Folder);
     imagePreview     = new Preview(SpriteBoy.InspectorIcons.Image);
     filePreview      = new Preview(SpriteBoy.InspectorIcons.File);
     modelPreview     = new Preview(SpriteBoy.InspectorIcons.Model);
     skyPreview       = new Preview(SpriteBoy.InspectorIcons.Skybox);
     spritePreview    = new Preview(SpriteBoy.InspectorIcons.Sprite);
     mapPreview       = new Preview(SpriteBoy.InspectorIcons.Map);
     animationPreview = new Preview(SpriteBoy.InspectorIcons.Animation);
     projectPreview   = new Preview(SpriteBoy.InspectorIcons.Project);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Получение превью
        /// </summary>
        /// <param name="fname">Имя файла</param>
        /// <returns>Превью</returns>
        public static Preview Get(string fname)
        {
            Preview p;
            string  ext = System.IO.Path.GetExtension(fname).ToLower();

            if (Generators.ContainsKey(ext))
            {
                p = new Preview(fname, Generators[ext]);
            }
            else
            {
                p = FileIcon;
            }
            return(p);
        }