private void buttonTopPages_Click(object sender, EventArgs e) { TopPagesForUser top = TopWantedItemFactory.Build("Top pages", m_UserData, m_AppLogic) as TopPagesForUser; listBoxTops.DisplayMember = "Name"; listBoxTops.DataSource = top.TopList; labelTopTitle.Text = "Top pages"; }
private void buttonTop_Click(object sender, EventArgs e) { i_TopWantedItem = TopWantedItemFactory.Build((sender as Button).Text); i_TopWantedItem.ButtonColorSwapper = m_ButtonColorSwapper; i_TopWantedItem.Accept(sender as Button); i_TopWantedItem.GetData(m_AppLogic, m_UserData); listBoxTops.DisplayMember = "Name"; listBoxTops.DataSource = i_TopWantedItem.TopList; labelTopTitle.Text = (sender as Button).Text; }