public MainControllerViewModel()
        {
            _isAccountLogged        = false;
            _isContactDocked        = false;
            _isDialpadDocked        = false;
            _isHistoryDocked        = false;
            _isMessagingDocked      = false;
            _isCallPanelDocked      = false;
            _isSettingsDocked       = false;
            _isResourceDocked       = false;
            _offerServiceSelection  = false;
            _activateWizardPage     = false;
            _dialPadViewModel       = new DialpadViewModel();
            _historyViewModel       = new CallHistoryViewModel(ServiceManager.Instance.HistoryService, _dialPadViewModel);
            _contactsViewModel      = new ContactsViewModel(ServiceManager.Instance.ContactService, _dialPadViewModel);
            _contactViewModel       = new LocalContactViewModel(ServiceManager.Instance.ContactService);
            _simpleMessageViewModel = new SimpleMessagingViewModel(ServiceManager.Instance.ChatService,
                                                                   ServiceManager.Instance.ContactService);
            _settingsViewModel = new SettingsViewModel();
            _menuViewModel     = new MenuViewModel();
            _historyViewModel.MissedCallsCountChanged          += OnMissedCallsCountChanged;
            _simpleMessageViewModel.UnreadMessagesCountChanged += OnUnreadMesagesCountChanged;
            _callsViewModelList = new ObservableCollection <CallViewModel>();
            _linphoneService    = ServiceManager.Instance.LinphoneService;

            _dialpadHeight = 350;
        }
예제 #2
0
 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;
 }
예제 #3
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;
 }