Fix filename for generic archive exporting

This commit is contained in:
KillzXGaming 2019-05-28 16:46:33 -04:00
parent 57c1af7022
commit d2db5c1c68
7 changed files with 4 additions and 28 deletions

Binary file not shown.

View file

@ -163,32 +163,6 @@ namespace FirstPlugin
}
public override 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 override 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 static void ReplaceNode(TreeNode node, TreeNode replaceNode, TreeNode NewNode)
{
if (NewNode == null)

View file

@ -53,9 +53,11 @@ namespace Switch_Toolbox.Library
public virtual void Export()
{
string fileName = Path.GetFileName(FileName);
SaveFileDialog sfd = new SaveFileDialog();
sfd.FileName = FileName;
sfd.DefaultExt = Path.GetExtension(FileName);
sfd.FileName = fileName;
sfd.DefaultExt = Path.GetExtension(fileName);
sfd.Filter = "Raw Data (*.*)|*.*";
if (sfd.ShowDialog() == DialogResult.OK)