public void Init(LearnersDbThalamusClient client, IStudentsDatabase database) { Client = client; Database = database; database.StudentListUpdatedEvent += delegate(object sender, StudentListEventArgs args) { if (args.StudentList != null) { this.Dispatcher.Invoke(new Action(() => { Student1ComboBox.ItemsSource = Student2ComboBox.ItemsSource = args.StudentList; })); } }; Database.ConnectedEvent += delegate(object sender, EventArgs args) { Database.GetAllStudentsAsync(); }; }