private void btnEditFeed_Click(object sender, EventArgs e) { try { if (Validering.validateCategory(cbKategori) == false || Validering.intervalBoxNotEmpty(cbFrekvens) == false || Validering.TxtBoxIsEmpty(tbNamn) == false) { } else { lvPodLista.SelectedItems[0].SubItems[2].Text = cbKategori.Text; lvPodLista.SelectedItems[0].SubItems[1].Text = cbFrekvens.Text; lvPodLista.SelectedItems[0].SubItems[0].Text = tbNamn.Text; } } catch (ArgumentOutOfRangeException noSelectedFeed) { MessageBox.Show("Ej valt en feed att ändra på.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Information); Console.WriteLine("Error: {0}", noSelectedFeed.Message); } }
private void btnNyPodcast_Click(object sender, EventArgs e) { if (Validering.urlValidation(tbUrl.Text) == false || Validering.validateCategory(cbKategori) == false || Validering.intervalBoxNotEmpty(cbFrekvens) == false || Validering.TxtBoxIsEmpty(tbNamn) == false) { } else { lvPodLista.Items.Add(hanteraData.add(tbNamn.Text, cbFrekvens.Text, cbKategori.Text, tbUrl.Text)); } }