private void chanInfoUpdateButton_Click(object sender, EventArgs e)
{
var item = channelList.SelectedItem as ChannelListItem;
if (item!=null) {
var channel = item.Channel;
if (!channel.IsBroadcasting) return;
var info = new AtomCollection(channel.ChannelInfo.Extra);
if (info!=null) {
info.SetChanInfoComment(chanInfoComment.Text);
info.SetChanInfoGenre(chanInfoGenre.Text);
info.SetChanInfoDesc(chanInfoDesc.Text);
info.SetChanInfoURL(chanInfoContactURL.Text);
info.SetChanInfoComment(chanInfoComment.Text);
channel.ChannelInfo = new ChannelInfo(info);
}
var track = new AtomCollection(channel.ChannelTrack.Extra);
if (track!=null) {
track.SetChanTrackAlbum(chanTrackAlbum.Text);
track.SetChanTrackCreator(chanTrackArtist.Text);
track.SetChanTrackTitle(chanTrackTitle.Text);
track.SetChanTrackGenre(chanTrackGenre.Text);
track.SetChanTrackURL(chanTrackContactURL.Text);
channel.ChannelTrack = new ChannelTrack(track);
}
}
}