protected void OnBoothAllocated(int boothId) { EventHandler <BoothAllocatedEventArgs> handler = BoothAllocated; BoothAllocatedEventArgs e = new BoothAllocatedEventArgs(StudentId, boothId); handler?.Invoke(this, e); }
protected void OnBoothAllocated(object sender, BoothAllocatedEventArgs e) { RecordPanel record = new RecordPanel(); record.StudentId = e.StudentId; record.Status = String.Format("{0} 號平板", e.BoothId); recordLayout.Controls.Add(record); recordLayout.Controls.SetChildIndex(record, 0); boothPanels[e.BoothId - 1].LastUpdated = DateTime.Now; }