FileIO.cs 557 B

12345678910111213141516171819202122232425
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Diagnostics;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace Shared.Helpers
  8. {
  9. public static class FileIO
  10. {
  11. public static void OpenScript(string scriptPath, bool useShellExecutable)
  12. {
  13. Process p = new()
  14. {
  15. StartInfo = new ProcessStartInfo(scriptPath)
  16. {
  17. UseShellExecute = useShellExecutable
  18. }
  19. };
  20. p.Start();
  21. }
  22. }
  23. }