protected virtual void OnRomStatusChanged(RomStatusEventArgs e)
 {
     if (RomStatusChanged != null)
         RomStatusChanged(this, e);
 }
 void importer_RomStatusChanged(object sender, RomStatusEventArgs e)
 {
     updateItem(e.RomMatch, e.Status);
 }
 void romStatusChangedHandler(object sender, RomStatusEventArgs e)
 {
     if (e.Status == RomMatchStatus.Committed)
     {
         Game game = EmulatorsCore.Database.Get<Game>(e.RomMatch.ID);
         Logger.LogDebug("Importer action: {0} updated", game.Title);
         UpdateGame(game);
     }
 }
        void importer_RomStatusChanged(object sender, RomStatusEventArgs e)
        {
            if (closing || restarting)
                return;
            if (InvokeRequired)
            {
                try
                {
                    //Make sure we only execute on main thread
                    BeginInvoke(new MethodInvoker(delegate()
                    {
                        importer_RomStatusChanged(sender, e);
                    }));
                }
                catch (ObjectDisposedException) { } //form closed
                return;
            }

            if (closing || restarting)
                return;

            RomMatch romMatch;
            if (e.Status == RomMatchStatus.PendingMatch)
            {
                romMatch = e.RomMatch;
                if (!checkRow(romMatch)) //if false, add a new row
                {
                    addRow(romMatch);
                    return;
                }
            }
            else if (e.Status == RomMatchStatus.Ignored || e.Status == RomMatchStatus.Removed)
            {
                importerBindingSource.Remove(e.RomMatch);
                return;
            }

            int rowNum = importerBindingSource.IndexOf(e.RomMatch);
            if (rowNum < 0) //match not in grid
                return;

            romMatch = e.RomMatch;
            if (romMatch.Status == RomMatchStatus.Ignored && e.Status != RomMatchStatus.PendingMatch && e.Status != RomMatchStatus.Ignored)
                return;

            refreshRow(rowNum);
            updateButtons();
        }