Loader.Config.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // ReSharper disable once CheckNamespace
  2. using System.Reflection;
  3. using System.Windows.Forms;
  4. namespace Loader
  5. {
  6. static partial class Program
  7. {
  8. // ReSharper disable RedundantEmptyObjectOrCollectionInitializer
  9. private static readonly PackedFileEntry[] PackedFiles = {
  10. //_C(PackedFileEntries)
  11. };
  12. // ReSharper restore RedundantEmptyObjectOrCollectionInitializer
  13. [System.STAThread]
  14. private static void Main(string[] args)
  15. {
  16. Application.EnableVisualStyles();
  17. if ((bool)typeof(NativeWindow).InvokeMember("AnyHandleCreated", BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.GetProperty, null, null, null) == false)
  18. Application.SetCompatibleTextRenderingDefault(false);
  19. RealMain(args);
  20. }
  21. private static void Init()
  22. {
  23. _targetAssemblyName = "_C(TargetAssemblyName)";
  24. _targetFileName = "_C(TargetFileName)";
  25. _packageLength = _C(PackageLength);
  26. _compressLibrary = _C(CompressLibrary);
  27. _C(InitCode);
  28. }
  29. private static byte[] DecompressData(byte[] data)
  30. {
  31. return (byte[])_C(Decompress)(data);
  32. }
  33. }
  34. }