Skip to content

Commit

Permalink
Merge pull request #2729 from cwensley/curtis/filedialog-always-show-…
Browse files Browse the repository at this point in the history
…paths-even-when-cancelled

Update FileDialog tests to always show Filename/Filenames even when cancelled
  • Loading branch information
cwensley authored Jan 24, 2025
2 parents 703d55c + 4f5a6c8 commit 20f47aa
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions test/Eto.Test/Sections/Dialogs/FileDialogSection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,7 @@ Control OpenFile()
var dialog = new OpenFileDialog();
SetAttributes(dialog);
var result = dialog.ShowDialog(ParentWindow);
if (result == DialogResult.Ok)
{
Log.Write(dialog, "Result: {0}, FileName: {1}\nFiles: {2}", result, dialog.FileName, string.Join(", ", dialog.Filenames));
}
else
Log.Write(dialog, "Result: {0}", result);
Log.Write(dialog, "Result: {0}, FileName: {1}\nFiles: {2}", result, dialog.FileName, string.Join(", ", dialog.Filenames));
};
return button;
}
Expand All @@ -120,12 +115,7 @@ Control OpenFileWithFilters()
SetAttributes(dialog);

var result = dialog.ShowDialog(ParentWindow);
if (result == DialogResult.Ok)
{
Log.Write(dialog, "Result: {0}, CurrentFilter: {1}, FileName: {2}\nFiles: {3}", result, dialog.CurrentFilter, dialog.FileName, string.Join(", ", dialog.Filenames));
}
else
Log.Write(dialog, "Result: {0}", result);
Log.Write(dialog, "Result: {0}, CurrentFilter: {1}, FileName: {2}\nFiles: {3}", result, dialog.CurrentFilter, dialog.FileName, string.Join(", ", dialog.Filenames));
};
return button;
}
Expand Down

0 comments on commit 20f47aa

Please sign in to comment.