Пример #1
0
        private void IFUnblockBtn_Click(object sender, EventArgs e)
        {
            ListViewItem item   = IFBBlockLstvw.GetSelectedItem();
            ushort       header = ushort.Parse(item.SubItems[1].Text);

            switch (item.SubItems[0].Text)
            {
            case "Client":
            {
                if (!_inBlockedHeaders.Contains(header))
                {
                    return;
                }
                _inBlockedHeaders.Remove(header);
                Game.Filters.InUnblock(header);
                break;
            }

            case "Server":
            {
                if (!_outBlockedHeaders.Contains(header))
                {
                    return;
                }
                _outBlockedHeaders.Remove(header);
                Game.Filters.OutUnblock(header);
                break;
            }
            }
            IFBBlockLstvw.RemoveSelectedItem();
        }
Пример #2
0
        private void IFBlockBtn_Click(object sender, EventArgs e)
        {
            ushort header = _headerToBlock;

            switch (IFBDestinationTxt.SelectedIndex)
            {
            case 0:
            {
                if (_inBlockedHeaders.Contains(header))
                {
                    return;
                }
                _inBlockedHeaders.Add(header);
                Game.Filters.InBlock(header); break;
            }

            case 1:
            {
                if (_outBlockedHeaders.Contains(header))
                {
                    return;
                }
                _outBlockedHeaders.Add(header);
                Game.Filters.OutBlock(header); break;
            }
            }

            IFBBlockLstvw.ItemChecked -= IFBlockLstvw_ItemChecked;
            IFBBlockLstvw.FocusAdd((string)IFBDestinationTxt.SelectedItem, header.ToString(), "MASTER")
            .Checked = true;
            IFBBlockLstvw.ItemChecked += IFBlockLstvw_ItemChecked;
        }