private void Export() { bool IncludeTextureMaps = true; if (MaterialU != null) { BfresWiiU.SetMaterial(this, MaterialU, GetResFileU()); } else { BfresSwitch.SetMaterial(this, Material); } SaveFileDialog sfd = new SaveFileDialog(); sfd.Filter = "Supported Formats|*.bfmat;"; sfd.DefaultExt = ".bfmat"; sfd.FileName = Text; if (sfd.ShowDialog() == DialogResult.OK) { Export(sfd.FileName, IncludeTextureMaps); } }