public ContactListViewModel(INavigation navigation)
        {
            _navigation = navigation;
            _contactsService = ServiceLocator.ContactsService;

            Contacts = new ObservableCollection<Contact>();
        }
 public InCallMessagingViewModel(IChatService chatMng, IContactsService contactsMng)
     : base(chatMng, contactsMng)
 {
     Init();
     _chatsManager.RttReceived += OnRttReceived;
     _chatsManager.ConversationUpdated += OnChatRoomUpdated;
 }
        public AttendingUserDetailsViewModel(ICTimeService cTimeService, IApplicationStateService applicationStateService, IContactsService contactsService, IDialogService dialogService, IPhoneService phoneService, IEmailService emailService)
        {
            Guard.NotNull(cTimeService, nameof(cTimeService));
            Guard.NotNull(applicationStateService, nameof(applicationStateService));
            Guard.NotNull(contactsService, nameof(contactsService));
            Guard.NotNull(dialogService, nameof(dialogService));
            Guard.NotNull(phoneService, nameof(phoneService));
            Guard.NotNull(emailService, nameof(emailService));

            this._cTimeService = cTimeService;
            this._applicationStateService = applicationStateService;
            this._contactsService = contactsService;
            this._dialogService = dialogService;
            this._phoneService = phoneService;
            this._emailService = emailService;

            this.LoadAttendingUser = UwCoreCommand.Create(this.LoadAttendingUserImpl)
                .HandleExceptions()
                .ShowLoadingOverlay(CTime2Resources.Get("Loading.Employee"));
            this.LoadAttendingUser.ToProperty(this, f => f.AttendingUser, out this._attendingUserHelper);
            
            var canCall = Observable
                .Return(this._phoneService.CanCall)
                .CombineLatest(this.WhenAnyValue(f => f.AttendingUser), (serviceCanCall, user) => 
                    serviceCanCall && string.IsNullOrWhiteSpace(user?.PhoneNumber) == false);
            this.Call = UwCoreCommand.Create(canCall, this.CallImpl)
                .HandleExceptions();

            var canSendMail = this.WhenAnyValue(f => f.AttendingUser, selector: user => string.IsNullOrWhiteSpace(user?.EmailAddress) == false);
            this.SendMail = UwCoreCommand.Create(canSendMail, this.SendMailImpl)
                .HandleExceptions();

            this.AddAsContact = UwCoreCommand.Create(this.AddAsContactImpl)
                .HandleExceptions();
        }
 public SimpleMessagingViewModel(IChatService chatMng, IContactsService contactsMng)
     : base(chatMng, contactsMng)
 {
     Init();
     _chatsManager.ConversationUnReadStateChanged += OnUnreadStateChanged;
     _chatsManager.ConversationDeclineMessageReceived += OnDeclineMessageReceived;
 }
 /// <summary>
 /// Ao criar o ViewModel (apenas uma vez), é criado alguns contatos de teste e enviado para a lista
 /// </summary>
 /// <param name="contactsService"></param>
 public ContactsListViewModel(IContactsService contactsService)
 {
     _contactsService = contactsService;
     var c1 = new ContactsModel("renan", "silva");
     var c2 = new ContactsModel("joao", "sub1");
     var c3 = new ContactsModel("maria", "sub2");
     contactsService.AddContact(c1);
     contactsService.AddContact(c2);
     contactsService.AddContact(c3);
 }
 public ContactsViewModel(IContactsService contactService, DialpadViewModel dialpadViewModel)
     : this()
 {
     _contactsService = contactService;
     _contactsService.ContactAdded += ContactAdded;
     _contactsService.ContactRemoved += ContactRemoved;
     _contactsService.ContactsChanged += ContactChanged;
     _contactsService.ContactsLoadCompleted += ContactsLoadCompleted;
     _dialpadViewModel = dialpadViewModel;
     _dialpadViewModel.PropertyChanged += OnDialpadPropertyChanged;
 }
        public ContactsPresenter(IContactsView view,
                                 IContactsService contactsService) : base(view)
        {
            if (contactsService == null)
            {
                throw new ArgumentNullException("Contacts service cannot be null.");
            }

            this.contactsService       = contactsService;
            this.View.ListingContacts += OnListingContacts;
            this.View.FilterContacts  += OnFilteringContacts;
        }
        public TestContactsViewModel(IContactsService contactsService, IRegionManager regionManager, Contact[] contacts) : 
            base(contactsService, regionManager)
        {
            var viewCollection = this.Contacts as ListCollectionView;

            foreach(var contact in contacts)
            {
                viewCollection.AddNewItem(contact);
            }

            viewCollection.MoveCurrentTo(null);
        }
        public ContactsViewModel(IContactsService contactsService, IRegionManager regionManager)
        {
            this.contactsService = contactsService;
            this.emailContactCommand = new DelegateCommand<object>(this.EmailContact, this.CanEmailContact);

            this.contactsCollection = new ObservableCollection<Contact>();
            this.contactsView = new ListCollectionView(this.contactsCollection);
            this.contactsView.CurrentChanged += (s, e) => this.emailContactCommand.RaiseCanExecuteChanged();

            this.regionManager = regionManager;
            var task = Initialize();
        }
 public CallHistoryViewModel(IHistoryService historyService, DialpadViewModel dialpadViewModel)
     : this()
 {
     _historyService = historyService;
     _contactService = ServiceManager.Instance.ContactService;
     _contactService.ContactAdded += OnNewContactAdded;
     _contactService.ContactsChanged += OnContactChanged;
     _contactService.ContactRemoved += OnContactRemoved;
     _historyService.OnCallHistoryEvent += CallHistoryEventChanged;
     _dialpadViewModel = dialpadViewModel;
     _dialpadViewModel.PropertyChanged += OnDialpadPropertyChanged;
 }
        public ContactsServiceTests(Configuration configuration)
        {
            this.InitializeMapper();
            this.InitializeDatabaseAndRepositories();
            this.InitializeFields();

            this.emailSender     = new SendGridEmailSender(configuration.ConfigurationRoot["SendGrid:ApiKey"]);
            this.contactsService = new ContactsService(
                this.userContactsRepository,
                this.adminContactsRepository,
                this.emailSender);
        }
        public ContactsViewModel(IContactsService contactsService, IRegionManager regionManager)
        {
            this.contactsService     = contactsService;
            this.emailContactCommand = new DelegateCommand <object>(this.EmailContact, this.CanEmailContact);

            this.contactsCollection           = new ObservableCollection <Contact>();
            this.contactsView                 = new ListCollectionView(this.contactsCollection);
            this.contactsView.CurrentChanged += (s, e) => this.emailContactCommand.RaiseCanExecuteChanged();

            this.regionManager = regionManager;
            var task = Initialize();
        }
