Program.cs 898 B

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Threading.Tasks;
  6. using System.Windows.Forms;
  7. namespace SheepSheep
  8. {
  9. static class Program
  10. {
  11. /// <summary>
  12. /// 应用程序的主入口点。
  13. /// </summary>
  14. [STAThread]
  15. static void Main()
  16. {
  17. releaseDLL();
  18. Application.EnableVisualStyles();
  19. Application.SetCompatibleTextRenderingDefault(false);
  20. Application.Run(new Form1());
  21. }
  22. private static void releaseDLL() {
  23. byte[] dll = global::SheepSheep.Properties.Resources.GetTokenFromWechat;
  24. string path = Application.StartupPath + @"\GetTokenFromWechat.dll";
  25. using (FileStream fs = new FileStream(path, FileMode.Create)) {
  26. fs.Write(dll, 0, dll.Length);
  27. }
  28. }
  29. }
  30. }