Example #1
0
 public void AddToImporter(Game game)
 {
     if (game != null)
     {
         importer.AddGames(new Game[] { game });
     }
 }
Example #2
0
        void sendToImporter(IEnumerable <Game> games)
        {
            Importer importer             = Emulators2Settings.Instance.Importer;
            BackgroundTaskHandler handler = new BackgroundTaskHandler();

            handler.StatusDelegate = () => { return("sending to Importer..."); };
            handler.ActionDelegate = () =>
            {
                importer.AddGames(games);
            };
            using (Conf_ProgressDialog progressDlg = new Conf_ProgressDialog(handler))
                progressDlg.ShowDialog();
        }
Example #3
0
        void unMergeSelectedRow()
        {
            if (importGridView.SelectedRows.Count != 1)
            {
                return;
            }

            DataGridViewRow selectedRow = importGridView.SelectedRows[0];
            RomMatch        romMatch    = selectedRow.DataBoundItem as RomMatch;

            if (romMatch == null)
            {
                return;
            }
            List <GameDisc> discs = romMatch.Game.GetDiscs();

            if (discs.Count < 2)
            {
                return;
            }
            romMatch.ResetDisplayInfo();
            romMatch.Game.CurrentDiscNum = 1;
            romMatch.Game.SaveGamePlayInfo();
            List <Game> newGames = new List <Game>();

            for (int x = 0; x < discs.Count; x++)
            {
                GameDisc disc = discs[x];
                disc.Delete();
                if (x > 0)
                {
                    Game newGame = new Game(disc.Path, romMatch.Game.ParentEmulator)
                    {
                        LaunchFile = disc.LaunchFile
                    };
                    newGame.Save();
                    newGames.Add(newGame);
                    importerBindingSource.Insert(selectedRow.Index + x, new RomMatch(newGame)
                    {
                        BindingSourceIndex = romMatch.BindingSourceIndex + x
                    });
                }
            }
            importer.AddGames(newGames);
        }