Пример #1
0
        private void btnRemovePod_Click(object sender, EventArgs e)
        {
            var spellista = new Spellista();

            if (lvPodcasts.SelectedItems.Count > 0)
            {
                spellista.BtnRemovePod(lvPodcasts, lbAvsnitt);
            }
        }
Пример #2
0
        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")));
            }
        }
Пример #3
0
        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();
            }
        }
Пример #4
0
        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);
        }