Esempio n. 1
0
 private void Add_NeeStudent(Object sender, StudentEventArgs e)
 {
     if (e.student != null)
     {
         students++;
         list.Add(e.student);
     }
 }
Esempio n. 2
0
 //注册到学校的花名册,同时发布事件
 public void ProcessRegister()
 {
     Student s;
     for (int i = 0; i < list.Count; i++ )
     {
         s = (Student)list[i];
         //创建事件参数
         StudentEventArgs e = new StudentEventArgs(s);
         if (onNewStudent != null && s != null)
         {
             onNewStudent(this, e);//触发事件,并发送学生信息
         }
     }
 }
Esempio n. 3
0
        //注册到学校的花名册,同时发布事件
        public void ProcessRegister()
        {
            Student s;

            for (int i = 0; i < list.Count; i++)
            {
                s = (Student)list[i];
                //创建事件参数
                StudentEventArgs e = new StudentEventArgs(s);
                if (onNewStudent != null && s != null)
                {
                    onNewStudent(this, e);//触发事件,并发送学生信息
                }
            }
        }
Esempio n. 4
0
 private void Add_NeeStudent(Object sender, StudentEventArgs e)
 {
     if (e.student != null)
     {
         students++;
         list.Add(e.student);
     }
 }