Skip to content

Commit

Permalink
Open containing folder label
Browse files Browse the repository at this point in the history
Clickable link that shows the destination folder or file.
  • Loading branch information
THGSCST committed Aug 21, 2021
1 parent 1367965 commit 2f45000
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion HPIZ Archiver/MainForm.Designer.cs

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

12 changes: 12 additions & 0 deletions HPIZ Archiver/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ private void closeAllToolStripMenuItem_Click(object sender, EventArgs e)
SetMode(ArchiverMode.Empty);
firstStatusLabel.Text = "No files or directories opened";
secondStatusLabel.Text = string.Empty;
secondStatusLabel.IsLink = false;
progressBar.Value = 0;
TaskbarProgress.SetState(this.Handle, TaskbarProgress.ProgressState.None);
}
Expand Down Expand Up @@ -243,6 +244,7 @@ private async void toolStripExtractButton_Click(object sender, EventArgs e)
timer.Elapsed.Seconds, timer.Elapsed.Milliseconds);
progressBar.Value = progressBar.Maximum;
secondStatusLabel.Text = dialogExtractToFolder.SelectedPath;
secondStatusLabel.IsLink = true;
TaskbarProgress.FlashWindow(this.Handle, true);
SetMode(ArchiverMode.Finish);
}
Expand Down Expand Up @@ -320,6 +322,7 @@ private async void compressCheckedFilesToolStripMenuItem_Click(object sender, Ev
timer.Elapsed.Seconds, timer.Elapsed.Milliseconds);
progressBar.Value = progressBar.Maximum;
secondStatusLabel.Text = dialogSaveHpi.FileName;
secondStatusLabel.IsLink = true;
TaskbarProgress.FlashWindow(this.Handle, true);
SetMode(ArchiverMode.Finish);
}
Expand Down Expand Up @@ -405,6 +408,7 @@ private async void mergeRepackCheckedFilesToolStripMenuItem_Click(object sender,
firstStatusLabel.Text = String.Format("Done! Elapsed time: {0}h {1}m {2}s {3}ms", timer.Elapsed.Hours, timer.Elapsed.Minutes,
timer.Elapsed.Seconds, timer.Elapsed.Milliseconds);
secondStatusLabel.Text = dialogSaveHpi.FileName;
secondStatusLabel.IsLink = true;
TaskbarProgress.FlashWindow(this.Handle, true);
SetMode(ArchiverMode.Finish);
}
Expand Down Expand Up @@ -468,6 +472,14 @@ private void uncheckAllDuplicatesToolStripMenuItem_Click(object sender, EventArg
if (dRules != DuplicateRules.NoDuplicates)
SetRule(DuplicateRules.NoDuplicates);
}

private void secondStatusLabel_Click(object sender, EventArgs e)
{
if(secondStatusLabel.IsLink)
{
Process.Start("explorer.exe", "/select," + secondStatusLabel.Text);
}
}
}
}

Expand Down

0 comments on commit 2f45000

Please sign in to comment.