public void Reset() { m_cells.Clear(); var list = new List <DisplayedCell>(); for (int i = 0; i < MapEditorModelView.MapCellsCount; i++) { var pixelCoords = MapModelView.GetCellPixelCoords((short)i); list.Add(new DisplayedCell(this, Brushes.Transparent, pixelCoords.X, pixelCoords.Y)); } m_cells.AddRange(list); }
public void UpdateElementPosition() { if (m_posX == null && m_posY == null) { return; } var id = MapModelView.GetCellByPixel(new Point(PosX, PosY)); Cell = id; m_posX = null; m_posY = null; }