Remember last picked folder for file dialogs

pull/6/head
Miepee 5 years ago
parent ac30bb5e28
commit f61e7bc0bc

@ -84,7 +84,7 @@ namespace AM2R_ModPacker
string output; string output;
using (SaveFileDialog saveFile = new SaveFileDialog { InitialDirectory = localPath, Title = "Save Windows mod profile", Filter = "zip files (*.zip)|*.zip", AddExtension = true }) using (SaveFileDialog saveFile = new SaveFileDialog { RestoreDirectory = true, Title = "Save Windows mod profile", Filter = "zip files (*.zip)|*.zip", AddExtension = true })
{ {
if (saveFile.ShowDialog() == DialogResult.OK) if (saveFile.ShowDialog() == DialogResult.OK)
{ {
@ -101,7 +101,7 @@ namespace AM2R_ModPacker
if (linuxCheckBox.Checked) if (linuxCheckBox.Checked)
{ {
using (SaveFileDialog saveFile = new SaveFileDialog { InitialDirectory = localPath, Title = "Save Linux mod profile", Filter = "zip files (*.zip)|*.zip", AddExtension = true }) using (SaveFileDialog saveFile = new SaveFileDialog { RestoreDirectory = true, Title = "Save Linux mod profile", Filter = "zip files (*.zip)|*.zip", AddExtension = true })
{ {
if (saveFile.ShowDialog() == DialogResult.OK) if (saveFile.ShowDialog() == DialogResult.OK)
{ {
@ -568,7 +568,7 @@ namespace AM2R_ModPacker
{ {
using (OpenFileDialog fileFinder = new OpenFileDialog()) using (OpenFileDialog fileFinder = new OpenFileDialog())
{ {
fileFinder.InitialDirectory = localPath; fileFinder.RestoreDirectory = true;
fileFinder.Title = title; fileFinder.Title = title;
fileFinder.DefaultExt = extension; fileFinder.DefaultExt = extension;
fileFinder.Filter = filter; fileFinder.Filter = filter;

Loading…
Cancel
Save