VixenModules.Editor.TimedSequenceEditor.MarkManager.PopulateMarkCollectionsList C# (CSharp) Method

PopulateMarkCollectionsList() private method

private PopulateMarkCollectionsList ( ) : void
return void
        private void PopulateMarkCollectionsList()
        {
            _updatingListContents = true;
            listViewMarkCollections.BeginUpdate();
            listViewMarkCollections.Items.Clear();

            foreach (MarkCollection mc in MarkCollections) {
                ListViewItem item = new ListViewItem();
                item.Text = mc.Name;
                item.SubItems.Add(mc.Level.ToString());
                item.SubItems.Add(mc.MarkCount.ToString());
                item.BackColor = (mc.Enabled) ? mc.MarkColor : SystemColors.Window;
                item.ForeColor = (mc.Enabled) ? ((GetGrayValueForColor(mc.MarkColor) > 128) ? Color.Black : Color.White)  : SystemColors.InactiveCaptionText;
                item.Tag = mc;

                if (mc == _displayedCollection)
                    item.Selected = true;
                listViewMarkCollections.Items.Add(item);
            }

            listViewMarkCollections.EndUpdate();
            _updatingListContents = false;
        }