private void PropertyChanged(object sender, PropertyChangedEventArgs e)
{
switch (e.PropertyName)
{
case "Title":
this.Text = this.controller.Title;
break;
case "CloseButtonText":
this.closeButton.Text = this.controller.CloseButtonText;
break;
case "SearchResults":
this.listResults.Items.Clear();
if (this.controller.SearchResults != null)
{
foreach (TvShow show in this.controller.SearchResults)
{
this.listResults.Items.Add(new ListViewItem(new[] { show.Name, show.TvdbId }));
}
if (this.controller.SearchResults.Count > 0)
{
this.listResults.Items[0].Selected = true;
}
}
break;
}
}