예제 #1
0
 public BaseRom(IGame game)
 {
     Game      = game;
     Name      = FSOperations.Name(Game.Title).Trim();
     NameMeta  = Name;
     Container = new FileInfo(Game.ApplicationPath).Directory;
 }
예제 #2
0
        protected virtual void RenameVideo()
        {
            FileInfo video = new FileInfo(Game.GetVideoPath());

            FSOperations.Move(video, Container.FullName, Name + " (Video Snap)");

            Game.VideoPath = video.FullName;
        }
예제 #3
0
        protected virtual void RenameApp(IAdditionalApplication app)
        {
            FileInfo appfile  = new FileInfo(app.ApplicationPath);
            string   filename = Path.GetFileNameWithoutExtension(app.ApplicationPath);
            string   discnum  = GetDiscNumber(filename);
            string   traknum  = GetTrackNumber(filename);
            string   newname  = Name + CreateDiscMeta(discnum) + CreateTrackMeta(traknum);

            FSOperations.Move(appfile, Container.FullName, newname);

            app.ApplicationPath = appfile.FullName;
        }
예제 #4
0
        protected virtual string RenameImage(string imagename, string discnum)
        {
            string   imagepath = Container.FullName + "\\" + imagename;
            string   filename  = Path.GetFileNameWithoutExtension(imagepath);
            string   traknum   = GetTrackNumber(filename);
            string   name      = Name + CreateDiscMeta(discnum) + CreateTrackMeta(traknum);
            FileInfo file      = new FileInfo(imagepath);

            FSOperations.Move(file, Container.FullName, name);

            return(file.Name);
        }
예제 #5
0
        protected virtual void RenameFolder()
        {
            string initialPath = Container.FullName + "\\";

            FSOperations.Move(Container, Name);

            Game.ApplicationPath = Game.ApplicationPath.Replace(initialPath, Container.FullName);
            Game.VideoPath       = Game.VideoPath == null ? null : Game.VideoPath.Replace(initialPath, Container.FullName);
            Game.MusicPath       = Game.MusicPath == null ? null : Game.MusicPath.Replace(initialPath, Container.FullName);
            Game.ManualPath      = Game.ManualPath == null ? null : Game.ManualPath.Replace(initialPath, Container.FullName);

            foreach (IAdditionalApplication app in Game.GetAllAdditionalApplications())
            {
                app.ApplicationPath = app.ApplicationPath.Replace(initialPath, Container.FullName);
            }
        }
예제 #6
0
        protected virtual void RenameFile()
        {
            FileInfo rom         = new FileInfo(Game.ApplicationPath);
            string   initialPath = rom.FullName;

            FSOperations.Move(rom, Container.FullName, NameMeta);

            Game.ApplicationPath = rom.FullName;

            foreach (IAdditionalApplication app in Game.GetAllAdditionalApplications())
            {
                if (app.ApplicationPath == initialPath)
                {
                    app.ApplicationPath = rom.FullName;
                }
            }
        }