Пример #1
0
        private void onRemoved(SubsidiaryMarket m, SubsidiaryCompany company)
        {
            if (m != market)
            {
                return;                                 // ignore
            }
            ListViewItemEx item = (ListViewItemEx)companies[company];

            companies.Remove(company);
            list.Items.Remove(item);
        }
Пример #2
0
        private static SubsidiaryMarket theInstance(string suffix)
        {
            string           name = typeof(SubsidiaryMarket).Name + suffix;
            SubsidiaryMarket r    = (SubsidiaryMarket)WorldDefinition.World.OtherObjects[name];

            if (r == null)
            {
                WorldDefinition.World.OtherObjects[name] = r = new SubsidiaryMarket();
            }
            return(r);
        }
Пример #3
0
        private void onAdded(SubsidiaryMarket m, SubsidiaryCompany company)
        {
            if (m != market)
            {
                return;                                 // ignore
            }
            ListViewItem item = new ListViewItemEx(company);

            list.Items.Insert(0, item);
            companies.Add(company, item);
        }