FileController.cs 981 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System.IO;
  2. using System.Windows.Forms;
  3. using Waka.Lego.FileTool.Views;
  4. using Waka.Lego.Model;
  5. namespace Waka.Lego.FileTool.Controllers
  6. {
  7. public class FileController
  8. {
  9. public int Id { get; set; }
  10. public FileController(int id)
  11. {
  12. Id = id;
  13. }
  14. public Form FileList(string path)
  15. {
  16. LegoPlugin p = new LegoPlugin();
  17. return new FileList(Y.Utils.FileUtils.FileTool.GetFile(path));
  18. }
  19. public Form SearchFile(string file)
  20. {
  21. return new SearchFile(File.Exists(file));
  22. }
  23. public string Test()
  24. {
  25. return "yooooooo Test";
  26. }
  27. public string Test2(string name)
  28. {
  29. return "yooooooo Test2 " + name;
  30. }
  31. public string Test3(string name, ref int index, out int flag)
  32. {
  33. flag = 10;
  34. return "yooooooo Test2 " + name + " flag " + index;
  35. }
  36. }
  37. }