public void Save(string FilePath) { if (PropertyGrid.SelectedObject is SBSurface surface) { if (FilePath.EndsWith(".dds")) { IO_DDS.Export(FilePath, surface); } else { IO_NUTEXB.Export(FilePath, surface); } } }
private SBSurface OpenFile(string FilePath) { SBSurface Surface = null; if (FilePath.EndsWith(".nutexb")) { Surface = IO_NUTEXB.Open(FilePath); } if (FilePath.EndsWith(".dds")) { Surface = IO_DDS.Import(FilePath); } return(Surface); }