예제 #1
0
        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);
        }
예제 #2
0
파일: Emulator.cs 프로젝트: Mavtak/Arcadia
 public Emulator(ArcadiaLibrary parentGameLibrary)
     : this(null, parentGameLibrary)
 {
 }
예제 #3
0
파일: Emulator.cs 프로젝트: Mavtak/Arcadia
 public Emulator(string name = null, ArcadiaLibrary parentGameLibrary = null)
     : base(name, parentGameLibrary)
 {
     CompatablePlatforms = new List<Platform>();
 }
예제 #4
0
        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();
            }
        }
예제 #5
0
파일: Platform.cs 프로젝트: Mavtak/Arcadia
 public Platform(ArcadiaLibrary parentGameLibrary)
     : this(null, parentGameLibrary)
 {
 }
예제 #6
0
파일: Platform.cs 프로젝트: Mavtak/Arcadia
 public Platform(string name, ArcadiaLibrary parentGameLibrary)
     : base(name, parentGameLibrary)
 {
     NamePatterns = new LinkedList<Regex>();
     UniqueFileExtensions = new List<string>();
 }
예제 #7
0
 public GenericLibraryItem(ArcadiaLibrary parentGameLibrary)
     : this(null, parentGameLibrary)
 {
 }
예제 #8
0
 public FilenameFlag(string name, ArcadiaLibrary parentGameLibrary)
     : base(name, parentGameLibrary)
 {
 }
예제 #9
0
 public SimpleSearchFilter(ArcadiaLibrary parentGameLibrary)
 {
     this.parentGameLibrary = parentGameLibrary;
     filterItems = new List<IFilterItem>();
 }
예제 #10
0
 internal LibrarySearcher(ArcadiaLibrary library)
 {
     this.library = library;
 }
예제 #11
0
파일: Game.cs 프로젝트: Mavtak/Arcadia
 public Game(ArcadiaLibrary parentGameLibrary)
     : this(null, parentGameLibrary)
 {
 }
예제 #12
0
 public Repository(ArcadiaLibrary parentGameLibrary)
     : this(null, parentGameLibrary)
 {
 }
예제 #13
0
 public Repository(string name, ArcadiaLibrary parentGameLibrary)
     : base(name, parentGameLibrary)
 {
 }
예제 #14
0
 public RepositoryEditorWindow(Window owner, ArcadiaLibrary library)
     : this(owner, new Repository(library))
 {
 }
예제 #15
0
파일: Language.cs 프로젝트: Mavtak/Arcadia
 public Language(ArcadiaLibrary parentGameLibrary)
     : this(null, parentGameLibrary)
 {
 }
예제 #16
0
파일: Language.cs 프로젝트: Mavtak/Arcadia
 public Language(string name, ArcadiaLibrary parentGameLibrary)
     : base(name, parentGameLibrary)
 {
 }
예제 #17
0
파일: Program.cs 프로젝트: Mavtak/Arcadia
        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();
        }
예제 #18
0
 public FilenameFlag(ArcadiaLibrary parentGameLibrary)
     : this(null, parentGameLibrary)
 {
 }
예제 #19
0
 public GenericLibraryItem(string name, ArcadiaLibrary parentGameLibrary)
 {
     otherNames = new List<string>();
     this.name = name;
     this.parentGameLibrary = parentGameLibrary;
 }