Beispiel #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");
        }
Beispiel #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;
        }
Beispiel #3
0
 private void tsmiSendListClear_Click(object sender, EventArgs e)
 {
     SendManager.ClearSendList();
     LoadSendListItems();
 }
Beispiel #4
0
 private void tsmiSendListSave_Click(object sender, EventArgs e)
 {
     SendManager.SaveSendList();
 }
Beispiel #5
0
 private void tsmiSendListDelete_Click(object sender, EventArgs e)
 {
     SendManager.DeleteSendListItem(lvSendList.SelectedIndices[0]);
 }
Beispiel #6
0
 private void lvSendList_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     SendManager.SetSendListItemActive(e.Index, e.NewValue == CheckState.Checked);
 }