Beispiel #1
0
        private void changeIDToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int       idx = listView1.SelectedIndices[0];
            StatsForm y   = new StatsForm(Convert.ToUInt32(listView1.Items[idx].SubItems[1].Text, 16));

            if (y.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            string titid = y.ChosenID.ToString("X2");

            foreach (ListViewItem z in listView1.Items)
            {
                if (z.SubItems[1].Text != titid)
                {
                    continue;
                }
                MessageBox.Show("Error: Contains ID already");
                return;
            }
            listView1.Items[idx].SubItems[1].Text = titid;
        }
Beispiel #2
0
        void ReadFile(string file)
        {
            try
            {
                switch (VariousFunctions.ReadFileType(file))
                {
                case XboxFileType.STFS:
                {
                    LogRecord   x        = new LogRecord();
                    STFSPackage xPackage = new STFSPackage(file, x);
                    if (!xPackage.ParseSuccess)
                    {
                        return;
                    }
                    PackageExplorer xExplorer = new PackageExplorer(this);
                    xExplorer.listBox4.Items.AddRange(x.Log);
                    x.WhenLogged += new LogRecord.OnLog(xExplorer.xAddLog);
                    xExplorer.set(ref xPackage);
                    xExplorer.Show();
                }
                break;

                case XboxFileType.SVOD:
                {
                    SVODPackage hd = new SVODPackage(file, null);
                    if (!hd.IsValid)
                    {
                        return;
                    }
                    HDDGameForm frm = new HDDGameForm(hd, file, this);
                    frm.MdiParent = this;
                    frm.Show();
                }
                break;

                case XboxFileType.Music:
                {
                    MusicFile xfile = new MusicFile(file);
                    MusicView xview = new MusicView(this, file, xfile);
                    xview.MdiParent = this;
                    xview.Show();
                }
                break;

                case XboxFileType.GPD:
                {
                    GameGPD   y = new GameGPD(file, 0xFFFFFFFF);
                    GPDViewer z = new GPDViewer(y, file, this);
                    z.MdiParent = this;
                    z.Show();
                }
                break;

                case XboxFileType.FATX:
                {
                    FATXDrive xdrive = new FATXDrive(file);
                    Files.Add(file);
                    FATXBrowser y = new FATXBrowser(xdrive, file, this);
                    y.MdiParent = this;
                    y.Show();
                }
                break;

                case XboxFileType.GDF:
                {
                    StatsForm x = new StatsForm(0);
                    x.Text = "Select Deviation";
                    if (x.ShowDialog() != DialogResult.OK)
                    {
                        return;
                    }
                    GDFImage ximg = new GDFImage(file, x.ChosenID);
                    if (!ximg.Valid)
                    {
                        throw new Exception("Invalid package");
                    }
                    GDFViewer xViewer = new GDFViewer(ximg, this);
                    xViewer.MdiParent = this;
                    xViewer.Show();
                }
                break;

                default: MessageBox.Show("Error: Unknown file"); return;
                }
                Files.Add(file);
            }
            catch (Exception x) { MessageBox.Show(x.Message); }
        }
Beispiel #3
0
 private void changeIDToolStripMenuItem_Click(object sender, EventArgs e)
 {
     int idx = listView1.SelectedIndices[0];
     StatsForm y = new StatsForm(Convert.ToUInt32(listView1.Items[idx].SubItems[1].Text, 16));
     if (y.ShowDialog() != DialogResult.OK)
         return;
     string titid = y.ChosenID.ToString("X2");
     foreach (ListViewItem z in listView1.Items)
     {
         if (z.SubItems[1].Text != titid)
             continue;
         MessageBox.Show("Error: Contains ID already");
         return;
     }
     listView1.Items[idx].SubItems[1].Text = titid;
 }
Beispiel #4
0
        void ReadFile(string file)
        {
            try
            {
                switch (VariousFunctions.ReadFileType(file))
                {
                    case XboxFileType.STFS:
                        {
                            LogRecord x = new LogRecord();
                            STFSPackage xPackage = new STFSPackage(file, x);
                            if (!xPackage.ParseSuccess)
                                return;
                            PackageExplorer xExplorer = new PackageExplorer(this);
                            xExplorer.listBox4.Items.AddRange(x.Log);
                            x.WhenLogged += new LogRecord.OnLog(xExplorer.xAddLog);
                            xExplorer.set(ref xPackage);
                            xExplorer.Show();
                        }
                        break;

                    case XboxFileType.SVOD:
                        {
                            SVODPackage hd = new SVODPackage(file, null);
                            if (!hd.IsValid)
                                return;
                            HDDGameForm frm = new HDDGameForm(hd, file, this);
                            frm.MdiParent = this;
                            frm.Show();
                        }
                        break;

                    case XboxFileType.Music:
                        {
                            MusicFile xfile = new MusicFile(file);
                            MusicView xview = new MusicView(this, file, xfile);
                            xview.MdiParent = this;
                            xview.Show();
                        }
                        break;

                    case XboxFileType.GPD:
                        {
                            GameGPD y = new GameGPD(file, 0xFFFFFFFF);
                            GPDViewer z = new GPDViewer(y, file, this);
                            z.MdiParent = this;
                            z.Show();
                        }
                        break;

                    case XboxFileType.FATX:
                        {
                            FATXDrive xdrive = new FATXDrive(file);
                            Files.Add(file);
                            FATXBrowser y = new FATXBrowser(xdrive, file, this);
                            y.MdiParent = this;
                            y.Show();
                        }
                        break;

                    case XboxFileType.GDF:
                        {
                            StatsForm x = new StatsForm(0);
                            x.Text = "Select Deviation";
                            if (x.ShowDialog() != DialogResult.OK)
                                return;
                            GDFImage ximg = new GDFImage(file, x.ChosenID);
                            if (!ximg.Valid)
                                throw new Exception("Invalid package");
                            GDFViewer xViewer = new GDFViewer(ximg, this);
                            xViewer.MdiParent = this;
                            xViewer.Show();
                        }
                        break;

                    default: MessageBox.Show("Error: Unknown file"); return;
                }
                Files.Add(file);
            }
            catch (Exception x) { MessageBox.Show(x.Message); }
        }