예제 #1
0
파일: MainPage.cs 프로젝트: omerha/dp-ex2
        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";
        }
예제 #2
0
파일: MainPage.cs 프로젝트: omerha/dp-ex3
        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;
        }