Beispiel #1
0
 void m_oSystemContect_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
 {
     if (e.PropertyName == "Name")
     {
         Lable.Text = m_oSystemContect.Entity.Name;
         ParentSceen.Refresh();
     }
 }
        void m_oSystemContect_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            if (e.PropertyName == "Name")
            {
                // Change Label here! If we are doing this by system contact, then we need to check what type of StarSystemEntity this contact is.
                switch (m_oSystemContect.SSEntity)
                {
                case StarSystemEntityType.TaskGroup:
                    Lable.Text = m_oSystemContect.TaskGroup.Name;
                    break;

                case StarSystemEntityType.Population:
                    Lable.Text = m_oSystemContect.Pop.Name;
                    break;

                case StarSystemEntityType.Missile:
                    Lable.Text = m_oSystemContect.MissileGroup.Name;
                    break;
                }

                ParentSceen.Refresh();
            }
        }