public void RefreshView(List <Users> list_users, List <EventCalendar> list_event_calendar, List <TrainingCalendar> list_training_calendar, NoteCalendar note_calendar, int curr_month) { BackgroundWorker worker = new BackgroundWorker(); worker.DoWork += delegate { this.list_users = list_users; this.event_list = list_event_calendar; this.training_list = list_training_calendar; this.note_calendar = note_calendar; this.target_month = curr_month; delegateRefreshView del = new delegateRefreshView(this.RefreshView); this.Invoke(del); }; worker.RunWorkerCompleted += delegate { // Do nothing. }; worker.RunWorkerAsync(); }
public void RefreshView(List<Users> list_users, List<EventCalendar> list_event_calendar, List<TrainingCalendar> list_training_calendar, NoteCalendar note_calendar, int curr_month) { BackgroundWorker worker = new BackgroundWorker(); worker.DoWork += delegate { this.list_users = list_users; this.event_list = list_event_calendar; this.training_list = list_training_calendar; this.note_calendar = note_calendar; this.target_month = curr_month; delegateRefreshView del = new delegateRefreshView(this.RefreshView); this.Invoke(del); }; worker.RunWorkerCompleted += delegate { // Do nothing. }; worker.RunWorkerAsync(); }