mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-15 17:27:56 +00:00
Fix filename for generic archive exporting
This commit is contained in:
parent
57c1af7022
commit
d2db5c1c68
7 changed files with 4 additions and 28 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -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)
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue