Пример #1
0
        protected virtual void LoadRoms()
        {
            try
            {
                var files = System.IO.Directory.GetFiles(RomsPath);

                string lastImageFile = string.Empty;

                foreach (var file in files)
                {
                    if (IsImagePath(file))
                    {
                        lastImageFile = file;
                        Rom rImageAux = new Rom(file);
                        var rom       = Roms.FirstOrDefault(x => x.GetRomName().Equals(rImageAux.GetRomName()));
                        if (rom != null)
                        {
                            rom.SetImagePath(file);
                        }
                    }
                    else
                    {
                        Rom r = new Rom(file);
                        if (lastImageFile.Contains(r.GetRomName()))
                        {
                            r.SetImagePath(lastImageFile);
                        }

                        Roms.Add(r);
                    }
                }
            }
            catch (Exception ex)
            {
                throw new Exception($"{nameof(LoadRoms)}: {ex.Message}");
            }
        }
Пример #2
0
 protected override string GetExutableArguments(Rom rom)
 {
     return($"-fullscreen \"{rom.GetRomPath()}\"");
 }
Пример #3
0
 protected abstract string GetExutableArguments(Rom rom);