private void btnRemovePod_Click(object sender, EventArgs e) { var spellista = new Spellista(); if (lvPodcasts.SelectedItems.Count > 0) { spellista.BtnRemovePod(lvPodcasts, lbAvsnitt); } }
private void btnSavePod_Click(object sender, EventArgs e) { var serializer = new Serializer(); var spellista = new Spellista(); if (lvPodcasts.SelectedItems.Count > 0) { lvPodcasts.SelectedItems[0].SubItems[2].Text = comboFrekvens.SelectedItem.ToString(); lvPodcasts.SelectedItems[0].SubItems[3].Text = comboKategori.SelectedItem.ToString(); spellista.UpdateFeedFreqAndGen(lvPodcasts); lvPodcasts.Items.Clear(); serializer.AddAllFeeds(lvPodcasts, serializer.DeSerialize(serializer.DeSerializer("FeedItems.txt"))); } }
private void btnSaveCategory_Click(object sender, EventArgs e) { var spellista = new Spellista(); var serializer = new Serializer(); var categories = new Categories(); var filesystem = new FileSystem(); if (lvCategories.SelectedItems.Count > 0) { categories.btnSaveCategory(lvCategories, txtBoxCategories.Text, lvPodcasts); lvPodcasts.Items.Clear(); comboKategori.Items.Clear(); serializer.AddAllFeeds(lvPodcasts, serializer.DeSerialize(serializer.DeSerializer(serializer.FeedFile))); categories.AddCategoriesCombo(comboKategori, categories.ReadAllCategories()); spellista.SelectedIndex(comboFrekvens, comboKategori); txtBoxCategories.Clear(); } }
private void Form1_Load(object sender, EventArgs e) { var spellista = new Spellista(); var categories = new Categories(); var serializer = new Serializer(); var updatefrequency = new UpdateFrequency(); categories.SerializeCategories(); categories.AddCategoriesCombo(comboKategori, categories.ReadAllCategories()); serializer.AddAllFeeds(lvPodcasts, serializer.DeSerialize(serializer.DeSerializer(serializer.FeedFile))); serializer.AddAllFeeds(lvCategories, serializer.DeSerialize(serializer.DeSerializer(serializer.categoryFile))); updatefrequency.AddFrequency(comboFrekvens); updatefrequency.Updates(updatefrequency.List(lvPodcasts)); spellista.FullRowSelect(lvPodcasts); spellista.SelectedIndex(comboFrekvens, comboKategori); spellista.HideSelection(lvPodcasts, lvCategories); }