public static Page GetMainPage() { var dialer = DependencyService.Get<IDialer> (); AppViewModel = new MainViewModel(dialer); return new NavigationPage(new PhoneTranslatePage()); }
public PhoneTranslateViewModel(MainViewModel appViewModel) { _appViewModel = appViewModel; _translateCommand = new DelegateCommand(DoTranslate, () => !String.IsNullOrEmpty(PhoneNumberText)); _callCommand = new DelegateCommand(DoCall, () => !String.IsNullOrEmpty(TranslatedNumber)); _callHistoryCommand = new DelegateCommand(DoCallHistory); //, () => App.AppViewModel.DialledNumbers.Count > 0); }
public void SetupViewModels() { _appViewModel = new MainViewModel (new Mocks.TestDialer ()); _translateViewModel = new PhoneTranslateViewModel (_appViewModel); }