private void OpenListingItemDetail(int day) { ViewModelResolver.Resolve(nameof(ListingItemViewModel)); EventAggregator.PublishOnUIThread(new EditDayItemMessage(_dayItems[day - 1])); EventAggregator.PublishOnUIThread(new ChangeViewMessage(nameof(ListingItemViewModel))); }
private void DisplayPdfGenerationPage() { ViewModelResolver.Resolve(nameof(ListingPdfGenerationViewModel)); EventAggregator.PublishOnUIThread(new ListingMessage(Listing)); EventAggregator.PublishOnUIThread(new ChangeViewMessage(nameof(ListingPdfGenerationViewModel))); }
private void DisplayRecordUpdate() { PersonFormViewModel vm = ViewModelResolver.Resolve <PersonFormViewModel>(); vm.Person = Person; EventAggregator.BeginPublishOnUIThread(new ChangeViewMessage <IViewModel>(vm)); }
private void OpenEditing() { // we need to create view model first before we can send a message to it // second time and on the resolver(SimpleContainer precisely) wont create new one(it is declared as Singleton) ViewModelResolver.Resolve(nameof(ListingEditingViewModel)); EventAggregator.PublishOnUIThread(new ListingMessage(Listing)); EventAggregator.PublishOnUIThread(new ChangeViewMessage(nameof(ListingEditingViewModel))); }
private void LoadLocalPlaylists() { var result = _service.GetLocalPlaylists(); if (result.IsSuccess) { LocalPlaylists.AddRange(result.Data.Select(x => ViewModelResolver.Resolve <PlaylistViewModel>(x))); } }
protected P GetViewModel(System.Type viewModel) { P vm = ViewModelResolver.Resolve <P>(viewModel); if (vm == null) { throw new Exception("Requested ViewModel does not Exist!"); } return(vm); }
protected VM GetViewModel <VM>() where VM : P { VM vm = ViewModelResolver.Resolve <VM>(); if (vm == null) { throw new Exception("Requested ViewModel does not Exist!"); } return(vm); }
protected override void OnInitialize() { base.OnInitialize(); EventAggregator.Subscribe(this); ActivateItem(ViewModelResolver.Resolve <PersonDetailViewModel>()); LeftSide = ActivateItem <PersonsOverviewViewModel>(); RightSide = ActivateItem <EmptySelectionViewModel>(); }
private void LoadFavorites() { var result = _service.GetSoundCloudFavorites(); if (!result.IsSuccess) { return; } var viewModel = ViewModelResolver.Resolve <PlaylistViewModel>(result.Data); viewModel.IsDeletable = false; viewModel.LoadNextPage.Execute(null); SoundCloudPlaylists.Insert(1, viewModel); }
protected override void OnInitialize() { base.OnInitialize(); EventAggregator.Subscribe(this); _personsListViewModel = ViewModelResolver.Resolve <PersonsListViewModel>(); _filterOptions = new Dictionary <FilterOptions, string>(); _filterOptions.Add(ViewModels.FilterOptions.ALL, "Všechny záznamy"); _filterOptions.Add(ViewModels.FilterOptions.UPCOMMING, "Pouze nadcházející narozeniny"); _filterOptions.Add(ViewModels.FilterOptions.LAST, "Pouze uplynulé narozeniny"); SelectedFilter = ViewModels.FilterOptions.UPCOMMING; LoadRecords(); }
private void LoadPlaylists() { var result = _service.GetSoundCloudPlaylists(); if (!result.IsSuccess) { return; } foreach (var model in result.Data) { var viewModel = ViewModelResolver.Resolve <PlaylistViewModel>(model); viewModel.IsDeletable = false; viewModel.LoadNextPage.Execute(null); SoundCloudPlaylists.Add(viewModel); } }
private void AddPlaylistImpl() { //// TODO Add Playlist-Name Dialog var playlist = new LocalPlaylistModel(); playlist.Name = "PlaylistName"; var result = _service.Save(playlist); if (!result.IsSuccess) { return; } var model = ViewModelResolver.Resolve <PlaylistViewModel>(result.Data); LocalPlaylists.Add(model); CurrentPlaylist = model; }
protected ViewControllerBase(string name, NSBundle p) : base(name, p) { ViewModel = ViewModelResolver?.Resolve <TViewModel>(); }
protected ViewControllerBase(IntPtr handle) : base(handle) { ViewModel = ViewModelResolver?.Resolve <TViewModel>(); }
protected virtual T Resolve <T>() where T : class { return(ViewModelResolver?.Resolve <T>()); }
protected override void ConfigureViewModelLocator() { base.ConfigureViewModelLocator(); var resolver = new ViewModelResolver(); var currentAssembly = typeof(ShellWindow).Assembly; ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver(viewType => resolver.Resolve(viewType, currentAssembly)); }
public TabBarViewControllerBase(IntPtr handle) : base(handle) { ViewModel = ViewModelResolver?.Resolve <TViewModel>(); }
public FragmentBase(bool hasNonTrackableBindings = false) : base(hasNonTrackableBindings) { ViewModel = ViewModelResolver?.Resolve <TViewModel>(); }