Beispiel #1
0
        public void ChangeLocation(string newLocationID)
        {
            if (newLocationID != CurrentLocation)
            {
                CurrentLocation = newLocationID;

                if (ZoneChanged != null)
                {
                    foreach (System.EventHandler e in ZoneChanged.GetInvocationList())
                    {
                        e.BeginInvoke(this, null, e.EndInvoke, null);
                    }
                }
            }
        }
        public void ChangeLocation(string newLocationID)
        {
            if (newLocationID != CurrentLocation)
            {
                CurrentLocation = newLocationID;

                if (ZoneChanged != null)
                {
                    foreach (System.EventHandler e in ZoneChanged.GetInvocationList())
                    {
                        Task.Run(() => e.Invoke(this, null));
                    }
                }
            }
        }