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