Пример #1
0
        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);
            }
        }
Пример #2
0
        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);
            }
        }
Пример #3
0
 public void SetQuickEventsTemplates(QuickEventsTemplates templates)
 {
     quickEventsTemplates = templates;
 }
Пример #4
0
 public void SetQuickEventsTemplates(QuickEventsTemplates templates)
 {
     quickEventsTemplates = templates;
 }