private void LevelAdded_Synched(LevelMetadata level) { for (int i = 0; i < queries.Count; ++i) { LevelSetQuery query = queries[i] as LevelSetQuery; query.LevelAdded(level); } }
private void LevelRemoved_Synched(LevelMetadata level) { for (int i = 0; i < queries.Count; ++i) { LevelSetQuery query = queries[i] as LevelSetQuery; query.LevelRemoved(level); } LevelBrowserState state = (LevelBrowserState)level.BrowserState; state.level = null; level.BrowserState = null; }
public ILevelSetCursor OpenCursor( Guid desiredSelection, ILevelSetSorter sorter, ILevelSetFilter filter, LevelSetQueryEvent notifyFetchingCallback, LevelSetQueryEvent notifyFetchCompleteCallback, LevelSetCursorShifted shiftCallback, LevelSetCursorJumped jumpCallback, LevelSetCursorAddition additionCallback, LevelSetCursorRemoval removalCallback, int size) { LevelSetCursor cursor; lock (Synch) { ILevelSetQuery query = new LevelSetQuery( sorter, filter, this, notifyFetchingCallback, notifyFetchCompleteCallback); queries.Add(query); cursor = new LevelSetCursor( this, desiredSelection, query, shiftCallback, jumpCallback, additionCallback, removalCallback, size); query.AddCursor(cursor); } return(cursor); }