Beispiel #13
0
        public TestContactsViewModel(IContactsService contactsService, IRegionManager regionManager, Contact[] contacts) :
            base(contactsService, regionManager)
        {
            var viewCollection = this.Contacts as ListCollectionView;

            foreach (var contact in contacts)
            {
                viewCollection.AddNewItem(contact);
            }

            viewCollection.MoveCurrentTo(null);
        }
Beispiel #14
0
        public SettingsViewModel(IProtoService protoService, ICacheService cacheService, IEventAggregator aggregator, INotificationsService pushService, IContactsService contactsService)
            : base(protoService, cacheService, aggregator)
        {
            _pushService     = pushService;
            _contactsService = contactsService;

            AskCommand       = new RelayCommand(AskExecute);
            LogoutCommand    = new RelayCommand(LogoutExecute);
            EditPhotoCommand = new RelayCommand <StorageFile>(EditPhotoExecute);

            Aggregator.Subscribe(this);
        }
Beispiel #15
0
        public SettingsViewModel(IMTProtoService protoService, ICacheService cacheService, ITelegramEventAggregator aggregator, IUpdatesService updatesService, IPushService pushService, IContactsService contactsService, IUploadFileManager uploadFileManager, IStickersService stickersService)
            : base(protoService, cacheService, aggregator)
        {
            _updatesService    = updatesService;
            _pushService       = pushService;
            _contactsService   = contactsService;
            _uploadFileManager = uploadFileManager;
            _stickersService   = stickersService;

            AskCommand       = new RelayCommand(AskExecute);
            LogoutCommand    = new RelayCommand(LogoutExecute);
            EditPhotoCommand = new RelayCommand <StorageFile>(EditPhotoExecute);
        }
        public DepartmentService(IDepartmentRepository repository,
                                 IContactsService contactsService,
                                 ICommonService commonService)
        {
            if (repository == null)
            {
                throw new ArgumentNullException("repository");
            }

            _Repository      = repository;
            _contactsService = contactsService;
            _commonService   = commonService;
        }
