public void LoadMapsToGrid() { List <Map> maps = LoadSave.LoadMaps(Globals.ProjectFile); if (maps != null) { foreach (Map map in maps) { int index = dgrMaps.Rows.Add(); dgrMaps[0, index].Value = map.Name; dgrMaps[1, index].Value = map.Floor; } } }
public void LoadMapsList() { int index = cmbMaps.SelectedIndex; cmbMaps.Items.Clear(); List <Map> maps = LoadSave.LoadMaps(Globals.ProjectFile); if (maps != null) { foreach (Map map in maps) { cmbMaps.Items.Add(map); } cmbMaps.SelectedIndex = index; } }