private void getVideoInformation(string text) { //string url = "https://www.youtube.com/watch?v=" + text; ExtractYoutubeInfo(text); xmlContent xmlCon = new xmlContent(); tb_videoInfo.Text = xmlCon.SetItemDesc(Title, Description.Replace("\n", "<br/>"), youtubeID); tb_XmlTitle.Text = xmlCon.SetItemTitle(tb_XmlTitle.Text, UploadTime); dt_PubDate.Text = UploadTime; }
private void btn_addItem_Click(object sender, EventArgs e) { xmlItem newItem = new xmlItem(); xmlContent x = new xmlContent(); newItem.ID = (MaxNum + 1).ToString(); newItem.Title = x.SetNewTitle(); lb_xmlItems.DataSource = null; xmlItemList.Insert(0, newItem); bs.DataSource = xmlItemList; tb_XmlTitle.Text = x.SetNewTitle(); tb_XmlContent.Text = newItem.Description; lb_xmlItems.ValueMember = "ID"; lb_xmlItems.DisplayMember = "title"; lb_xmlItems.DataSource = bs; lb_xmlItems.SelectedValue = newItem.ID; }