ClassicFileOpenDialog.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using System.Windows.Forms;
  2. namespace PaintDotNet.SystemLayer
  3. {
  4. public sealed class ClassicFileOpenDialog : ClassicFileDialog, IFileOpenDialog
  5. {
  6. private OpenFileDialog OpenFileDialog
  7. {
  8. get
  9. {
  10. return this.FileDialog as OpenFileDialog;
  11. }
  12. }
  13. public bool CheckFileExists
  14. {
  15. get
  16. {
  17. return this.OpenFileDialog.CheckFileExists;
  18. }
  19. set
  20. {
  21. this.OpenFileDialog.CheckFileExists = value;
  22. }
  23. }
  24. public bool Multiselect
  25. {
  26. get
  27. {
  28. return this.OpenFileDialog.Multiselect;
  29. }
  30. set
  31. {
  32. this.OpenFileDialog.Multiselect = value;
  33. }
  34. }
  35. public string[] FileNames
  36. {
  37. get
  38. {
  39. return this.OpenFileDialog.FileNames;
  40. }
  41. }
  42. public ClassicFileOpenDialog()
  43. : base(new System.Windows.Forms.OpenFileDialog())
  44. {
  45. }
  46. }
  47. }