示例#1
0
        public ClassroomManagerFrom()
        {
            InitializeComponent();
            classroomState   = new ClassroomState();
            classroomManager = new ClassroomManager();

            classroomManager.Attach(new StudentAFrom(classroomManager));
            classroomManager.Attach(new StudentBFrom(classroomManager));

            classroomManager.classroomState = classroomState;

            classList   = new List <string>();
            teacherList = new List <string>();

            teacherList.Add("Bob");
            teacherList.Add("Ben");
            teacherList.Add("Joe");
            teacherList.Add("Jack");
            teacherList.Add("John");

            classList.Add("ei1");
            classList.Add("ei2");
            classList.Add("ei3");
            classList.Add("ei4");
            classList.Add("ei5");

            timer          = new Timer();
            timer.Tick    += Timer_Tick;
            timer.Interval = (5000);
            timer.Start();
        }
示例#2
0
        public new void Update()
        {
            ClassroomState cs = classroomManager.GetState();

            this.textBoxTeacher.Text = (cs.TeacherName);
        }
示例#3
0
        public new void Update()
        {
            ClassroomState cs = classroomManager.GetState();

            this.textBoxClasses.Text = (cs.Class);
        }