internal static bool Run()
        {
            Load();

            if (RunMethod != null)
            {
                DisableCloseButton();
                int returnval = (int)RunMethod.Invoke(null, new object[0]);
                EnableCloseButton();
                MelonUtils.SetCurrentDomainBaseDirectory(MelonUtils.GameDirectory);
                return(returnval == 0);
            }

            return(false);
        }
        internal static bool Run()
        {
            Load();

            if (RunMethod != null)
            {
                IntPtr windowHandle = Process.GetCurrentProcess().MainWindowHandle;
                DisableCloseButton(windowHandle);
                int returnval = (int)RunMethod.Invoke(null, new object[0]);
                EnableCloseButton(windowHandle);
                MelonUtils.SetCurrentDomainBaseDirectory(MelonUtils.GameDirectory);
                return(returnval == 0);
            }

            return(false);
        }
        internal static void Run(AppDomain domain)
        {
            string gameDir = string.Copy(MelonUtils.GameDirectory);

            MelonUtils.SetCurrentDomainBaseDirectory(gameDir, domain);
        }