public CreatePaymentMethodViewModel(IViewModelsFactory<IGeneralLanguagesStepViewModel> langVmFactory, IViewModelsFactory<IPaymentMethodOverviewStepViewModel> overviewVmFactory, IViewModelsFactory<IPaymentMethodPropertiesStepViewModel> paymentPropertiesVmFactory, PaymentMethod item)
		{
			var _itemModel = new PaymentMethodStepModel
			{
				InnerItem = item,
				ParentWizard = this
			};
			var itemParameter = new KeyValuePair<string, object>("itemModel", _itemModel);

			// must be created first
			paymentMethodPropertiesStep3 = paymentPropertiesVmFactory.GetViewModelInstance(itemParameter);
			// this step is added or removed at RUNTIME
			// RegisterStep(paymentMethodPropertiesStep3);

			RegisterStep(overviewVmFactory.GetViewModelInstance(itemParameter));
			languagesStep2 = langVmFactory.GetViewModelInstance(new KeyValuePair<string, object>("selectedLanguages", item.PaymentMethodLanguages));
			RegisterStep(languagesStep2);
		}
Example #2
0
        public CreatePaymentMethodViewModel(IViewModelsFactory <IGeneralLanguagesStepViewModel> langVmFactory, IViewModelsFactory <IPaymentMethodOverviewStepViewModel> overviewVmFactory, IViewModelsFactory <IPaymentMethodPropertiesStepViewModel> paymentPropertiesVmFactory, PaymentMethod item)
        {
            var _itemModel = new PaymentMethodStepModel
            {
                InnerItem    = item,
                ParentWizard = this
            };
            var itemParameter = new KeyValuePair <string, object>("itemModel", _itemModel);

            // must be created first
            paymentMethodPropertiesStep3 = paymentPropertiesVmFactory.GetViewModelInstance(itemParameter);
            // this step is added or removed at RUNTIME
            // RegisterStep(paymentMethodPropertiesStep3);

            RegisterStep(overviewVmFactory.GetViewModelInstance(itemParameter));
            languagesStep2 = langVmFactory.GetViewModelInstance(new KeyValuePair <string, object>("selectedLanguages", item.PaymentMethodLanguages));
            RegisterStep(languagesStep2);
        }
 protected void InitializeLanguage()
 {
     LanguagesStepViewModel = _langVmFactory.GetViewModelInstance(
         new KeyValuePair <string, object>("selectedLanguages", InnerItem.PaymentMethodLanguages));
     OnPropertyChanged("LanguagesStepViewModel");
 }