private void ListsList_SelectedIndexChanged(object sender, EventArgs e)
{
ListElement lst;
if (this.ListsList.SelectedIndex > -1)
{
lst = (ListElement)this.ListsList.SelectedItem;
}
else
{
lst = null;
}
if (lst == null)
{
this.UsernameLabel.Text = "";
this.NameLabel.Text = "";
this.StatusLabel.Text = "";
this.MemberCountLabel.Text = "0";
this.SubscriberCountLabel.Text = "0";
this.DescriptionText.Text = "";
}
else
{
this.UsernameLabel.Text = lst.Username + " / " + lst.Nickname;
this.NameLabel.Text = lst.Name;
if (lst.IsPublic)
{
this.StatusLabel.Text = "Public";
}
else
{
this.StatusLabel.Text = "Private";
}
this.MemberCountLabel.Text = lst.MemberCount.ToString("#,##0");
this.SubscriberCountLabel.Text = lst.SubscriberCount.ToString("#,##0");
this.DescriptionText.Text = lst.Description;
}
}