Skip to content

Commit

Permalink
added last used folder button
Browse files Browse the repository at this point in the history
  • Loading branch information
snjo committed Dec 22, 2023
1 parent 8f802b7 commit ef4e265
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
13 changes: 13 additions & 0 deletions IcoMerge/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 25 additions & 1 deletion IcoMerge/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private void LoadFiles_Click(object sender, EventArgs e)

private void buttonUnpackICO_Click(object sender, EventArgs e)
{

DialogResult result = folderBrowserDialog1.ShowDialog();
if (result == DialogResult.OK)
{
Expand All @@ -58,4 +58,28 @@ private void buttonUnpackICO_Click(object sender, EventArgs e)
}

}

private void button2_Click(object sender, EventArgs e)
{
BrowseFolderInExplorer(folderBrowserDialog1.SelectedPath);
}

public string BrowseFolderInExplorer(string folder)
{
if (folder.Length < 1)
{
folder = ".";
}
if (Directory.Exists(folder))
{
Debug.WriteLine("Opening folder: " + folder);
Process.Start(new ProcessStartInfo() { FileName = folder, UseShellExecute = true });
}
else
{
Debug.WriteLine("Can't open folder " + folder);
}

return folder;
}
}

0 comments on commit ef4e265

Please sign in to comment.