public AddQuickEventViewModel(IGoogleCalendar googleCalendar, IRepository commonRepository, IMessanger commonMessanger) { try { log.Debug("Loading AddQuickEvent view model..."); calendar = googleCalendar; repository = commonRepository; messanger = commonMessanger; quickEventsTemplates = repository.GetQuickEventsTemplates(); LoadData(); SelectTemplateCommand = new RelayCommand(SelectTemplate); MoveUpTemplateCommand = new RelayCommand(MoveUpTemplate); MoveDownTemplateCommand = new RelayCommand(MoveDownTemplate); RemoveTemplateCommand = new RelayCommand(RemoveTemplate); AddQuickEventCommand = new RelayCommand(AddQuickEvent); SaveAsTemplateCommand = new RelayCommand(SaveAsTemplate); log.Debug("AddQuickEvent view model was succssfully loaded"); } catch (Exception ex) { log.Error("Failed to load AddQuickEvent view model:", ex); } }
public void SetQuickEventsTemplates(QuickEventsTemplates templates) { quickEventsTemplates = templates; }