Beispiel #1
0
        private void lstSelectedColumns_ItemCheck(object sender, ItemCheckEventArgs e)
        {
            SelectTreeNode node = (SelectTreeNode)lstSelectedColumns.Items[e.Index];

            if (e.NewValue == CheckState.Checked)
            {
                _selectedColumns.Add(node.Name);
            }
            else
            {
                _selectedColumns.Remove(node.Name);
            }
        }
Beispiel #2
0
        int IComparable.CompareTo(object obj)
        {
            SelectTreeNode b         = (SelectTreeNode)obj;
            bool           aSelected = frmSelectColumns.SelectedColumns.Contains(this.Name);
            bool           bSelected = frmSelectColumns.SelectedColumns.Contains(b.Name);

            if (aSelected && !bSelected)
            {
                return(-1);
            }
            else if (!aSelected && bSelected)
            {
                return(1);
            }
            else
            {
                return(this._sortName.CompareTo(b._sortName));
            }
        }