ClassicFileOpenDialog.cs 1.2 KB

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