コード例 #1
0
 private void LevelAdded_Synched(LevelMetadata level)
 {
     for (int i = 0; i < queries.Count; ++i)
     {
         LevelSetQuery query = queries[i] as LevelSetQuery;
         query.LevelAdded(level);
     }
 }
コード例 #2
0
        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;
        }
コード例 #3
0
        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);
        }