示例#1
0
        public void SelectAllObjects()
        {
            mSelectedEntries.Clear();
            mSelectedEntries.AddRange(mLevel.Entries);

            UpdateRedraw();

            CheckSelectionChanged();
        }
示例#2
0
        private void UpdateOldSelection()
        {
            //Update all the selection attributes on the old entries
            foreach (LevelEntry le in mOldSelectedEntries)
            {
                le.Selected = false;
            }

            mOldSelectedEntries.Clear();
            mOldSelectedEntries.AddRange(mSelectedEntries);

            //Update all the selection attributes on the new entries
            foreach (LevelEntry le in mSelectedEntries)
            {
                le.Selected = true;
            }
        }
示例#3
0
        private void UpdateList()
        {
            mSuspendChangeEvent = true;

            int topIndex = mList.TopIndex;

            mList.BeginUpdate();
            mList.Items.Clear();
            List <string> items = new List <string>();

            for (int i = 0; i < mEditor.Level.Entries.Count; i++)
            {
                LevelEntry le = mEditor.Level.Entries[i];
                items.Add(String.Format("{0}. {1}", i, le.ToString()));
            }

            mList.Items.AddRange(items.ToArray());

            foreach (LevelEntry le in mEditor.SelectedEntries)
            {
                int index = mEditor.Level.Entries.IndexOf(le);
                mList.SelectedIndices.Add(index);
            }

            mList.EndUpdate();

            mEntries.Clear();
            mSelectedEntries.Clear();

            mEntries.AddRange(mEditor.Level.Entries);
            mSelectedEntries.AddRange(mEditor.SelectedEntries);

            mList.TopIndex = Math.Min(topIndex, mEntries.Count);

            mSuspendChangeEvent = false;
        }
示例#4
0
 public void CopyObjects()
 {
     mCopiedEntries.Clear();
     mCopiedEntries.AddRange(mSelectedEntries);
 }