Exemplo n.º 1
0
        public void OpenFile(string fileName)
        {
            Text = ver + " - " + fileName;
            X360IO io    = new X360IO(fileName, FileMode.Open, true);
            uint   magic = io.Reader.ReadUInt32();

            pnlContent.Controls.Clear();
            switch (magic)
            {
            case 0x00000000:
                // PDB?
                DataBaseEditor editor = new DataBaseEditor(io);
                pnlContent.Controls.Add(editor);
                break;

            case 0x53434555:
                // PUP file
                PUPFile file = new PUPFile(io);    // {AutoSize = true, BackColor = Color.Transparent};
                pnlContent.Controls.Add(file);
                break;

            case 0x53434500:
                // SCE header
                SCEEditor form1 = new SCEEditor(io);    // {AutoSize = true, BackColor = Color.Transparent};
                pnlContent.Controls.Add(form1);
                break;

            case 0xBCADADBC:
                // registry file
                RegistryEditor form = new RegistryEditor(io);    // { AutoSize = true, BackColor = Color.Transparent };
                pnlContent.Controls.Add(form);
                break;

            default:
                // unknown
                MessageBox.Show("Unknown file!");
                io.Close();
                Text = ver;
                break;
            }
        }
Exemplo n.º 2
0
 public void OpenFile(string fileName)
 {
     Text = ver + " - " + fileName;
     X360IO io = new X360IO(fileName, FileMode.Open, true);
     uint magic = io.Reader.ReadUInt32();
     pnlContent.Controls.Clear();
     switch(magic)
     {
         case 0x00000000:
             // PDB?
             DataBaseEditor editor = new DataBaseEditor(io);
             pnlContent.Controls.Add(editor);
             break;
         case 0x53434555:
             // PUP file
             PUPFile file = new PUPFile(io);// {AutoSize = true, BackColor = Color.Transparent};
             pnlContent.Controls.Add(file);
             break;
         case 0x53434500:
             // SCE header
             SCEEditor form1 = new SCEEditor(io);// {AutoSize = true, BackColor = Color.Transparent};
             pnlContent.Controls.Add(form1);
             break;
         case 0xBCADADBC:
             // registry file
             RegistryEditor form = new RegistryEditor(io);// { AutoSize = true, BackColor = Color.Transparent };
             pnlContent.Controls.Add(form);
             break;
         default:
             // unknown
             MessageBox.Show("Unknown file!");
             io.Close();
             Text = ver;
             break;
     }
 }