Beispiel #1
0
        private void comboBoxMaps_SelectionChangeCommitted(object sender, EventArgs e)
        {
            char[] seps = { '[', ']' };
            string item = (string)comboBoxMaps.Items[comboBoxMaps.SelectedIndex];

            string[] split = item.Split(seps, 3); //befor, between, after ;)

            if (item == "")
            {
                return;
            }

            if (split.Length < 2)
            {
                return;
            }

            string region = split[1];


            int id = int.Parse(region);

            RegionMgr.Region reg = RegionMgr.GetRegion(id);

            if (reg != null)
            {
                RegionMgr.LoadRegion(reg);
            }
        }