public FirstViewModel(IMvxViewModelLoader viewModelLoader) { _viewModelLoader = viewModelLoader; _okCommand = new MvxCommand (() => ShowViewModel<CountryInfoViewModel>(new CountryInfoParameters { Hello = Hello })); }
public void Include(MvxNavigationService service, IMvxViewModelLoader loader, IMvxViewDispatcher viewDispatcher) { _ = new MvxNavigationService(null, viewDispatcher, MvvmCross.Mvx.IoCProvider); _ = new MvxAppStart <MvxNullViewModel>(null, null); }
public RootViewModel(IMvxNavigationService navigationService, IMvxLogProvider logProvider, IMvxViewModelLoader mvxViewModelLoader) { _navigationService = navigationService; _mvxViewModelLoader = mvxViewModelLoader; logProvider.GetLogFor <RootViewModel>().Warn(() => "Testing log"); ShowChildCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <ChildViewModel, SampleModel>(new SampleModel { Message = "Hey", Value = 1.23m })); ShowModalCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <ModalViewModel>()); ShowModalNavCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <ModalNavViewModel>()); ShowTabsCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <TabsRootViewModel>()); ShowSplitCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <SplitRootViewModel>()); ShowOverrideAttributeCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <OverrideAttributeViewModel>()); ShowSheetCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <SheetViewModel>()); ShowWindowCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <WindowViewModel>()); ShowMixedNavigationCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <MixedNavFirstViewModel>()); ShowDictionaryBindingCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <DictionaryBindingViewModel>()); _counter = 3; }
public void Include(MvxNavigationService service, IMvxViewModelLoader loader, IMvxViewDispatcher viewDispatcher) { service = new MvxNavigationService(null, viewDispatcher, Mvx.IoCProvider); }
public DialogNavigationService(IPopupNavigation popupNavigationService, IMvxViewModelLoader viewModelLoader) { _popupNavigationService = popupNavigationService; _viewModelLoader = viewModelLoader; }
public void Include(MvxNavigationService service, IMvxViewModelLoader loader) { service = new MvxNavigationService(null, loader); }
public BaseActivityViewModel(IMvxViewModelLoader viewModelLoader) { _viewModelLoader = viewModelLoader; }
public void Include(MvxNavigationService service, MvvmCross.Views.IMvxViewDispatcher dispatcher, IMvxViewModelLoader loader) { service = new MvxNavigationService(null, dispatcher); }
public Presenter(IMvxViewModelLoader viewModelLoader, IFragmentTypeLookup fragmentTypeLookup, IEnumerable <Assembly> assembly) : base(assembly) { _fragmentTypeLookup = fragmentTypeLookup; _viewModelLoader = viewModelLoader; }
public void Include(MvxNavigationService service, IMvxViewModelLoader loader) { var s = new MvxNavigationServiceAppStart <MainViewModel>(null); service = new MvxNavigationService(null, loader); }
// ReSharper disable once RedundantAssignment public void Include(MvxNavigationService service, IMvxViewModelLoader loader) { // ReSharper disable once RedundantAssignment service = new MvxNavigationService(null, loader); }
private void Navigate(MvxViewModelRequest request, IMvxViewModelLoader loaderService) { if (request.ViewModelType == typeof(SetRouteStopViewModel)) { var dialog = new SetRouteStopView(); dialog.ViewModel = loaderService.LoadViewModel(request, null); dialog.Show(this.FragmentManager, null); } if (request.ViewModelType == typeof(SetRouteViewModel)) { var dialog = new SetRouteView(); dialog.ViewModel = loaderService.LoadViewModel(request, null); dialog.Show(this.FragmentManager, null); } if (request.ViewModelType == typeof(RouteVehiclesViewModel)) { MvxFragment routeView = new RouteView(); routeView.ViewModel = loaderService.LoadViewModel(request, null); _frag2tag[typeof(RouteView)] = "route_view"; this.FragmentManager.BeginTransaction() .Replace(Resource.Id.content_frame, routeView, "route_view") .AddToBackStack(null) .Commit(); this.DisableDrawer(); } if (request.ViewModelType == typeof(VehicleForecastViewModel)) { if (request.RequestedBy != null) { if (request.RequestedBy.AdditionalInfo == "map_tap") { var vehicleForecastView = new RouteVehicleForecastView(); vehicleForecastView.ViewModel = loaderService.LoadViewModel(request, null); this.ShowMap(); this.ShowInSlidingPanel(vehicleForecastView); this.EnableDrawer(); } } } if (request.ViewModelType == typeof(RouteStopViewModel)) { if (request.RequestedBy != null) { if (request.RequestedBy.AdditionalInfo == "map_tap") { var routeStopView1 = new MapRouteStopView(); routeStopView1.ViewModel = loaderService.LoadViewModel(request, null); this.ShowMap(); this.ShowInSlidingPanel(routeStopView1); this.EnableDrawer(); } } else { MvxFragment routeStopView = new RouteStopView(); routeStopView.ViewModel = loaderService.LoadViewModel(request, null); _frag2tag[typeof(RouteStopView)] = "route_stop_view"; this.FragmentManager.BeginTransaction() .Replace(Resource.Id.content_frame, routeStopView, "route_stop_view") .AddToBackStack(null) .Commit(); this.DisableDrawer(); } } if (request.ViewModelType == typeof(LicensesViewModel)) { var licensesView = new LicensesView(); licensesView.ViewModel = loaderService.LoadViewModel(request, null); _frag2tag[typeof(LicensesView)] = "licenses_view"; this.FragmentManager.BeginTransaction() .Replace(Resource.Id.content_frame, licensesView, "licenses_view") .AddToBackStack(null) .Commit(); this.DisableDrawer(); } if (request.ViewModelType == typeof(ImageLicensesViewModel)) { var imageLicensesView = new ImageLicensesView(); imageLicensesView.ViewModel = loaderService.LoadViewModel(request, null); _frag2tag[typeof(ImageLicensesView)] = "image_licenses_view"; this.FragmentManager.BeginTransaction() .Replace(Resource.Id.content_frame, imageLicensesView, "image_licenses_view") .AddToBackStack(null) .Commit(); this.DisableDrawer(); } }
public Presenter(IMvxViewModelLoader viewModelLoader, IFragmentTypeLookup fragmentTypeLookup) { _fragmentTypeLookup = fragmentTypeLookup; _viewModelLoader = viewModelLoader; }
public MvxFormsPagePresenter(MvxFormsApplication formsApplication, IMvxViewsContainer viewsContainer = null, IMvxViewModelTypeFinder viewModelTypeFinder = null, IMvxViewModelLoader viewModelLoader = null) { FormsApplication = formsApplication; ViewsContainer = viewsContainer; ViewModelTypeFinder = viewModelTypeFinder; ViewModelLoader = viewModelLoader; }
public TimelineViewModel(IMvxLogProvider logProvider, IMvxNavigationService navigationService, IMvxViewModelLoader mvxViewModelLoader, IAccountService accountService) : base(logProvider, navigationService) { this.accountService = accountService; }
public DroidPresenter(IMvxViewModelLoader viewModelLoader) { _viewModelLoader = viewModelLoader; }
public RootViewModel(IMvxLogProvider logProvider, IMvxNavigationService navigationService, IMvxViewModelLoader mvxViewModelLoader) : base(logProvider, navigationService) { _mvxViewModelLoader = mvxViewModelLoader; _log = logProvider.GetLogFor <RootViewModel>(); try { IMvxMessenger messenger = Mvx.IoCProvider.Resolve <IMvxMessenger>(); string? str = messenger.ToString(); _log.InfoFormat("Creating the Root View Model via the MVX IOC provider {messenger}", messenger); } catch (Exception e) { _log.ErrorException("could not resolve the Messenger", e); } //ShowChildCommand = new MvxAsyncCommand(async () => //{ // var result = await NavigationService.Navigate<ChildViewModel, SampleModel, SampleModel>(new SampleModel // { // Message = "Hey", // Value = 1.23m // }); // var testIfReturn = result; //}); //ShowModalCommand = new MvxAsyncCommand(Navigate); //ShowModalNavCommand = // new MvxAsyncCommand(async () => await NavigationService.Navigate<ModalNavViewModel>()); //ShowTabsCommand = new MvxAsyncCommand(async () => await NavigationService.Navigate<TabsRootViewModel>()); //ShowPagesCommand = new MvxAsyncCommand(async () => await NavigationService.Navigate<PagesRootViewModel>()); //ShowSplitCommand = new MvxAsyncCommand(async () => await NavigationService.Navigate<SplitRootViewModel>()); //ShowNativeCommand = new MvxAsyncCommand(async () => await NavigationService.Navigate<NativeViewModel>()); //ShowOverrideAttributeCommand = new MvxAsyncCommand(async () => // await NavigationService.Navigate<OverrideAttributeViewModel>()); //ShowSheetCommand = new MvxAsyncCommand(async () => await NavigationService.Navigate<SheetViewModel>()); ShowWindowCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <WindowViewModel>()); //ShowMixedNavigationCommand = // new MvxAsyncCommand(async () => await NavigationService.Navigate<MixedNavFirstViewModel>()); //ShowDictionaryBindingCommand = new MvxAsyncCommand(async () => // await NavigationService.Navigate<DictionaryBindingViewModel>()); //ShowCollectionViewCommand = // new MvxAsyncCommand(async () => await NavigationService.Navigate<CollectionViewModel>()); //ShowSharedElementsCommand = new MvxAsyncCommand(async () => // await NavigationService.Navigate<SharedElementRootChildViewModel>()); //ShowCustomBindingCommand = // new MvxAsyncCommand(async () => await NavigationService.Navigate<CustomBindingViewModel>()); //ShowFluentBindingCommand = // new MvxAsyncCommand(async () => await NavigationService.Navigate<FluentBindingViewModel>()); //RegisterAndResolveWithReflectionCommand = new MvxAsyncCommand(RegisterAndResolveWithReflection); //RegisterAndResolveWithNoReflectionCommand = new MvxAsyncCommand(RegisterAndResolveWithNoReflection); _counter = 3; TriggerVisibilityCommand = new MvxCommand(() => IsVisible = !IsVisible); //FragmentCloseCommand = new MvxAsyncCommand(() => NavigationService.Navigate<FragmentCloseViewModel>()); //ShowLocationCommand = new MvxAsyncCommand(() => NavigationService.Navigate<LocationViewModel>()); }
public LoginViewModel(IMvxLogProvider logProvider, IMvxNavigationService navigationService, IMvxViewModelLoader mvxViewModelLoader, ILoginService loginService, IAccountService accountService) : base(logProvider, navigationService) { this.loginService = loginService; }
public DroidPresenter(IMvxViewModelLoader viewModelLoader, IFragmentTypeLookup fragmentTypeLookup) { this.fragmentTypeLookup = fragmentTypeLookup; this.viewModelLoader = viewModelLoader; }
public RootViewModel(IMvxLogProvider logProvider, IMvxNavigationService navigationService, IMvxViewModelLoader mvxViewModelLoader) : base(logProvider, navigationService) { _mvxViewModelLoader = mvxViewModelLoader; try { //var messenger = Mvx.IoCProvider.Resolve<IMvxMessenger>(); //var str = messenger.ToString(); } catch (Exception e) { Console.WriteLine(e.ToString()); } ShowChildCommand = new MvxAsyncCommand(async() => { var result = await NavigationService.Navigate <ChildViewModel, SampleModel, SampleModel>(new SampleModel { Message = "Hey", Value = 1.23m }); var testIfReturn = result; }); ShowModalCommand = new MvxAsyncCommand(Navigate); //ShowModalNavCommand = //new MvxAsyncCommand(async () => await NavigationService.Navigate<ModalNavViewModel>()); ShowTabsCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <TabsRootViewModel>()); ShowSplitCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <SplitRootViewModel>()); //ShowNativeCommand = new MvxAsyncCommand(async () => await NavigationService.Navigate<NativeViewModel>()); //ShowOverrideAttributeCommand = new MvxAsyncCommand(async () => // await NavigationService.Navigate<OverrideAttributeViewModel>()); //ShowSheetCommand = new MvxAsyncCommand(async () => await NavigationService.Navigate<SheetViewModel>()); //ShowWindowCommand = new MvxAsyncCommand(async () => await NavigationService.Navigate<WindowViewModel>()); //ShowMixedNavigationCommand = //new MvxAsyncCommand(async () => await NavigationService.Navigate<MixedNavFirstViewModel>()); //ShowDictionaryBindingCommand = new MvxAsyncCommand(async () => // await NavigationService.Navigate<DictionaryBindingViewModel>()); //ShowCollectionViewCommand = // new MvxAsyncCommand(async () => await NavigationService.Navigate<CollectionViewModel>()); //ShowSharedElementsCommand = new MvxAsyncCommand(async () => // await NavigationService.Navigate<SharedElementRootChildViewModel>()); //ShowCustomBindingCommand = // new MvxAsyncCommand(async () => await NavigationService.Navigate<CustomBindingViewModel>()); //ShowFluentBindingCommand = //new MvxAsyncCommand(async () => await NavigationService.Navigate<FluentBindingViewModel>()); _counter = 3; TriggerVisibilityCommand = new MvxCommand(() => IsVisible = !IsVisible); }
public StartupViewModel(IMvxViewModelLoader viewModelLoader, IRepositories repositories) : base(viewModelLoader) { _repositories = repositories; }
public void Include(MvxNavigationService service, IMvxViewModelLoader loader) { _ = new MvxNavigationService(null, loader); _ = new MvxAppStart <MvxNullViewModel>(null, null); }
public RestlyNavigationService( IMvxNavigationCache navigationCache, IMvxViewModelLoader viewModelLoader) : base(navigationCache, viewModelLoader) { }