Пример #1
0
        public void SelectNone()
        {
            ClearTabs();
            AddTab(create);
            AddTab(entrances);
            AddTab(views);
            AddTab(zones);
            AddTab(paths);
            AddTab(progresspaths);

            entrances.SelectObjects(null);
            views.SelectObjects(null);
            zones.SelectObjects(null);
            paths.SelectObjects(null);
            progresspaths.SelectObjects(null);
            EdControl.Focus();
        }
Пример #2
0
        public void SelectObjects(List <LevelItem> SelectedObjs)
        {
            objects.SelectObjects(filter(SelectedObjs, ItemType.Object));
            sprites.SelectObjects(filter(SelectedObjs, ItemType.Sprite));
            entrances.SelectObjects(filter(SelectedObjs, ItemType.Entrance));
            views.SelectObjects(filter(SelectedObjs, ItemType.View));
            zones.SelectObjects(filter(SelectedObjs, ItemType.Zone));
            paths.SelectObjects(filter(SelectedObjs, ItemType.Path));
            progresspaths.SelectObjects(filter(SelectedObjs, ItemType.ProgressPath));

            bool[] has = new bool[8];
            foreach (LevelItem it in SelectedObjs)
            {
                has[(int)typeOfItem(it)] = true;
            }

            int idx = Array.IndexOf(has, true);

            if (idx > -1 && !has[tabControl1.SelectedIndex])
            {
                tabControl1.SelectedIndex = idx;
            }
        }