Beispiel #17
0
 public ContactsViewModel(IContactsService contactService, DialpadViewModel dialpadViewModel) :
     this()
 {
     _contactsService = contactService;
     _contactsService.ContactAdded          += ContactAdded;
     _contactsService.ContactRemoved        += ContactRemoved;
     _contactsService.ContactsChanged       += ContactChanged;
     _contactsService.ContactsLoadCompleted += ContactsLoadCompleted;
     _dialpadViewModel = dialpadViewModel;
     _dialpadViewModel.PropertyChanged += OnDialpadPropertyChanged;
     ImportInProgress = false;
     ExportInProgress = false;
 }
        public void Initialize()
        {
            var options = new DbContextOptionsBuilder <ContactListContext>()
                          .UseInMemoryDatabase(databaseName: "inMemoryDb")
                          .Options;

            _dbContext = new ContactListContext(options);

            _personRepository  = new PersonRepository(_dbContext);
            _contactRepository = new ContactRepository(_dbContext);

            _contactsService = new ContactsService(_contactRepository, _personRepository);
        }
Beispiel #19
0
        public SettingsViewModel(IProtoService protoService, ICacheService cacheService, ISettingsService settingsService, IEventAggregator aggregator, INotificationsService pushService, IContactsService contactsService, ISettingsSearchService searchService)
            : base(protoService, cacheService, settingsService, aggregator)
        {
            _pushService     = pushService;
            _contactsService = contactsService;
            _searchService   = searchService;

            AskCommand       = new RelayCommand(AskExecute);
            EditPhotoCommand = new RelayCommand <StorageFile>(EditPhotoExecute);
            NavigateCommand  = new RelayCommand <SettingsSearchEntry>(NavigateExecute);

            Results = new MvxObservableCollection <SettingsSearchEntry>();
        }
 public MessagingViewModel(IChatService chatMng, IContactsService contactsMng)
     : this()
 {
     this._chatsManager = chatMng;
     this._contactsManager = contactsMng;
     this._chatsManager.ConversationUpdated += OnConversationUpdated;
     this._chatsManager.NewConversationCreated += OnNewConversationCreated;
     this._chatsManager.ConversationClosed += OnConversationClosed;
     this._chatsManager.ContactsChanged += OnContactsChanged;
     this._chatsManager.ContactAdded += OnChatContactAdded;
     this._chatsManager.ContactRemoved += OnChatContactRemoved;
     this._contactsManager.LoggedInContactUpdated += OnLoggedContactUpdated;
 }
