Skip to content

Commit

Permalink
Add copy file list option
Browse files Browse the repository at this point in the history
  • Loading branch information
TheIndra55 committed Jul 25, 2023
1 parent 2e60d87 commit cc5700a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions Yura/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
</MenuItem>
<MenuItem Header="_Tools">
<MenuItem Header="Deep search" Command="Search"></MenuItem>
<MenuItem Header="Copy file list" Click="CopyFileList_Click"></MenuItem>
</MenuItem>
<MenuItem Header="Settings" Click="SettingsCommand_Executed"></MenuItem>
</Menu>
Expand Down
17 changes: 17 additions & 0 deletions Yura/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,23 @@ private void SearchCommand_Executed(object sender, ExecutedRoutedEventArgs e)
searchWindow.Show();
}

private void CopyFileList_Click(object sender, RoutedEventArgs e)
{
if (_bigfile == null)
{
return;
}

var output = new StringBuilder();

foreach (var file in _bigfile.Records)
{
output.AppendLine($"{file.Hash:X8}\t{file.Size}\t{_bigfile.GetSpecialisationMask(file):X}\t{file.Name}");
}

Clipboard.SetText(output.ToString());
}

private void CloseCommand_Executed(object sender, ExecutedRoutedEventArgs e)
{
Close();
Expand Down

0 comments on commit cc5700a

Please sign in to comment.