public override void LaunchEditor(FileSystem fs, File file)
        {
            var data = file.GetData();

            var ms = new MemoryStream(data);
            var modelFile = new ModelFile();
            try
            {
                modelFile.Open(ms);
            }
            finally
            {
                ms.Close();
            }

            if (modelFile.EmbeddedTextureFile != null)
            {
                ShowForm(file, modelFile.EmbeddedTextureFile);
            }
            else
            {
                MessageBox.Show("There are no embedded textures in the selected model file to edit.", "Edit",
                                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
Example #2
0
        public virtual Control GetView(File file)
        {
            var data = file.GetData();

            var ms = new MemoryStream(data);
            var modelFile = new ModelFile();
            try
            {
                modelFile.Open(ms);
            }
            finally
            {
                ms.Close();
            }

            return CreateControl(file, modelFile);
        }