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); _inCallMessageViewModel = new InCallMessagingViewModel(ServiceManager.Instance.ChatService, 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; }
public void SetDataContext(MenuViewModel viewModel) { _viewModel = viewModel; DataContext = _viewModel; }