Esempio n. 1
0
        public void ChangeMap(string name)
        {
            Map last = Active;
            Map map = maps.FirstOrDefault(
                m => m.Name == name);

            if (map == null)
            {
                map = new Map(name);
                map.Load();

                Active = map;
                maps.Add(map);
            }
            else
            {
                Active = map;
            }

            if (OnMapChanged != null)
            {
                OnMapChanged(this, new MapManagerEventArgs(last, Active));
            }
        }
Esempio n. 2
0
 public MapManagerEventArgs(Map last, Map next)
 {
     Last = last;
     Next = next;
 }
Esempio n. 3
0
        public void RemoveMap(Map map)
        {
            maps.Remove(map);

            if (ReferenceEquals(map, Active))
            {
                Active = null;
            }
        }