Пример #1
0
        private int judgeCheckeditem()
        {
            int       pagenum            = 0;
            ArrayList choosedCollegeNews = new ArrayList();
            ArrayList choosedCollegeNoti = new ArrayList();

            if (collegeChoose.GetItemChecked(0))
            {
                choosedCollegeNews.Add("Humanity_news.txt");
                choosedCollegeNoti.Add("Humanity_notification.txt");
            }
            if (collegeChoose.GetItemChecked(1))
            {
                choosedCollegeNews.Add("Global_Business_news.txt");
                choosedCollegeNoti.Add("Global_Business_notification.txt");
            }
            if (collegeChoose.GetItemChecked(2))
            {
                choosedCollegeNews.Add("Translation_news.txt");
                choosedCollegeNoti.Add("Translation_notification.txt");
            }
            if (collegeChoose.GetItemChecked(3))
            {
                choosedCollegeNews.Add("Package_Engineering_news.txt");
                choosedCollegeNoti.Add("Package_Engineering_notification.txt");
            }
            string[] news_res = new string[choosedCollegeNews.Count];
            string[] noti_res = new string[choosedCollegeNoti.Count];
            for (int i = 0; i < choosedCollegeNews.Count; i++)
            {
                news_res[i] = choosedCollegeNews[i].ToString();
                pagenum++;
            }
            for (int i = 0; i < choosedCollegeNoti.Count; i++)
            {
                noti_res[i] = choosedCollegeNoti[i].ToString();
            }
            BuildTarget.BuildTargetNews(news_res);
            BuildTarget.BulidTargetNotification(noti_res);

            return(pagenum);
        }