コード例 #1
0
        public FriendDetailVeiwModel(IFriendRepository friendRepository, IEventAggregator eventAggregator,
                                     IMassegeDialogService massegeDialogService,
                                     IProgrammingLanguageLookupDataService programmingLanguageLookupDataService) : base(eventAggregator, massegeDialogService)
        {
            _friendRepository = friendRepository;
            _programmingLanguageLookupDataService = programmingLanguageLookupDataService;
            AddPhoneNumberCommand    = new DelegateCommand(OnAddPhoneNumberExecute);
            RemovePhoneNumberCommand = new DelegateCommand(OnRemovePhoneNumberExecute, OnRemovePhoneNumberCanExecute);

            ProgrammingLanguages = new ObservableCollection <LookupItem>();
            PhoneNumbers         = new ObservableCollection <FriendPhoneNumberWrapper>();
        }
コード例 #2
0
 public ClientDetailViewModel(IClientRepository clientDataService,
                              IEventAggregator eventAggregator,
                              IMessageDialogService messageDialogService,
                              IProgrammingLanguageLookupDataService programmingLanguageLookupDataService)
 {
     _clientRepository     = clientDataService;
     _eventAggregator      = eventAggregator;
     _messageDialogService = messageDialogService;
     _programmingLanguageLookupDataService = programmingLanguageLookupDataService;
     SaveCommand          = new DelegateCommand(OnSaveExecute, OnSaveCanExecute);
     DeleteCommand        = new DelegateCommand(OnDeleteExecute);
     ProgrammingLanguages = new ObservableCollection <LookupItem>();
 }
コード例 #3
0
        public FriendDetailViewModel(IFriendRepository friendRepository, IEventAggregator eventAggregator, IMessageDialogService messageDialogService,
                                     IProgrammingLanguageLookupDataService programmingLanguageLookupDataService) : base(eventAggregator, messageDialogService)
        {
            _friendRepository = friendRepository;
            _programmingLanguageLookupDataService = programmingLanguageLookupDataService;

            eventAggregator.GetEvent <AfterCollectionSavedEvent>().Subscribe(AfterCollectionSaved);

            AddPhoneNumberCommand    = new DelegateCommand(OnAddPhoneNumberExecute);
            RemovePhoneNumberCommand = new DelegateCommand(OnRemovePhoneNumberExecute, OnRemovePhoneNumberCanExecute);

            ProgrammingLanguages = new ObservableCollection <LookupItem>();
            PhoneNumbers         = new ObservableCollection <FriendPhoneNumberWrapper>();
        }
コード例 #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="fds"></param>
        /// <param name="ea"></param>
        public FriendDetailViewModel(IFriendRepository fds
                                     , IEventAggregator ea
                                     , IMessageDialogService mds
                                     , IProgrammingLanguageLookupDataService ldspl)
            : base(ea, mds)
        {
            _friendRepository = fds;
            _lookupDataServiceProgrammingLanguage = ldspl;

            EventAggregator.GetEvent <AfterCollectionSaveEvent>().Subscribe(OnAfterCollectionSaveEvent);
            // Geenrate Event
            AddPhoneNumberCommand    = new DelegateCommand(OnAddPhoneNumberExecute);
            RemovePhoneNumberCommand = new DelegateCommand(OnRemovePhoneNumberExecute, OnRemovePhoneNumberCanExecute);
            ProgrammingLanguages     = new ObservableCollection <LookupItem>();
            PhoneNumbers             = new ObservableCollection <FriendPhoneNumberWrapper>();
        }