Пример #1
0
        private void tsmiAddToSendList_Click(object sender, EventArgs e)
        {
            ListView list   = (ListView)tabControlMain.TabPages[tabControlMain.SelectedIndex].Controls[0];
            var      index  = list.SelectedIndices[0];
            var      id     = GetPacketIdFromTableItemIndex(list, index);
            var      packet = PacketManager.PacketList[id];

            SendManager.AddToList("Send " + id, false, packet);
            tabControlCapturesAndFilters.SelectTab("tabSendList");
        }
Пример #2
0
        public void LoadSendListItems()
        {
            lvSendList.Items.Clear();
            var sendList = SendManager.GetSendList();

            lvSendList.ItemCheck -= lvSendList_ItemCheck;
            foreach (var sendItem in sendList)
            {
                var item = lvSendList.Items.Add(sendItem.Name);
                item.Checked = sendItem.Active;
            }
            lvSendList.ItemCheck += lvSendList_ItemCheck;
        }
Пример #3
0
 private void tsmiSendListClear_Click(object sender, EventArgs e)
 {
     SendManager.ClearSendList();
     LoadSendListItems();
 }
Пример #4
0
 private void tsmiSendListSave_Click(object sender, EventArgs e)
 {
     SendManager.SaveSendList();
 }
Пример #5
0
 private void tsmiSendListDelete_Click(object sender, EventArgs e)
 {
     SendManager.DeleteSendListItem(lvSendList.SelectedIndices[0]);
 }
Пример #6
0
 private void lvSendList_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     SendManager.SetSendListItemActive(e.Index, e.NewValue == CheckState.Checked);
 }