Beispiel #21
0
 public ContactsController(IContactsService contactsService,
                           IAlbumsService albumsService,
                           IImagesService imagesService,
                           IWebHostEnvironment hostEnvironment,
                           SignInManager <IdentityUser> signInManager,
                           UserManager <IdentityUser> userManager)
 {
     _ContactsService    = contactsService;
     _AlbumsService      = albumsService;
     _ImagesService      = imagesService;
     _WebHostEnvironment = hostEnvironment;
     _SignInManager      = signInManager;
     _UserManager        = userManager;
 }
 public EventsController(IAlbumsService albumsService,
                         IEventsService eventsService,
                         IContactsService contactsService,
                         IWebHostEnvironment hostEnvironment,
                         SignInManager <IdentityUser> signInManager,
                         UserManager <IdentityUser> userManager)
 {
     _AlbumsService      = albumsService;
     _EventsService      = eventsService;
     _ContactsService    = contactsService;
     _WebHostEnvironment = hostEnvironment;
     _SignInManager      = signInManager;
     _UserManager        = userManager;
 }
Beispiel #23
0
        public SettingsPrivacyAndSecurityViewModel(IProtoService protoService, ICacheService cacheService, IEventAggregator aggregator, IContactsService contactsService, SettingsPrivacyShowStatusViewModel statusTimestamp, SettingsPrivacyAllowCallsViewModel phoneCall, SettingsPrivacyAllowChatInvitesViewModel chatInvite)
            : base(protoService, cacheService, aggregator)
        {
            _contactsService = contactsService;

            _showStatusRules       = statusTimestamp;
            _allowCallsRules       = phoneCall;
            _allowChatInvitesRules = chatInvite;

            PasswordCommand      = new RelayCommand(PasswordExecute);
            ClearPaymentsCommand = new RelayCommand(ClearPaymentsExecute);
            AccountTTLCommand    = new RelayCommand(AccountTTLExecute);
            PeerToPeerCommand    = new RelayCommand(PeerToPeerExecute);
        }
        public SettingsPrivacyAndSecurityViewModel(IMTProtoService protoService, ICacheService cacheService, ITelegramEventAggregator aggregator, IContactsService contactsService, SettingsPrivacyStatusTimestampViewModel statusTimestamp, SettingsPrivacyPhoneCallViewModel phoneCall, SettingsPrivacyChatInviteViewModel chatInvite)
            : base(protoService, cacheService, aggregator)
        {
            _contactsService = contactsService;

            _statusTimestampRules = statusTimestamp;
            _phoneCallRules       = phoneCall;
            _chatInviteRules      = chatInvite;

            PasswordCommand      = new RelayCommand(PasswordExecute);
            ClearPaymentsCommand = new RelayCommand(ClearPaymentsExecute);
            AccountTTLCommand    = new RelayCommand(AccountTTLExecute);
            PeerToPeerCommand    = new RelayCommand(PeerToPeerExecute);
        }
Beispiel #25
0
 public MessagingViewModel(IChatService chatMng, IContactsService contactsMng) : this()
 {
     //****************************************************************************************
     // Setting the event of Chat. This method is called when user select a contact for a Call.
     //*****************************************************************************************
     this._chatsManager    = chatMng;
     this._contactsManager = contactsMng;
     this._chatsManager.NewConversationCreated    += OnNewConversationCreated;
     this._chatsManager.ConversationClosed        += OnConversationClosed;
     this._chatsManager.ContactsChanged           += OnContactsChanged;
     this._chatsManager.ContactAdded              += OnChatContactAdded;
     this._chatsManager.ContactRemoved            += OnChatContactRemoved;
     this._contactsManager.LoggedInContactUpdated += OnLoggedContactUpdated;
 }
