public TwitchChannelInfoWindow(Channel channel) { InitializeComponent(); Text = string.Format("Informations for channel: {0}", channel.Name); SetChannelInformationsToFields(channel); }
private void SetChannelInformationsToFields(Channel channel) { idLabel.Text += channel.ID; nameLabel.Text += channel.DisplayName; langLabel.Text += channel.Language; titelLabel.Text += channel.Status; partnerLabel.Text += (channel.Partner) ? "YES" : "NO"; followersLabel.Text += channel.Followers; createdLabel.Text += channel.Created; gameLabel.Text += channel.Game; viewsLabel.Text += channel.Views; delayLabel.Text += (channel.Delay == uint.MaxValue) ? "-" : channel.Delay.ToString(); string linkText = ""; { if (!string.IsNullOrWhiteSpace(channel.URL)) { linkText += string.Format("Channel:\n{0}", channel.URL); channelURL.Links.Add(linkText.Length - channel.URL.Length, channel.URL.Length, channel.URL); } channelURL.Text = linkText; } }