Skip to content

Commit

Permalink
added copy to clipboard functionality for hash result
Browse files Browse the repository at this point in the history
  • Loading branch information
bam-t committed May 2, 2022
1 parent 5cadaed commit 24c78e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions HashTools/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
VerticalAlignment="Top"
Background="Transparent"
BorderThickness="0"
Click="btn_copyFileHash_Click"
ToolTip="Copy File Hash"
Visibility="Hidden">
<Viewbox>
Expand Down
6 changes: 6 additions & 0 deletions HashTools/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,12 @@ private async void btn_verifyHash_Click(object sender, RoutedEventArgs e)
toggleProgressStatus(false); // hide progress bar
}

private void btn_copyFileHash_Click(object sender, RoutedEventArgs e)
{
if (!string.IsNullOrWhiteSpace(txtblk_hashResult.Text))
Clipboard.SetText(txtblk_hashResult.Text);
}

void toggleButtonStatus(bool isEnabled)
{
btn_browseFile.IsEnabled = isEnabled;
Expand Down

0 comments on commit 24c78e7

Please sign in to comment.