Ejemplo n.º 1
0
        void MapSelect_Load(object sender, EventArgs e)
        {
            MapList.Items.Clear();
            PathOutText.Text = MapFolderPath;

            if (DirectoryIsEmpty(MapFolderPath))
            {
                return;
            }

            foreach (var map in MapCache.FindMapsIn(MapFolderPath))
            {
                ListViewItem map1 = new ListViewItem();
                map1.Tag        = map;
                map1.Text       = Path.GetFileNameWithoutExtension(map);
                map1.ImageIndex = 0;
                MapList.Items.Add(map1);
            }

            // hack
            if (NewText.Text != "unnamed")
            {
                MapList.Items[0].Selected = true;
            }
        }