public RankingExamForm(string type, string category) { InitializeComponent(); _students = RStudentRecord.LoadStudents(K12.Presentation.NLDPanels.Student.SelectedSource); _ranker = new Rank(); _collector = new RankDataCollector(_students, _ranker); _collector.RankType = RankType.Class; _reportName = string.Empty; _form = new RankingExamOptionForm(); _use_zero = _form.UseZero; _carry = _form.Carry; _ranker.Sequence = _form.Sequence; lblSelectedCount.Text = string.Format("已選擇人數:{0}", _students.Count); _type = type; _category = category; if (Type.Equals("Exam")) { InitializeExam(); cboExam.Enabled = true; cboExam.Visible = true; panel1.Size = new Size(panel1.Width, 60); _reportName = "評量成績"; this.Text = "評量成績排名"; } if (Category.Equals("Subject")) { chCategory.HeaderText = "科目"; } else if (Category.Equals("Domain")) { chCategory.HeaderText = "領域"; } _reportName += chCategory.HeaderText + "排名"; _collector.Category = chCategory.HeaderText; InitializeSemester(); InitializeCombineType(); Color c = (DevComponents.DotNetBar.Rendering.GlobalManager.Renderer as DevComponents.DotNetBar.Rendering.Office2007Renderer).ColorTable.CheckBoxItem.Default.Text; SetColor(c); }
public RankingSemesterForm(string type, string category) { InitializeComponent(); Students = RStudentRecord.LoadStudents(K12.Presentation.NLDPanels.Student.SelectedSource); SemesterScores = RSemesterScoreCollection.LoadScores(Students.AsKeyList()); _ranker = new Rank(); _collector = new RankDataCollector(Students, _ranker); _collector.RankType = RankType.Class; _reportName = string.Empty; _form = new RankingSemesterOptionForm(); _carry = _form.Carry; _ranker.Sequence = _form.Sequence; lblSelectedCount.Text = string.Format("已選擇人數:{0}", Students.Count); _type = type; _category = category; _reportName = "學期成績"; this.Text = "學期成績排名"; if (Category.Equals("Subject")) { chCategory.HeaderText = "科目"; } else if (Category.Equals("Domain")) { chCategory.HeaderText = "領域"; } _reportName += chCategory.HeaderText + "排名"; _collector.Category = chCategory.HeaderText; InitializeSemester(); InitializeCombineType(); Color c = (DevComponents.DotNetBar.Rendering.GlobalManager.Renderer as DevComponents.DotNetBar.Rendering.Office2007Renderer).ColorTable.CheckBoxItem.Default.Text; SetColor(c); }