Beispiel #26
0
        public MainViewModel(IMvxNavigationService navigationService, ILoggerService loggingService, IDialogsService dialogsService,
                             IContactsService contactsService, IGroupsService groupsService)
            : base(navigationService, loggingService, dialogsService)
        {
            this.contactsService = contactsService;
            this.groupsService   = groupsService;

            AddNewCommand     = new MvxCommand(AddNewContact);
            EditCommand       = new MvxCommand(EditContact, () => EditionEnabled);
            DeleteCommand     = new MvxCommand(DeleteContact, () => EditionEnabled);
            EditGroupsCommand = new MvxCommand(EditGroups);

            LoadAll();
        }
 public TestController(IPaymentsService paymentService, ISessionBagService sessionBag, IUserSessionService userSessionService, IMapper mapper,
                       IPassengersService passengersService, IBookingService bookingService, IFlightsService flightService, IContactsService contactsService, IHttpContextAccessor httpContextAccessor,
                       IQueueService queueService)
 {
     _paymentService      = paymentService;
     _mapper              = mapper;
     _flightsService      = flightService;
     _contactsService     = contactsService;
     _passengersService   = passengersService;
     _bookingService      = bookingService;
     _sessionBag          = sessionBag;
     _userSessionService  = userSessionService;
     _httpContextAccessor = httpContextAccessor;
     _queueService        = queueService;
 }
Beispiel #28
0
        public ContactViewModel(IMvxNavigationService navigationService, ILoggerService loggingService, IDialogsService dialogsService,
                                IGroupsService groupsService, IContactsService contactsService)
            : base(navigationService, loggingService, dialogsService)
        {
            this.groupsService   = groupsService;
            this.contactsService = contactsService;

            SaveCommand        = new MvxCommand(Save);
            CloseCommand       = new MvxCommand(Close);
            EditGroupsCommand  = new MvxCommand(EditGroups);
            AddEntryCommand    = new MvxCommand(AddEntry);
            DeleteEntryCommand = new MvxCommand <ContactEntryViewModel>(DeleteEntry);

            LoadGroups();
        }
        public ContactsViewModel(IContactsService contactsService = null)
        {
            _contactsService = contactsService ?? (IContactsService)Splat.Locator.Current.GetService(typeof(IContactsService));

            var allContacts = _contactsService.GetAllContacts();

            _contacts = new ObservableCollection <Contact>(allContacts);

            this.WhenAnyValue(vm => vm.SearchQuery)
            .Throttle(TimeSpan.FromSeconds(1))
            .Subscribe(query =>
            {
                var filteredContacts = allContacts.Where(c => c.FullName.ToLower().Contains(query) || c.Phone.Contains(query) || c.Email.Contains(query)).ToList();

                Contacts = new ObservableCollection <Contact>(filteredContacts);
            });

            this.WhenAnyValue(vm => vm.Contacts)
            .Select(contacts =>
            {
                if (contacts.Count == allContacts.Count())
                {
                    return("No filters applied");
                }

                return($"{Contacts.Count} have been found in result for '{SearchQuery}'");
            })
            .ToProperty(this, vm => vm.SearchResult, out _searchResult);

            var canExecuteClear = this.WhenAnyValue(vm => vm.SearchQuery)
                                  .Select(query =>
            {
                if (string.IsNullOrWhiteSpace(query))
                {
                    return(false);
                }

                return(true);
            });

            ClearCommand = ReactiveCommand.Create(ClearSearch, canExecuteClear);

            // Handle the Exceptions
            ClearCommand.ThrownExceptions.Subscribe(ex =>
            {
                Debug.WriteLine(ex.Message);
            });
        }
        public MainViewModel(IProtoService protoService, ICacheService cacheService, ISettingsService settingsService, IEventAggregator aggregator, INotificationsService pushService, IContactsService contactsService, IPasscodeService passcodeService, ILifetimeService lifecycle, ISessionService session, IVoIPService voipService, ISettingsSearchService settingsSearchService, IEmojiSetService emojiSetService, ICloudUpdateService cloudUpdateService, IPlaybackService playbackService, IShortcutsService shortcutService)
            : base(protoService, cacheService, settingsService, aggregator)
        {
            _pushService        = pushService;
            _contactsService    = contactsService;
            _passcodeService    = passcodeService;
            _lifetimeService    = lifecycle;
            _sessionService     = session;
            _voipService        = voipService;
            _emojiSetService    = emojiSetService;
            _cloudUpdateService = cloudUpdateService;
            _playbackService    = playbackService;
            _shortcutService    = shortcutService;

            Filters = new ChatFilterCollection();

            Chats         = new ChatsViewModel(protoService, cacheService, settingsService, aggregator, pushService, new ChatListMain());
            ArchivedChats = new ChatsViewModel(protoService, cacheService, settingsService, aggregator, pushService, new ChatListArchive());
            Contacts      = new ContactsViewModel(protoService, cacheService, settingsService, aggregator, contactsService);
            Calls         = new CallsViewModel(protoService, cacheService, settingsService, aggregator);
            Settings      = new SettingsViewModel(protoService, cacheService, settingsService, aggregator, pushService, contactsService, settingsSearchService);

            // This must represent pivot tabs
            Children.Add(Chats);
            Children.Add(Contacts);
            Children.Add(Calls);
            Children.Add(Settings);

            // Any additional child
            Children.Add(ArchivedChats);
            Children.Add(_voipService as TLViewModelBase);

            aggregator.Subscribe(this);

            ReturnToCallCommand = new RelayCommand(ReturnToCallExecute);

            ToggleArchiveCommand = new RelayCommand(ToggleArchiveExecute);

            CreateSecretChatCommand = new RelayCommand(CreateSecretChatExecute);

            SetupFiltersCommand = new RelayCommand(SetupFiltersExecute);

            UpdateAppCommand = new RelayCommand(UpdateAppExecute);

            FilterEditCommand   = new RelayCommand <ChatFilterViewModel>(FilterEditExecute);
            FilterAddCommand    = new RelayCommand <ChatFilterViewModel>(FilterAddExecute);
            FilterDeleteCommand = new RelayCommand <ChatFilterViewModel>(FilterDeleteExecute);
        }
