Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void btnDelFeed_Click(object sender, EventArgs e) {
- if (lvMain.SelectedItems.Count == 1) {
- 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
- List<ListViewItem> mainList = EntityLogicLayer.SetPersistentFeedListToLvMain(); // Returns a List<ListViewItem> representing the PersistentFeedList from ELL
- Populate.updateListView(lvMain, mainList); // Populating the GUI with the new List of ListViewItems
- EntityLogicLayer.SetPersistentFeedListToSaveFile(); // Saves the PersistentFeedList to FeedFile.txt
- Populate.refreshSelection(lvMain, lbxGenre, lbxEpisodes, tbxDescription, lblFeedTitle); // Refresh the selected items in Genre (to sort all ListViews and ListBoxes accordingly)
- } else {
- MessageBox.Show("No item selected, or more than one item selected!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement