public void Open(string path) { if (!File.Exists(GuiCommon.LibraryFilePath)) { MessageBoxGenerator.ShowError("Could not run ROM, because there is no library."); return; } if (library == null) { library = new ArcadiaLibrary(); library.ReadFromFile(GuiCommon.LibraryFilePath); } else { library.LoadDefaultSettings(); } var game = library.Games.GetByPath(path); if (game == null) { var tempRepository = new Repository("Temporary Repository", library); tempRepository.RootPath = Path.GetDirectoryName(path); library.Add(tempRepository); game = new Game(Path.GetFileNameWithoutExtension(path), library) { InnerPath = Path.GetFileName(path), Repository = tempRepository }; game.FillInInformation(true); library.Remove(tempRepository); } GuiCommon.PlayGame(null, game); }
public Emulator(ArcadiaLibrary parentGameLibrary) : this(null, parentGameLibrary) { }
public Emulator(string name = null, ArcadiaLibrary parentGameLibrary = null) : base(name, parentGameLibrary) { CompatablePlatforms = new List<Platform>(); }
private void Window_Loaded(object sender, RoutedEventArgs e) { try { library = new ArcadiaLibrary(); updateChecker.UpdateFound += new UpdatesFoundEventHandler(updateChecker_UpdateFound); updateChecker.UpdateCheckFailed += new UpdateCheckFailedEventHandler(updateChecker_UpdateCheckFailed); if (!(Environment.UserName.Equals("david", StringComparison.InvariantCultureIgnoreCase) && Environment.MachineName.Equals("rory", StringComparison.InvariantCultureIgnoreCase))) { //woop! Only check for updates if you're not me! updateChecker.CheckForUpdatesAsync(); } GuiCommon.Load(this); loadDataFile(); } catch(Exception exc) { MessageBoxGenerator.ShowCriticalErrorMessageBox(exc); die(); } }
public Platform(ArcadiaLibrary parentGameLibrary) : this(null, parentGameLibrary) { }
public Platform(string name, ArcadiaLibrary parentGameLibrary) : base(name, parentGameLibrary) { NamePatterns = new LinkedList<Regex>(); UniqueFileExtensions = new List<string>(); }
public GenericLibraryItem(ArcadiaLibrary parentGameLibrary) : this(null, parentGameLibrary) { }
public FilenameFlag(string name, ArcadiaLibrary parentGameLibrary) : base(name, parentGameLibrary) { }
public SimpleSearchFilter(ArcadiaLibrary parentGameLibrary) { this.parentGameLibrary = parentGameLibrary; filterItems = new List<IFilterItem>(); }
internal LibrarySearcher(ArcadiaLibrary library) { this.library = library; }
public Game(ArcadiaLibrary parentGameLibrary) : this(null, parentGameLibrary) { }
public Repository(ArcadiaLibrary parentGameLibrary) : this(null, parentGameLibrary) { }
public Repository(string name, ArcadiaLibrary parentGameLibrary) : base(name, parentGameLibrary) { }
public RepositoryEditorWindow(Window owner, ArcadiaLibrary library) : this(owner, new Repository(library)) { }
public Language(ArcadiaLibrary parentGameLibrary) : this(null, parentGameLibrary) { }
public Language(string name, ArcadiaLibrary parentGameLibrary) : base(name, parentGameLibrary) { }
static void Main(string[] args) { ArcadiaLibrary library = new ArcadiaLibrary(); library.Platforms.CommonFileExtensions.Add("zip"); Platform platform1 = new Platform("Nintendo 64", library); library.Add(platform1); platform1.OtherNames.Add("N64"); platform1.OtherNames.Add("Nintendo64"); platform1.UniqueFileExtensions.Add("n64"); platform1.UniqueFileExtensions.Add("z64"); Language language1 = new Language("English", library); library.Add(language1); language1.OtherNames.Add("EN"); language1.OtherNames.Add("ENGL"); Repository repository1 = new Repository("BLEH", library); library.Add(repository1); repository1.RootPath = @"\\DREAMINGNEST\Emulated Games\ROMs\Nintendo 64"; repository1.ScanForNewGames(); //repository1.AddGame(repository1.RootPath + @"\game a (en).z64"); //repository1.AddGame(repository1.RootPath + @"\game b (u) (en).n64"); //repository1.AddGame(repository1.RootPath + @"\Nintendo 64\game c.zip"); //repository1.AddGame(repository1.RootPath + @"\N64\game d.zip"); //repository1.AddGame(repository1.RootPath + @"\Super Nintendo\game e.zip"); /* Game game1 = new Game("Mario LOL", library); library.Add(game1); game1.OtherNames.Add("mario_lol"); game1.OtherNames.Add("mariolol"); game1.Platform = platform1; game1.Language = language1; game1.Repository = repository1; game1.Players = new NumberRange("1-4"); */ string filename = @"C:\Users\David\Desktop\Arcadia library.xml"; System.Xml.XmlWriter writer = System.Xml.XmlWriter.Create(filename); library.WriteToXml(writer, library.DefaultXmlNodeName); writer.Close(); System.Diagnostics.Process.Start(filename); //Console.WriteLine(library); /* foreach (Game game in library.Games) { Console.WriteLine(); Console.WriteLine("Name:\t " + game.Name); if(game.PlatformIsSet) Console.WriteLine("Platform:\t" + game.Platform.Name); if(game.FilenameFlagsAreSet) { Console.WriteLine("FilenameFlags:"); foreach (string filenameFlag in game.FilenameFlags) Console.WriteLine("\t\t" + filenameFlag); } }*/ Console.ReadKey(); }
public FilenameFlag(ArcadiaLibrary parentGameLibrary) : this(null, parentGameLibrary) { }
public GenericLibraryItem(string name, ArcadiaLibrary parentGameLibrary) { otherNames = new List<string>(); this.name = name; this.parentGameLibrary = parentGameLibrary; }