Beispiel #31
0
 public HomeController(IContactsService contactsService,
                       IAlbumsService albumsService,
                       IEventsService eventsService,
                       INewslettersService newslettersService,
                       INewsItemsService newsItemsService,
                       SignInManager <IdentityUser> signInManager,
                       UserManager <IdentityUser> userManager)
 {
     _ContactsService    = contactsService;
     _AlbumsService      = albumsService;
     _EventsService      = eventsService;
     _NewslettersService = newslettersService;
     _NewsItemsService   = newsItemsService;
     _SignInManager      = signInManager;
     _UserManager        = userManager;
 }
        public ChatsService(ServiceManagerBase mngBase)
        {
            this._serviceManager = mngBase;
            this._contactSvc = _serviceManager.ContactService;
            this._linphoneSvc = _serviceManager.LinphoneService;
            this._contactSvc.ContactAdded += OnContactAdded;
            this._contactSvc.ContactRemoved += OnContactRemoved;
            this._contactSvc.ContactsChanged += OnContactsChanged;
            this._contactSvc.ContactsLoadCompleted += OnContactsLoadCompleted;
            this._chatItems = new ObservableCollection<VATRPChat>();

            this._linphoneSvc.IsComposingReceivedEvent += OnChatMessageComposing;
            this._linphoneSvc.OnChatMessageReceivedEvent += OnChatMessageReceived;
            this._linphoneSvc.OnChatMessageStatusChangedEvent += OnChatStatusChanged;
            IsRTTenabled = true;
        }
