Beispiel #1
0
        private void UpdateConnectionFilter()
        {
            CurrentFilterValues.ConnectionMask = new HashSet <int>();

            for (int i = 0; i < ConnectionListBox.Items.Count; i++)
            {
                if (ConnectionListBox.GetItemChecked(i))
                {
                    CurrentFilterValues.ConnectionMask.Add(i);
                }
            }
        }
Beispiel #2
0
        private void CheckAllConnectionsCheckBox_Click(object sender, System.EventArgs e)
        {
            bool bAreAllUnchecked = true;

            for (int i = 0; i < ConnectionListBox.Items.Count; i++)
            {
                if (ConnectionListBox.GetItemChecked(i) == false)
                {
                    bAreAllUnchecked = false;
                    break;
                }
            }

            for (int i = 0; i < ConnectionListBox.Items.Count; i++)
            {
                ConnectionListBox.SetItemChecked(i, !bAreAllUnchecked);
            }

            checkAllConnectionsCheckBox.Checked = !bAreAllUnchecked;
        }