Esempio n. 1
0
 void Form1_Load(object sender, EventArgs e)
 {
     LoadFileTypes();
     SelectedFiles       = new ComboItemCollection();
     this.contentBuilder = new ContentBuilder();
     this.backgroundWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundWorker_RunWorkerCompleted);
 }
        /// <summary>
        /// Initializes a new instance of <see cref="MSBuildContentBuilder"/>
        /// </summary>
        public MSBuildContentBuilder()
        {
            var assemblyPath = Assembly.GetEntryAssembly().Location;

            _tempBuildDirectory = Path.Combine(Path.GetDirectoryName(assemblyPath), (_directorySalt++).ToString());

            _importers = new ComboItemCollection
            {
                new ComboItem(".mp3", "Mp3Importer", "SongProcessor"),
                new ComboItem(".wav", "WavImporter", "SoundEffectProcessor"),
                new ComboItem(".wma", "WmaImporter", "SongProcessor"),

                new ComboItem(".bmp", "TextureImporter", "TextureProcessor"),
                new ComboItem(".jpg", "TextureImporter", "TextureProcessor"),
                new ComboItem(".png", "TextureImporter", "TextureProcessor"),
                new ComboItem(".tga", "TextureImporter", "TextureProcessor"),
                new ComboItem(".dds", "TextureImporter", "TextureProcessor"),

                new ComboItem(".spritefont", "FontDescriptionImporter", "FontDescriptionProcessor")
            };

            _secondaryImporters = new ConcurrentDictionary <string, Tuple <Func <ImporterContext, string>, List <ImporterContext> > >();

            CreateBuildProject();
        }
Esempio n. 3
0
        /// <summary>
        ///     Creates a new content builder.
        /// </summary>
        public ContentBuilder()
        {
            CreateTempDirectory();
            CreateBuildProject();
            _importers = new ComboItemCollection {
                new ComboItem(".x", "XImporter", "ModelProcessor"),
                new ComboItem(".fbx", "XmlImporter", "ModelProcessor"),

                new ComboItem(".fx", "EffectImporter", "EffectProcessor"),

                new ComboItem(".mp3", "Mp3Importer", "SongProcessor"),
                new ComboItem(".wav", "WavImporter", "SoundEffectProcessor"),
                new ComboItem(".wma", "WmaImporter", "SongProcessor"),

                new ComboItem(".bmp", "TextureImporter", "TextureProcessor"),
                new ComboItem(".jpg", "TextureImporter", "TextureProcessor"),
                new ComboItem(".png", "TextureImporter", "TextureProcessor"),
                new ComboItem(".tga", "TextureImporter", "TextureProcessor"),
                new ComboItem(".dds", "TextureImporter", "TextureProcessor"),
                new ComboItem(".dib", "TextureImporter", "TextureProcessor"),
                new ComboItem(".hdr", "TextureImporter", "TextureProcessor"),
                new ComboItem(".pfm", "TextureImporter", "TextureProcessor"),
                new ComboItem(".ppm", "TextureImporter", "TextureProcessor"),

                new ComboItem(".spritefont", "FontDescriptionImporter", "FontDescriptionProcessor")
            };
        }
Esempio n. 4
0
        private void FormMain_Load(object sender, EventArgs e)
        {
            LoadFileTypes();

            _selectedFiles  = new ComboItemCollection();
            _contentBuilder = new ContentBuilder();
            backgroundWorker.RunWorkerCompleted += backgroundWorker_RunWorkerCompleted;
        }
Esempio n. 5
0
 private void LoadFileTypes()
 {
     this.FileTypes = new ComboItemCollection();
     this.FileTypes.Add(new ComboItem("Textures", "Image Files(*.bmp;*.jpg;*.png;*.tga;*.dds)|*.bmp;*.jpg;*.png;*.tga;*.dds"));
     this.FileTypes.Add(new ComboItem("Audio", "Audio Files(*.wav;*.mp3;*.wma)|*.wav;*.mp3;*.wma"));
     this.FileTypes.Add(new ComboItem("Fonts", "SpriteFont Files(*.spritefont)|*.spritefont"));
     cboTipoArquivo.DataSource    = FileTypes;
     cboTipoArquivo.DisplayMember = "Name";
     cboTipoArquivo.ValueMember   = "Value";
     cboTipoArquivo.Refresh();
 }
Esempio n. 6
0
        private void LoadFileTypes()
        {
            _fileTypes = new ComboItemCollection {
                new ComboItem("Textures", "Image Files(*.bmp;*.jpg;*.png;*.tga;*.dds)|*.bmp;*.jpg;*.png;*.tga;*.dds"),
                new ComboItem("Audio", "Audio Files(*.wav;*.mp3;*.wma)|*.wav;*.mp3;*.wma"),
                new ComboItem("Fonts", "SpriteFont Files(*.spritefont)|*.spritefont"),
                new ComboItem("Model", "Model Files(*.fbx;*.x)|*.fbx;*.x"),
                new ComboItem("Effect", "Effect Files(*.fx)|*.fx")
            };

            cmbFileTypes.DataSource    = _fileTypes;
            cmbFileTypes.DisplayMember = "Name";
            cmbFileTypes.ValueMember   = "Value";
            cmbFileTypes.Refresh();
        }
Esempio n. 7
0
        /// <summary>
        /// Creates a new content builder.
        /// </summary>
        public ContentBuilder()
        {
            CreateTempDirectory();
            CreateBuildProject();
            Importers = new ComboItemCollection();
            //Seguindo a Ordem: Extensão, Importer, Processor

            Importers.Add(new ComboItem(".mp3", "Mp3Importer", "SongProcessor"));
            Importers.Add(new ComboItem(".wav", "WavImporter", "SoundEffectProcessor"));
            Importers.Add(new ComboItem(".wma", "WmaImporter", "SongProcessor"));

            Importers.Add(new ComboItem(".bmp", "TextureImporter", "TextureProcessor"));
            Importers.Add(new ComboItem(".jpg", "TextureImporter", "TextureProcessor"));
            Importers.Add(new ComboItem(".png", "TextureImporter", "TextureProcessor"));
            Importers.Add(new ComboItem(".tga", "TextureImporter", "TextureProcessor"));
            Importers.Add(new ComboItem(".dds", "TextureImporter", "TextureProcessor"));

            Importers.Add(new ComboItem(".spritefont", "FontDescriptionImporter", "FontDescriptionProcessor"));
        }