public MapListForm()
{
InitializeComponent();
this.Text = MainForm.SelectedMod.Title + " Map List Editor";
// Define vars
ClientMaps = new List<string>();
BF2Mod Mod = MainForm.SelectedMod;
// Fetch all maps for the selected mod
foreach (string Map in Mod.Levels)
MapListSelect.Items.Add(Map);
// Get Client maps
if (!String.IsNullOrEmpty(Program.Config.ClientPath))
{
string P = Path.Combine(Program.Config.ClientPath, "mods", Mod.Name, "levels");
if (Directory.Exists(P))
{
foreach (string Map in Directory.GetDirectories(P))
ClientMaps.Add(Map.Substring(P.Length + 1));
}
}
// Get the current maplist and display it
MapListBox.Lines = Mod.MapList.Entries.Select(e => e.ToString()).ToArray();
}