diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index 1c8326cd..a1e49d2a 100644 Binary files a/.vs/Switch_Toolbox/v15/.suo and b/.vs/Switch_Toolbox/v15/.suo differ diff --git a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache index 282b697c..41eaa953 100644 Binary files a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache and b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache index 5949cf26..f9eede61 100644 Binary files a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache and b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache differ diff --git a/Switch_Toolbox_Library/Interfaces/IArchiveFile.cs b/Switch_Toolbox_Library/Interfaces/IArchiveFile.cs index 812739c1..eb17452a 100644 --- a/Switch_Toolbox_Library/Interfaces/IArchiveFile.cs +++ b/Switch_Toolbox_Library/Interfaces/IArchiveFile.cs @@ -38,8 +38,31 @@ namespace Switch_Toolbox.Library public FileType FileDataType = FileType.Default; - public virtual void Replace() { } - public virtual void Export() { } + public virtual void Replace() + { + OpenFileDialog ofd = new OpenFileDialog(); + ofd.FileName = FileName; + ofd.DefaultExt = Path.GetExtension(FileName); + ofd.Filter = "Raw Data (*.*)|*.*"; + + if (ofd.ShowDialog() == DialogResult.OK) + { + FileData = File.ReadAllBytes(ofd.FileName); + } + } + + public virtual void Export() + { + SaveFileDialog sfd = new SaveFileDialog(); + sfd.FileName = FileName; + sfd.DefaultExt = Path.GetExtension(FileName); + sfd.Filter = "Raw Data (*.*)|*.*"; + + if (sfd.ShowDialog() == DialogResult.OK) + { + File.WriteAllBytes(sfd.FileName, FileData); + } + } public string GetSize() {