Наследование: EmptyClassDayLesson
 public ClassListLight Clone()
 {
     ClassListLight cll = new ClassListLight();
     cll.Begin_lesson = this.Begin_lesson;
     cll.Period = this.Period;
     cll.Week = this.Week;
     //cll.Name = new string[this.Name.Length];
     cll.Hash_day = this.Hash_day;
     cll.Hash_lesson = this.Hash_lesson;
     //for (int i = 0; i < this.Name.Length; i++)
     //{
     //    cll.Name[i] = new string(this.Name[i].ToCharArray());//Name[i].ToString();
     //}
     return cll;
 }
Пример #2
0
        public ClassListLight Clone()
        {
            ClassListLight cll = new ClassListLight();

            cll.Begin_lesson = this.Begin_lesson;
            cll.Period       = this.Period;
            cll.Week         = this.Week;
            //cll.Name = new string[this.Name.Length];
            cll.Hash_day    = this.Hash_day;
            cll.Hash_lesson = this.Hash_lesson;
            //for (int i = 0; i < this.Name.Length; i++)
            //{
            //    cll.Name[i] = new string(this.Name[i].ToCharArray());//Name[i].ToString();
            //}
            return(cll);
        }
 /// <summary>
 /// 获得各个学号的课表
 /// </summary>
 private async void initFree()
 {
     for (int i = 0; i < muIdList.Count; i++)
     {
         int issuccess = 0;
         List<ClassListLight> clist = new List<ClassListLight>();
         while (issuccess < 2) //失败后重试两次
         {
             List<KeyValuePair<String, String>> paramList = new List<KeyValuePair<String, String>>();
             paramList.Add(new KeyValuePair<string, string>("stuNum", muIdList[i].uId));
             string kbtemp = await NetWork.getHttpWebRequest("redapi2/api/kebiao", paramList); //新
             if (kbtemp != "")
             {
                 JObject job = JObject.Parse(kbtemp);
                 if (Int32.Parse(job["status"].ToString()) == 200)
                 {
                     JArray jarry = Utils.ReadJso(kbtemp);
                     for (int j = 0; j < jarry.Count; j++)
                     {
                         ClassListLight cll = new ClassListLight();
                         var istriple = cll.getattribute((JObject)jarry[j]);
                         cll.Name = new string[] { muIdList[i].uName }; // muIdList[i].uName;
                         if (istriple != null)
                         {
                             clist.Add(istriple);
                             istriple.Name = cll.Name;
                         }
                         clist.Add(cll);
                     }
                 }
                 issuccess = 2;
             }
             else
             {
                 issuccess++;
             }
         }
         forsearchlist.Add(muIdList[i].uName, clist);
         FreeLoddingProgressBar.Value = FreeLoddingProgressBar.Value + 100.0 / muIdList.Count;
         Debug.WriteLine(FreeLoddingProgressBar.Value);
     }
     //查无课表,参数第几周==
     EmptyClass ec = new EmptyClass(week, forsearchlist);
     ec.getfreetime(result, termresult);
     //freetime(11, forsearchlist);
     FreeLoddingStackPanel.Visibility = Visibility.Collapsed;
     FreeKBTableGrid.Visibility = Visibility.Visible;
     ShowWeekendAppBarButton.Visibility = Visibility.Visible;
     if (result.Count != 0)
         showFreeKB(result);
     else
         showFreeKB(termresult);
 }