public DDSUploader(DDS file) { texture = file; }
 public DDSUploader() { texture = new DDS(); }
 public DDSUploader(DDS file)
 {
     texture = file;
 }
        private void modelListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (modelListBox.SelectedItem != null)
            {
                String itemName = (String)modelListBox.SelectedItem;

                if (Path.GetExtension(itemName) == ".msh")
                {
                    GFF tempGFF = ResourceManager.findFile <GFF>(itemName);
                    if (tempGFF != null)
                    {
                        renderer.clearOverlays();
                        renderer.overlayText(tempGFF.path);
                        renderer.showOverlays();
                        renderer.displayModel(new ModelMesh(tempGFF));
                    }
                    else
                    {
                        Console.WriteLine("Couldn't find {0}", itemName);
                    }
                }
                else if (Path.GetExtension(itemName) == ".mmh")
                {
                    GFF tempGFF = ResourceManager.findFile <GFF>(itemName);
                    if (tempGFF != null)
                    {
                        ModelHierarchy mh = new ModelHierarchy(tempGFF);
                        if (mh.loadedMesh)
                        {
                            renderer.clearOverlays();
                            renderer.overlayText(mh.mmhName);
                            renderer.showOverlays();
                            renderer.displayModel(mh.mesh);
                        }
                        else
                        {
                            Console.WriteLine("Couldn't load mesh {0} for {1}", mh.mshName, mh.mmhName);
                        }
                    }
                    else
                    {
                        Console.WriteLine("Couldn't find {0}", itemName);
                    }
                }
                else if (Path.GetExtension(itemName) == ".dds")
                {
                    try
                    {
                        DDS texture = ResourceManager.findFile <DDS>(itemName);
                        if (texture != null)
                        {
                            renderer.displayDDS(texture);
                        }
                        else
                        {
                            Console.WriteLine("Couldn't find {0}", itemName);
                        }
                    }
                    catch (NotImplementedException ex)
                    {
                        Console.WriteLine(ex.Message);
                    }
                }
                else if (Path.GetExtension(itemName) == ".mao")
                {
                    MaterialObject mao = ResourceManager.findFile <MaterialObject>(itemName);
                }
            }
        }
 public DDSUploader()
 {
     texture = new DDS();
 }