private void FireListeners(Update update) { foreach (IViewUpdateListener listener in updateListeners) { listener.ReflectUpdate(update); } }
private void button1_Click(object sender, EventArgs e) { Update update = new Update(); update.Name = nameField.Text; update.Data = dataField.Text; FireListeners(update); }
public void ReflectUpdate(Update update) { this.model.Name = update.Name; this.model.Data = update.Data; }