示例#1
0
        //using Microsoft.VisualBasic;//requires Microsoft.VisualBasic reference
        public void CreateBootDisc(string bootFile)
        {
            // -------- Adding Boot Image Code -----
            IBootOptions bootOptions = new BootOptions();

            bootOptions.Manufacturer = "Legolash2o";

            bootOptions.Emulation         = EmulationType.EmulationNone;
            bootOptions.PlatformId        = PlatformId.PlatformX86;
            _sysImage.FreeMediaBlocks     = -1; // Enables larger-than-CD image
            _sysImage.FileSystemsToCreate = FsiFileSystems.FsiFileSystemISO9660 |
                                            FsiFileSystems.FsiFileSystemJoliet |
                                            FsiFileSystems.FsiFileSystemUDF;
            IStream bootStream;

            if (0 == SHCreateStreamOnFile(bootFile, 0x00, out bootStream))
            {
                bootOptions.AssignBootImage(bootStream);
            }

            //object bootStream;
            //bootStream = Interaction.CreateObject("ADODB.Stream", "");
            //Interaction.CallByName(bootStream, "Open", CallType.Method, null);
            //Interaction.CallByName(bootStream, "Type", CallType.Let, new object[] { 1 });
            //Interaction.CallByName(bootStream, "LoadFromFile", CallType.Method, new object[] { bootFile });
            //IStream fsStream = bootStream as IStream;
            //bootOptions.AssignBootImage(fsStream);

            _sysImage.BootImageOptions = bootOptions;
        }
示例#2
0
        public void SetBootImage(byte[] Data)
        {
            FsiStream S = (FsiStream)SHCreateMemStream(Data, (uint)Data.Length);

            BootOptions BootImageOptions = new BootOptions();

            BootImageOptions.Manufacturer = "Microsoft";
            BootImageOptions.Emulation    = EmulationType.EmulationNone;
            BootImageOptions.PlatformId   = PlatformId.PlatformX86;
            BootImageOptions.AssignBootImage(S);
            ISO.BootImageOptions = BootImageOptions;
        }
示例#3
0
文件: Boots.cs 项目: Juutis/AKJ8
    public static BootOptions GetOptions(float powerLevel)
    {
        powerLevel = Mathf.Clamp(powerLevel, 0.0f, 1.0f);
        powerLevel = powerLevel * 0.9f + (1.0f - 0.9f);
        var weights = LootUtil.getRandomWeights(4, 3f * Random.Range(powerLevel / 2.0f, powerLevel));
        var options = new BootOptions()
        {
            color = getRandomColor(),

            bonusSpeed       = GetRandomMS(weights[0]),
            hasTeleport      = GetRandomTeleport(weights[1]),
            teleportDistance = GetRandomTeleportDistance(weights[2]),
            teleportCooldown = GetTeleportCooldown(weights[3])
        };

        if (options.bonusSpeed < 0)
        {
            options.hasTeleport = true;
        }

        return(options);
    }
示例#4
0
文件: Boots.cs 项目: Juutis/AKJ8
 public void SetOptions(BootOptions options)
 {
     this.options = options;
     UpdateComponents();
 }