Example #1
0
        public StarSystem(string name, int seed)
            : base()
        {
            Name  = name;
            Stars = new BindingList <Star>();

            Waypoints             = new BindingList <Waypoint>();
            JumpPoints            = new BindingList <JumpPoint>();
            SystemContactList     = new VerboseBindingList <SystemContact>();
            FactionDetectionLists = new BindingList <FactionSystemDetection>();

            TaskGroups     = new BindingList <TaskGroupTN>();
            Populations    = new BindingList <Population>();
            OrdnanceGroups = new BindingList <OrdnanceGroupTN>();

            m_seed = seed;

            // Subscribe to change events.
            SystemContactList.ListChanged += SystemContactList_ListChanged;

            // Create the faciton contact information for each faction.
            foreach (Faction f in GameState.Instance.Factions)
            {
                f.AddNewContactList(this);
            }
        }
Example #2
0
        public StarSystem(string name, int seed)
            : base()
        {
            Name = name;
            Stars = new BindingList<Star>();

            Waypoints = new BindingList<Waypoint>();
            JumpPoints = new BindingList<JumpPoint>();
            SystemContactList = new VerboseBindingList<SystemContact>();
            FactionDetectionLists = new BindingList<FactionSystemDetection>();

            TaskGroups = new BindingList<TaskGroupTN>();
            Populations = new BindingList<Population>();
            OrdnanceGroups = new BindingList<OrdnanceGroupTN>();

            m_seed = seed;

            // Subscribe to change events.
            SystemContactList.ListChanged += SystemContactList_ListChanged;

            // Create the faciton contact information for each faction.
            foreach (Faction f in GameState.Instance.Factions)
            {
                f.AddNewContactList(this);
            }
        }
Example #3
0
        private void SystemContactList_ListChanging(object sender, ListChangingEventArgs e)
        {
            VerboseBindingList <SystemContact> list = sender as VerboseBindingList <SystemContact>;

            switch (e.ListChangedType)
            {
            case ListChangedType.ItemAdded:
                AddContactElement(SceenDefaultEffect, e.ChangingObject as SystemContact);
                break;

            case ListChangedType.ItemDeleted:
                RemoveContactElement(SceenDefaultEffect, e.ChangingObject as SystemContact);
                break;
            }
        }
Example #4
0
        public StarSystem(string name)
        {
            Id    = Guid.NewGuid();
            Name  = name;
            Stars = new BindingList <Star>();

            Waypoints             = new BindingList <Waypoint>();
            JumpPoints            = new BindingList <JumpPoint>();
            SystemContactList     = new VerboseBindingList <SystemContact>();
            FactionDetectionLists = new BindingList <FactionSystemDetection>();

            TaskGroups     = new BindingList <TaskGroupTN>();
            Populations    = new BindingList <Population>();
            OrdnanceGroups = new BindingList <OrdnanceGroupTN>();

            // Subscribe to change events.
            SystemContactList.ListChanged += SystemContactList_ListChanged;

            TaskGroups.ListChanged     += ContactsChanged;
            Populations.ListChanged    += ContactsChanged;
            OrdnanceGroups.ListChanged += ContactsChanged;
        }