public void CleanSubGrids() { foreach (var grid in SubGrids) { if (grid == MyGrid) { continue; } UnRegisterSubGrid(grid, true); } SubGrids.Clear(); RemSubGrids.Clear(); AddSubGrids.Clear(); TmpSubGrids.Clear(); SubGridsChanged = false; }
public void SubGridDetect() { if (PrevSubGrids.Count == 0) { return; } AddSubGrids.Clear(); foreach (var sub in PrevSubGrids) { AddSubGrids.Add(sub); TmpSubGrids.Add(sub); } TmpSubGrids.IntersectWith(RemSubGrids); RemSubGrids.ExceptWith(AddSubGrids); AddSubGrids.ExceptWith(TmpSubGrids); TmpSubGrids.Clear(); SubGridsChanged = AddSubGrids.Count != 0 || RemSubGrids.Count != 0; }