private void UpdateView() { ClearEventDetails(); ForceUpdate(); UpdateTodaysEvents(_calendar.GetControl().SelectionStart); ToggleButtons(); TodaysEventsListBox.Refresh(); }
private void UpdateEventDetails() { try { string id = ((SavedEvent)Todays_Events.SelectedIndex())?.Id; if (!string.IsNullOrEmpty(id)) { SavedEvent @event = _events.GetEvent(id); if (@event != null) { TodaysEventsListBox.Refresh(); DateAndTime currDate = new DateAndTime(TimeAndDateUtility.GetCurrentDate(), TimeAndDateUtility.GetCurrentTime()); SetEventDetails(@event); ToggleViewButtons(true, TimeAndDateUtility.IsBeforeRange(@event.ActivationDate, currDate)); } } } catch (Exception) { // Log } }
private void TodaysEvents_SelectedIndexChanged(object sender, EventArgs e) { UpdateEventDetails(); TodaysEventsListBox.Refresh(); }