public void Add(CStudent student, bool IsActive) { count++; COneRecord record = new COneRecord(student, count); record.IsActive = IsActive; list.Add(record); record.AddToPanel(this.panel, 0, 28 * count); }
public void Add(bool IsActive) { count++; CStudent Nst = new CStudent(); Source.Add(Nst); COneRecord record = new COneRecord(Nst, count); record.IsActive = IsActive; list.Add(record); record.AddToPanel(this.panel, 0, 28 * count); }
public CStudent Clone() { CStudent res = new CStudent(); res.fIO = this.fIO; res.ef = this.ef; res.c = this.c; res.sp = this.sp; res.g = this.g; res.Exams = this.Exams.Clone(); return(res); }
public void Dispose() { idL = null; for (int i = 0; i < 3; i++) { FIO[i] = null; } for (int i = 0; i < 4; i++) { HInfo[i] = null; } ShowExams = DeleteRec = null; pred = ""; Student = null; isActive = false; }
public COneRecord(CStudent student, int id) { Student = student; Student.IsActive = true; idL = new Label(); idL.Text = id.ToString(); idL.Font = new System.Drawing.Font("Times New Roman", 10); idL.Width = 50; idL.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; pred = StringEquivalents.Specializations[(int)student.specialization]; FIO = new TextBox[3]; for (int i = 0; i < 3; i++) { FIO[i] = new TextBox(); FIO[i].Width = 120; FIO[i].Multiline = false; FIO[i].Font = new System.Drawing.Font("Times New Roman", 10); FIO[i].Text = Student.FIO[i]; } if (FIO[0].Text == "") { FIO[0].BackColor = System.Drawing.Color.Red; } if (FIO[1].Text == "") { FIO[1].BackColor = System.Drawing.Color.Red; } FIO[0].TextChanged += COneRecord_TextChanged; FIO[1].TextChanged += COneRecord_TextChanged6; FIO[2].TextChanged += COneRecord_TextChanged7; FIO[0].Leave += COneRecord_Leave1; FIO[1].Leave += COneRecord_Leave2; FIO[2].Leave += COneRecord_Leave; HInfo = new ComboBox[4]; for (int i = 0; i < 4; i++) { HInfo[i] = new ComboBox(); HInfo[i].Font = new System.Drawing.Font("Times New Roman", 10); } HInfo[0].Items.AddRange(StringEquivalents.EdForms); for (int i = 1; i <= (StringEquivalents.Nsemestrs) / 2; i++) { HInfo[1].Items.Add(i); } HInfo[2].Items.AddRange(StringEquivalents.Specializations); HInfo[0].Width = 80; HInfo[1].Width = 50; HInfo[2].Width = 80; HInfo[3].Width = 50; HInfo[0].Text = StringEquivalents.EdForms[Student.ed]; HInfo[1].Text = Student.course.ToString(); HInfo[2].Text = StringEquivalents.Specializations[Student.specialization]; HInfo[3].Text = Student.Group.ToString(); Generate(); HInfo[0].TextChanged += COneRecord_TextChanged5; HInfo[1].TextChanged += COneRecord_TextChanged4; HInfo[2].TextChanged += COneRecord_TextChanged2; HInfo[3].TextChanged += COneRecord_TextChanged3; ShowExams = new Button(); if (student.FIO[0] == "" && student.FIO[1] == "" && student.FIO[2] == "") { ShowExams.Text = "Fill Exams"; } else { ShowExams.Text = "Show Exams"; } ShowExams.Width = 80; ShowExams.Padding = new Padding(4, 2, 0, 2); ShowExams.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; ShowExams.Click += ShowExams_Click; DeleteRec = new Button(); DeleteRec.Text = "Delete record"; DeleteRec.Width = 80; DeleteRec.Padding = new Padding(4, 2, 0, 2); DeleteRec.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; DeleteRec.Click += DeleteRec_Click; for (int i = 0; i < student.exams.Semesters.Length; i++) { Student.exams.Semesters[i].SetFilling(i, student.course); } }