コード例 #1
0
        public void ReportProgress(int progress)
        {
            int current = (int)(Convert.ToSingle(progress) * (_percentage / 100f));

            _main_progress.ReportProgress(current - _previous_progress);
            _previous_progress = current;
        }
コード例 #2
0
        public SCETakeCollection LoadData()
        {
            int current = 0;
            SCETakeCollection includes = new SCETakeCollection();

            foreach (List <string> each in _packings)
            {
                current++;

                if (_progress.Cancellation)
                {
                    break;
                }

                _progress.ReportProgress(string.Format("下載成績相關資料({0}%)", Math.Round(((float)current / (float)_packings.Count) * 100, 0)), 0);
                XmlElement xmlRecords = QueryCourse.GetSECTake(each.ToArray()).GetContent().BaseElement;

                foreach (XmlElement attend in xmlRecords.SelectNodes("Score"))
                {
                    SCETake include = new SCETake(attend);
                    includes.Add(include);
                }
            }

            return(includes);
        }
コード例 #3
0
ファイル: SCAttend.cs プロジェクト: ischoolinc/JHEvaluation
        public SCAttendCollection LoadData()
        {
            int current = 0;
            SCAttendCollection objSCAttends = new SCAttendCollection();

            foreach (List <string> each in _packings)
            {
                current++;

                if (_progress.Cancellation)
                {
                    break;
                }

                _progress.ReportProgress(string.Format("下載修課相關資料({0}%)", Math.Round(((float)current / (float)_packings.Count) * 100, 0)), 0);
                XmlElement xmlSCAttends = QueryCourse.GetSCAttendBrief(each.ToArray()).GetContent().BaseElement;

                foreach (XmlElement attend in xmlSCAttends.SelectNodes("Student"))
                {
                    SCAttend scattend = new SCAttend(attend);
                    objSCAttends.Add(scattend.Identity, scattend);
                }
            }

            return(objSCAttends);
        }
コード例 #4
0
 private void ReportProgress(string message, int progress)
 {
     _progress_ui.ReportProgress(message, progress);
 }