示例#1
0
 public SplashTechniqueControlDatum(SplashTechnique technique, SplashUserControl control)
 {
     Name            = technique.Name;
     Technique       = technique;
     Control         = control;
     Control.Visible = false;
 }
示例#2
0
        public byte[] CreateSplash(string executablePath, SplashTechnique splashTechnique, object obj)
        {
            using (var module = ModuleDefMD.Load(executablePath))
            {
                var moduleType = module.Types.FirstOrDefault(type => type.IsGlobalModuleType);
                if (moduleType == null)
                {
                    throw new InvalidDataException("Program does not have a global module.");
                }

                splashTechnique.Inject(moduleType, module, obj);

                using (var stream = new MemoryStream())
                {
                    module.Write(stream);
                    return(stream.ToArray());
                }
            }
        }