Fix filename for generic archive exporting
This commit is contained in:
parent
57c1af7022
commit
d2db5c1c68
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)
|
public static void ReplaceNode(TreeNode node, TreeNode replaceNode, TreeNode NewNode)
|
||||||
{
|
{
|
||||||
if (NewNode == null)
|
if (NewNode == null)
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -53,9 +53,11 @@ namespace Switch_Toolbox.Library
|
|||||||
|
|
||||||
public virtual void Export()
|
public virtual void Export()
|
||||||
{
|
{
|
||||||
|
string fileName = Path.GetFileName(FileName);
|
||||||
|
|
||||||
SaveFileDialog sfd = new SaveFileDialog();
|
SaveFileDialog sfd = new SaveFileDialog();
|
||||||
sfd.FileName = FileName;
|
sfd.FileName = fileName;
|
||||||
sfd.DefaultExt = Path.GetExtension(FileName);
|
sfd.DefaultExt = Path.GetExtension(fileName);
|
||||||
sfd.Filter = "Raw Data (*.*)|*.*";
|
sfd.Filter = "Raw Data (*.*)|*.*";
|
||||||
|
|
||||||
if (sfd.ShowDialog() == DialogResult.OK)
|
if (sfd.ShowDialog() == DialogResult.OK)
|
||||||
|
Loading…
Reference in New Issue
Block a user