Exemplo n.º 1
0
 public MusicView(MainForm xparent, string sfile, MusicFile mfile)
 {
     InitializeComponent();
     parent = xparent;
     xfile = mfile;
     file = sfile;
     textBoxX1.Text = mfile.Genre;
     textBoxX2.Text = mfile.Artist;
     textBoxX3.Text = mfile.Album;
     textBoxX4.Text = mfile.Song;
 }
Exemplo n.º 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); }
        }