public TreeVirtualCatalogViewModel(
			IViewModelsFactory<ITreeCategoryViewModel> vmFactory,
			IViewModelsFactory<IVirtualCatalogViewModel> virtualCatalogVmFactory,
			IViewModelsFactory<ICatalogDeleteViewModel> catalogDeleteVmFactory,
			CatalogBase item,
			IRepositoryFactory<ICatalogRepository> repositoryFactory,
			IAuthenticationContext authContext,
			INavigationManager navigationManager)
			: base(repositoryFactory, authContext)
		{
			InnerItem = item;
			_vmFactory = vmFactory;
			_catalogDeleteVmFactory = catalogDeleteVmFactory;
			EmbeddedHierarchyEntry = this;
			ViewTitle = new ViewTitleBase
				{
					SubTitle = "VIRTUAL CATALOG",
					Title = (item != null && !string.IsNullOrEmpty(item.Name)) ? item.Name : ""
				};

			OpenItemCommand = new DelegateCommand(() =>
			{
				if (NavigationData == null)
				{
					var editVM = virtualCatalogVmFactory.GetViewModelInstance(new KeyValuePair<string, object>("item", InnerItem)
						, new KeyValuePair<string, object>("parentTreeVM", this));
					NavigationData = ((IClosable)editVM).NavigationData;
				}
				navigationManager.Navigate(NavigationData);
			});
		}
		public CategorySeoViewModel(ILoginViewModel loginViewModel, ICatalogOutlineBuilder catalogBuilder, IRepositoryFactory<IStoreRepository> storeRepositoryFactory, IRepositoryFactory<IAppConfigRepository> appConfigRepositoryFactory, IAppConfigEntityFactory appConfigEntityFactory, Category item, IEnumerable<string> languages, CatalogBase parentCatalog)
			: base(appConfigRepositoryFactory, appConfigEntityFactory, parentCatalog.DefaultLanguage, languages, item.CategoryId, SeoUrlKeywordTypes.Category)
		{
			_storeRepositoryFactory = storeRepositoryFactory;
			_catalogBuilder = catalogBuilder;
			_loginViewModel = loginViewModel;
			_category = item;
			_catalog = parentCatalog;

			InitializePropertiesForViewing();
		}
		public CategorySeoStepViewModel(ILoginViewModel loginViewModel, ICatalogOutlineBuilder catalogBuilder, IRepositoryFactory<IStoreRepository> storeRepositoryFactory, IRepositoryFactory<IAppConfigRepository> appConfigRepositoryFactory, IAppConfigEntityFactory appConfigEntityFactory, Category item, IEnumerable<string> languages, CatalogBase parentCatalog)
			: base(null, null, null, item, parentCatalog)
		{
			_appConfigRepositoryFactory = appConfigRepositoryFactory;
			_appConfigEntityFactory = appConfigEntityFactory;
			_storeRepositoryFactory = storeRepositoryFactory;
			_catalogBuilder = catalogBuilder;
			_loginViewModel = loginViewModel;

			InnerItemCatalogLanguages = languages.ToList();
			SeoLocalesFilterCommand = new DelegateCommand<string>(RaiseSeoLocalesFilter);
			NavigateToUrlCommand = new DelegateCommand(RaiseNavigateToUrl);
		}
Exemplo n.º 4
0
		public CatalogBuilder(CatalogBase catalog)
		{
			_catalogBase = catalog;
		}
		public CatalogDeleteViewModel(CatalogBase item, string contentText)
		{
			ContentText = contentText;
			confirmationPassword = (item.Name.Length > 5 ? item.Name.Substring(0, 5) : item.Name);
		}
		public SaveCatalogChangesMessage(CatalogBase catalog)
		{
			Catalog = catalog;
		}