Beispiel #33
0
        public CollectionViewModel(IScreen screen = null, IContactsService contactsService = null)
        {
            HostScreen       = screen ?? Locator.Current.GetService <IScreen>();
            _contactsService = contactsService ?? Locator.Current.GetService <IContactsService>();


            _contacts.AddRange(_contactsService.GetAllContacts());

            _contacts.Connect().Bind(out _contactsList).Subscribe();

            _contacts.ReplaceAt(2, new Contact
            {
                Email    = "*****@*****.**",
                FullName = "Replace Contact",
                Phone    = "123456789"
            });
            _contacts.Move(0, 3);
        }
        public ContactPresenter(IContactView view,
                                IContactFactory contactFactory,
                                IContactsService contactsService) : base(view)
        {
            if (contactsService == null)
            {
                throw new ArgumentNullException("Contacts service cannot be null.");
            }

            if (contactFactory == null)
            {
                throw new ArgumentNullException("Contact factory cannot be null.");
            }

            this.contactsService      = contactsService;
            this.contactFactory       = contactFactory;
            this.View.SendingContact += OnSendingContact;
        }
        public ContactDetailedPresenter(IContactDetailedView view,
                                        IContactsService contactsService,
                                        IUsersService usersService) : base(view)
        {
            if (contactsService == null)
            {
                throw new ArgumentNullException("Contacts service cannot be null.");
            }

            if (usersService == null)
            {
                throw new ArgumentNullException("Users service cannot be null.");
            }

            this.contactsService             = contactsService;
            this.usersService                = usersService;
            this.View.Initial               += OnInitial;
            this.View.EdittingContactStatus += OnEdittingContactStatus;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="AgileCrm" /> class.
        /// </summary>
        /// <param name="companiesService">The companies service.</param>
        /// <param name="contactsService">The contacts service.</param>
        /// <param name="dealsService">The deals service.</param>
        /// <param name="notesService">The notes service.</param>
        /// <param name="tasksService">The tasks service.</param>
        internal AgileCrm(
            ICompaniesService companiesService,
            IContactsService contactsService,
            IDealsService dealsService,
            INotesService notesService,
            ITasksService tasksService)
        {
            companiesService.EnsureNotNull();
            contactsService.EnsureNotNull();
            dealsService.EnsureNotNull();
            notesService.EnsureNotNull();
            tasksService.EnsureNotNull();

            this.companiesService = companiesService;
            this.contactsService  = contactsService;
            this.dealsService     = dealsService;
            this.notesService     = notesService;
            this.tasksService     = tasksService;
        }
 public ControlBarViewModel(
     IDialogService dialogService,
     ISettingsDataService settingsDataService,
     IMobileAppConfigDataService mobileAppConfigDataService,
     MobileConfigurationDTO currentMobileConfiguration,
     IUserSessionService userSessionService,
     IContactsService contactsService,
     IPresentationDataService presentationDataService,
     ISyncLogService syncLogService
     ) : base(settingsDataService)
 {
     _presentationDataService    = presentationDataService;
     _userSessionService         = userSessionService;
     _dialogService              = dialogService;
     _mobileAppConfigDataService = mobileAppConfigDataService;
     _currentMobileConfiguration = currentMobileConfiguration;
     _contactsService            = contactsService;
     _syncLogService             = syncLogService;
     Initialize();
 }
Beispiel #38
0
 public HomeController(
     IServiceInfoService serviceInfoService,
     IUserService userService,
     IWorkExampleService workExampleService,
     IBlogService blogService,
     IBrandService brandService,
     ITestimonialService testimonialService,
     IContactsService contactsService,
     IMessageService messageService,
     RoleManager <IdentityRole> roleManager)
 {
     _serviceInfoService = serviceInfoService;
     _userService        = userService;
     _workExampleService = workExampleService;
     _blogService        = blogService;
     _brandService       = brandService;
     _testimonialService = testimonialService;
     _contactsService    = contactsService;
     _messageService     = messageService;
     _roleManager        = roleManager;
 }
Beispiel #39
0
        public MainViewModel(IProtoService protoService, ICacheService cacheService, ISettingsService settingsService, IEventAggregator aggregator, INotificationsService pushService, IContactsService contactsService, IVibrationService vibrationService, ILiveLocationService liveLocationService, IPasscodeService passcodeService, ILifetimeService lifecycle, ISessionService session, IVoIPService voipService, ISettingsSearchService settingsSearchService, IEmojiSetService emojiSetService, IPlaybackService playbackService)
            : base(protoService, cacheService, settingsService, aggregator)
        {
            _pushService         = pushService;
            _contactsService     = contactsService;
            _vibrationService    = vibrationService;
            _liveLocationService = liveLocationService;
            _passcodeService     = passcodeService;
            _lifetimeService     = lifecycle;
            _sessionService      = session;
            _voipService         = voipService;
            _emojiSetService     = emojiSetService;
            _playbackService     = playbackService;

            Chats         = new ChatsViewModel(protoService, cacheService, settingsService, aggregator, pushService, new ChatListMain());
            ArchivedChats = new ChatsViewModel(protoService, cacheService, settingsService, aggregator, pushService, new ChatListArchive());
            Contacts      = new ContactsViewModel(protoService, cacheService, settingsService, aggregator, contactsService);
            Calls         = new CallsViewModel(protoService, cacheService, settingsService, aggregator);
            Settings      = new SettingsViewModel(protoService, cacheService, settingsService, aggregator, pushService, contactsService, settingsSearchService);

            // This must represent pivot tabs
            Children.Add(Chats);
            Children.Add(Contacts);
            Children.Add(Calls);
            Children.Add(Settings);

            // Any additional child
            Children.Add(ArchivedChats);
            Children.Add(_voipService as TLViewModelBase);

            aggregator.Subscribe(this);

            LiveLocationCommand     = new RelayCommand(LiveLocationExecute);
            StopLiveLocationCommand = new RelayCommand(StopLiveLocationExecute);

            ReturnToCallCommand = new RelayCommand(ReturnToCallExecute);

            ToggleArchiveCommand = new RelayCommand(ToggleArchiveExecute);
        }
        public ContactsViewModel(IContactsService contactsService, IRegionManager regionManager)
        {
            this.emailContactCommand = new DelegateCommand <object>(this.EmailContact, this.CanEmailContact);

            this.contactsCollection           = new ObservableCollection <Contact>();
            this.contactsView                 = new PagedCollectionView(this.contactsCollection);
            this.contactsView.CurrentChanged += (s, e) => this.emailContactCommand.RaiseCanExecuteChanged();

            this.regionManager = regionManager;

            contactsService.BeginGetContacts((ar) =>
            {
                IEnumerable <Contact> newContacts = contactsService.EndGetContacts(ar);

                this.synchronizationContext.Post((state) =>
                {
                    foreach (var newContact in newContacts)
                    {
                        this.contactsCollection.Add(newContact);
                    }
                }, null);
            }, null);
        }
        public ContactsViewModel(IContactsService contactsService, IRegionManager regionManager)
        {
            this.emailContactCommand = new DelegateCommand<object>(this.EmailContact, this.CanEmailContact);

            this.contactsCollection = new ObservableCollection<Contact>();
            this.contactsView = new PagedCollectionView(this.contactsCollection);
            this.contactsView.CurrentChanged += (s, e) => this.emailContactCommand.RaiseCanExecuteChanged();

            this.regionManager = regionManager;

            contactsService.BeginGetContacts((ar) =>
            {
                IEnumerable<Contact> newContacts = contactsService.EndGetContacts(ar);

                this.synchronizationContext.Post((state) =>
                {
                    foreach (var newContact in newContacts)
                    {
                        this.contactsCollection.Add(newContact);
                    }
                }, null);

            }, null);
        }
Beispiel #42
0
 public ContactsController(IContactsService contactsService)
 {
     this.contactsService = contactsService;
 }
 public ContactsController(IContactsService contacts)
 {
     this.contacts = contacts;
 }
 public ContactsController(IContactsService contactsService)
 {
     mContactsService = contactsService;
 }
 public ContactController(IContactsService contactsService)
 {
     Require.NotNull(contactsService, nameof(contactsService));
     _contactsService = contactsService;
 }
 public LocalContactViewModel(IContactsService contactSvc)
 {
     this._contactService = contactSvc;
     this._contactService.LoggedInContactUpdated += OnLocalContactChanged;
 }
Beispiel #47
0
 public AboutUsViewModel(IContactsService contactsService)
 {
     _contactsService = contactsService;
 }