Ejemplo n.º 1
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;
            }
        }
Ejemplo n.º 2
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;
        }
Ejemplo n.º 3
0
 public void CopyObjects()
 {
     mCopiedEntries.Clear();
     mCopiedEntries.AddRange(mSelectedEntries);
 }
Ejemplo n.º 4
0
        public void ClearSelection()
        {
            mSelectedEntries.Clear();

            CheckSelectionChanged();
        }