public TechSupportWindow(CoursesRecord Courses) { this.Courses = Courses; ListLabel = new Label { Location = new Point(5, 5), Size = new Size(ClientSize.Width - 10, 15), Text = "Список курсов:" }; CoursesList = new ListBox { Location = new Point(5, ListLabel.Bottom + 5), Size = new Size(ClientSize.Width - 10, 100) }; CourseLabel = new Label { Location = new Point(5, CoursesList.Bottom), Size = new Size(ClientSize.Width - 10, 15), Text = "Введите название курса" }; CourseName = new TextBox { Location = new Point(5, CourseLabel.Bottom), Size = CourseLabel.Size }; CreateCourse = new Button { Location = new Point(5, CourseName.Bottom + 5), Size = new Size(ClientSize.Width / 2 - 10, 30), Enabled = false, Text = "Создать курс" }; RemoveCourse = new Button { Location = new Point(CreateCourse.Right + 5, CourseName.Bottom + 5), Size = new Size(ClientSize.Width / 2 - 5, 30), Enabled = false, Text = "Удалить курс" }; Controls.Add(ListLabel); Controls.Add(CourseLabel); Controls.Add(CourseName); Controls.Add(CreateCourse); Controls.Add(RemoveCourse); Controls.Add(CoursesList); UpdateList(); CourseName.TextChanged += new EventHandler(CourseName_TextChanged); CreateCourse.Click += new EventHandler(CreateCourse_Click); RemoveCourse.Click += new EventHandler(RemoveCourse_Click); Courses.Update += UpdateList; }
public StudentsWindow(CoursesRecord Courses, string Name) { this.Courses = Courses; this.Name = Name; //Members = new CourseMembers(); ListLabel = new Label { Location = new Point(5, 5), Size = new Size(ClientSize.Width - 10, 15), Text = "Список курсов:" }; CoursesList = new ListBox { Location = new Point(5, ListLabel.Bottom + 5), Size = new Size(ClientSize.Width - 10, 100) }; FollowCourse = new Button { Location = new Point(5, CoursesList.Bottom + 5), Size = new Size(ClientSize.Width / 2 - 10, 30), Text = "Подписаться на курс" }; UnfollowCourse = new Button { Location = new Point(FollowCourse.Right + 5, CoursesList.Bottom + 5), Size = new Size(ClientSize.Width / 2 - 5, 30), Enabled = false, Text = "Отписаться от курса" }; Controls.Add(ListLabel); Controls.Add(CoursesList); Controls.Add(FollowCourse); Controls.Add(UnfollowCourse); UpdateList(); FollowCourse.Click += new EventHandler(FollowCourse_Click); UnfollowCourse.Click += new EventHandler(UnfollowCourse_Click); CoursesList.SelectedIndexChanged += new EventHandler(CoursesList_SelectedIndexChanged); }
public TeacherWindow(CoursesRecord Courses) { this.Courses = Courses; ListLabel = new Label { Location = new Point(5, 5), Size = new Size(ClientSize.Width - 10, 15), Text = "Список студентов подписанных на курсы:" }; CoursesList = new TreeView { Location = new Point(5, ListLabel.Bottom + 5), Size = new Size(ClientSize.Width - 10, 100) }; Controls.Add(ListLabel); Controls.Add(CoursesList); AddNodes(); }
public Sign_In() { Courses = new CoursesRecord(); StudentList = new Students(); Support = new TechSupport(); TeacherList = new Teachers(); EnterLabel = new Label { Location = new Point(5, 5), Size = new Size(ClientSize.Width - 10, 15), Text = "Введите ФИО", }; NameBox = new TextBox { Location = new Point(5, EnterLabel.Bottom), Size = EnterLabel.Size }; ChooseBox = new Panel { Location = new Point(0, NameBox.Bottom), Size = new Size(ClientSize.Width, 80) }; Student = new RadioButton { Location = new Point(5, 5), Size = new Size(ChooseBox.Width, 25), Text = "Войти как студент", Checked = true, Enabled = false }; Teacher = new RadioButton { Location = new Point(5, Student.Bottom), Size = new Size(ChooseBox.Width, 25), Text = "Войти как преподаватель", Enabled = false }; TechSupport = new RadioButton { Location = new Point(5, Teacher.Bottom), Size = new Size(ChooseBox.Width, 25), Text = "Войти как техподдержка", Enabled = false }; Login = new Button { Location = new Point(10, ChooseBox.Bottom + 5), Size = new Size(ClientSize.Width / 2, 25), Text = "Войти" }; Controls.Add(EnterLabel); Controls.Add(NameBox); Controls.Add(ChooseBox); ChooseBox.Controls.Add(Student); ChooseBox.Controls.Add(Teacher); ChooseBox.Controls.Add(TechSupport); Controls.Add(Login); NameBox.TextChanged += new EventHandler(NameBox_TextChanged); Login.Click += new EventHandler(Login_Click); }