public void ToggleEditButtons(bool state) { foreach (Control control in EventsPanel.Controls) { EventView eventView = control as EventView; eventView.ToggleEditButton(state); } }
public void ToggleButtons(bool state) { AddEventButton.Enabled = state; MonthlyEventsButton.Enabled = state; Calendar.Enabled = state; foreach (Control control in EventsPanel.Controls) { EventView eventView = control as EventView; eventView.ToggleEditButton(state); eventView.ToggleDeleteButton(state); } }
public void AddEvent(Event newEvent) { EventView newEventView = new EventView(this, newEvent); EventsPanel.Controls.Add(newEventView); }