public ContactsListViewModel(bool isLoadAllContacts = true) { _ciscoService = DependencyService.Resolve <CiscoService>(); _navigationService = DependencyService.Get <INavigationService>(); if (isLoadAllContacts) { _allContacts = _ciscoService.GetContactList().Data; FilteredContacts = new ObservableCollection <Contact>(); foreach (var contact in _allContacts) { FilteredContacts.Add(contact); } } }
public DialingViewModel(Contact contact) { CurrentStatus = "Calling"; Contact = contact; _ciscoService = DependencyService.Get <CiscoService>(); var result = _ciscoService.StartCall(contact.Address); PresentationButtonText = "Start presentation"; MuteButtonText = "Mute microphhone"; if (result.IsSuccessed) { CurrentStatus = "In call"; _callId = result.Data; IsConnected = true; } else { CurrentStatus = "Call failed"; IsConnected = false; } }
public ContactDetailsViewModel(Contact contact) { Contact = contact; _ciscoService = DependencyService.Get <CiscoService>(); _actionType = ContactAction.Update; }
public ContactDetailsViewModel() { Contact = new Contact(); _ciscoService = DependencyService.Get <CiscoService>(); _actionType = ContactAction.Add; }