Beispiel #1
0
        /// <summary>
        /// Populate a Dega movie file's header information
        /// </summary>
        public static void MMV(ref TreeView tv, ref TASMovie mmv)
        {
            Dega movie = (Dega)mmv;

            tv.Nodes.Clear();

            tv.Nodes.Add("Header");
            tv.Nodes[0].Nodes.Add("Signature:      " + movie.Header.Signature);
            tv.Nodes[0].Nodes.Add("Version:        " + movie.Header.Version.ToString());
            tv.Nodes[0].Nodes.Add("Frame Count:    " + String.Format("{0:0,0}", movie.Header.FrameCount));
            tv.Nodes[0].Nodes.Add("Rerecord Count: " + String.Format("{0:0,0}", movie.Header.RerecordCount));

            tv.Nodes.Add("Options");
            tv.Nodes[1].Nodes.Add("Movie Start:  " + movie.Options.MovieStart);
            tv.Nodes[1].Nodes.Add("Movie Timing: " + movie.Options.MovieTiming);
            tv.Nodes[1].Nodes.Add("System Type");
            tv.Nodes[1].Nodes[2].Nodes.Add("Japan:     " + movie.MMVSpecific.Japan.ToString());
            tv.Nodes[1].Nodes[2].Nodes.Add("Game Gear: " + movie.MMVSpecific.GameGear.ToString());

            tv.Nodes.Add("Metadata");
            tv.Nodes[2].Nodes.Add("Author: " + movie.Extra.Author);

            tv.Nodes.Add("ROM Information");
            tv.Nodes[3].Nodes.Add("ROM Name: " + movie.Extra.ROM);
            tv.Nodes[3].Nodes.Add("ROM MD5:  " + movie.Extra.CRC);

            tv.Nodes.Add("Controllers");
            tv.Nodes[4].Nodes.Add("Controller 1 Present: " + movie.Input.Controllers[0].ToString());
            tv.Nodes[4].Nodes.Add("Controller 2 Present: " + movie.Input.Controllers[1].ToString());

            movie = null; tv.ExpandAll(); tv.Nodes[0].EnsureVisible();
        }
Beispiel #2
0
 public HttpResponseMessage GetDeget()
 {
     try
     {
         List <Dega> data = Dega.GetDeget();
         var         res  = Request.CreateResponse(HttpStatusCode.OK, data);
         return(res);
     }
     catch (Exception ex)
     {
         var res = Request.CreateResponse(HttpStatusCode.BadRequest, "Gabimi: " + ex.Message);
         return(res);
     }
 }
Beispiel #3
0
        /// <summary>
        /// Launch an OpenFileDialog an populate the TASMovieInputCollection object
        /// according to the type of movie file that's selected
        /// </summary>
        private string loadMovie(ref TASMovieInputCollection location)
        {
            openDlg        = new OpenFileDialog();
            openDlg.Filter = TAS_FILTER;
            openDlg.ShowDialog();
            string filename = openDlg.FileName;

            openDlg.Dispose();

            if (filename.Length == 0)
            {
                return(null);
            }

            TASMovie movie = new TASMovie();

            location        = new TASMovieInputCollection();
            location.Format = IsValid(filename);

            // load the movie object up with the correct format
            switch (location.Format)
            {
            case MovieType.SMV: movie = new SNES9x(filename); break;

            case MovieType.FCM: movie = new FCEU(filename); break;

            case MovieType.GMV: movie = new Gens(filename); break;

            case MovieType.FMV: movie = new Famtasia(filename); break;

            case MovieType.VBM: movie = new VisualBoyAdvance(filename); break;

            case MovieType.M64: movie = new Mupen64(filename); break;

            case MovieType.MMV: movie = new Dega(filename); break;

            case MovieType.PXM: movie = new PCSX(filename); break;      // shares with PJM

            case MovieType.PJM: movie = new PCSX(filename); break;      // shares with PXM
            }
            location.Input       = movie.Input.FrameData;
            location.Controllers = movie.Input.ControllerCount;

            return(filename);
        }