Advertisement
headpiker

Untitled

Oct 28th, 2020
1,903
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.04 KB | None | 0 0
  1. private void btnDelFeed_Click(object sender, EventArgs e) {
  2.             if (lvMain.SelectedItems.Count == 1) {
  3.                 EntityLogicLayer.DeleteFeedItemFromPersistent(lvMain.SelectedItems[0].Index); // Deletes the Feed item from the PersistentFeedList variable in ELL and deletes the physical .xml file from the harddrive
  4.                 List<ListViewItem> mainList = EntityLogicLayer.SetPersistentFeedListToLvMain(); // Returns a List<ListViewItem> representing the PersistentFeedList from ELL
  5.                 Populate.updateListView(lvMain, mainList); // Populating the GUI with the new List of ListViewItems
  6.                 EntityLogicLayer.SetPersistentFeedListToSaveFile(); // Saves the PersistentFeedList to FeedFile.txt
  7.                 Populate.refreshSelection(lvMain, lbxGenre, lbxEpisodes, tbxDescription, lblFeedTitle); // Refresh the selected items in Genre (to sort all ListViews and ListBoxes accordingly)
  8.             } else {
  9.                 MessageBox.Show("No item selected, or more than one item selected!");
  10.             }
  11.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement