private void UnloadArea() { if(m_grid_roomsOnFloor != null) m_grid_sub.Children.Remove(m_grid_roomsOnFloor); m_grid_roomsOnFloor = null; m_comboBox_z.Items.Clear(); UnloadRoom(); }
private void LoadArea(int id, string name, int maxX, int minX, int maxY, int minY, int minZ, int maxZ) { UnloadArea(); AreaId = id; m_comboBox_z.Items.Add(c_comboBoxItem_newFloorAbove); m_comboBox_z.Items.Add(c_comboBoxItem_newFloorBelow); if(minZ < 0) { for (int z = minZ; z < 0; ++z) CreateFloorBelow(); for (int z = 0; z <= maxZ; ++z) CreateFloorAbove(); } else { for (int z = minZ; z <= maxZ; ++z) CreateFloorAbove(); } m_comboBox_z.SelectedItem = m_comboBox_z.Items[m_comboBox_z.Items.Count - 2]; m_grid_roomsOnFloor = new Grid_RoomsOnFloor(maxX, maxY, minZ, AreaId); m_grid_sub.SetGridRowColumn(m_grid_roomsOnFloor, 0, 0); m_grid_roomsOnFloor.SetActiveAndRegisterForGinTubEvents(); }