Ejemplo n.º 1
0
		public ConditionCategoryIs(IExpressionViewModel expressionViewModel)
			: base(EntryLabel, expressionViewModel)
		{
			_itemsInCategoryEl = WithElement(new ItemsInCategory(expressionViewModel)) as ItemsInCategory;
			WithAvailableExcluding(() => new ItemsInCategory(expressionViewModel));
			WithAvailableExcluding(() => new ItemsInEntry(expressionViewModel));
		}
 public ConditionCategoryIs(IExpressionViewModel expressionViewModel)
     : base(EntryLabel, expressionViewModel)
 {
     _itemsInCategoryEl = WithElement(new ItemsInCategory(expressionViewModel)) as ItemsInCategory;
     WithAvailableExcluding(() => new ItemsInCategory(expressionViewModel));
     WithAvailableExcluding(() => new ItemsInEntry(expressionViewModel));
 }
        public ActionCartItemGetOfAbsForNumInCategory(IExpressionViewModel expressionViewModel)
            : base("Get $[] off [] items in category []", expressionViewModel)
        {
            WithLabel("Get $");
            _amountEl = WithUserInput<decimal>(0, 0) as UserInputElement;
            WithLabel("off");
            _numItemEl = WithUserInput(1, 0) as UserInputElement;
			_itemsInCategoryEl = WithElement(new ItemsInCategory(expressionViewModel)) as ItemsInCategory;
            InitializeExcludings(expressionViewModel);
        }
 public ActionCartItemGetOfRelForNumInCategory(IExpressionViewModel expressionViewModel)
     : base("Get [] % off [] items in category []".Localize(), expressionViewModel)
 {
     WithLabel("Get".Localize());
     _amountEl = WithUserInput(0, 0, 100) as UserInputElement;
     WithLabel(" % off".Localize());
     _numItemEl         = WithUserInput(1, 0) as UserInputElement;
     _itemsInCategoryEl = WithElement(new ItemsInCategory(expressionViewModel)) as ItemsInCategory;
     InitializeExcludings(expressionViewModel);
 }
		public ActionCartItemGetOfRelForNumInCategory(IExpressionViewModel expressionViewModel)
			: base("Get [] % off [] items in category []".Localize(), expressionViewModel)
		{
			WithLabel("Get".Localize());
			_amountEl = WithUserInput(0, 0, 100) as UserInputElement;
			WithLabel(" % off".Localize());
			_numItemEl = WithUserInput(1, 0) as UserInputElement;
			_itemsInCategoryEl = WithElement(new ItemsInCategory(expressionViewModel)) as ItemsInCategory;
			InitializeExcludings(expressionViewModel);
		}
 public ConditionAtNumItemsInCategoryAreInCart(IExpressionViewModel expressionViewModel)
     : base("[] [] items of category are in shopping cart".Localize(), expressionViewModel)
 {
     ExactlyLeast       = WithElement(new ExactlyLeast()) as ExactlyLeast;
     _numItemEl         = WithUserInput(1, 0) as UserInputElement;
     _itemsInCategoryEl = WithElement(new ItemsInCategory(expressionViewModel)) as ItemsInCategory;
     WithLabel("are in shopping cart".Localize());
     WithAvailableExcluding(() => new ItemsInCategory(expressionViewModel));
     WithAvailableExcluding(() => new ItemsInEntry(expressionViewModel));
     WithAvailableExcluding(() => new ItemsInSku(expressionViewModel));
 }
		public ConditionAtNumItemsInCategoryAreInCart(IExpressionViewModel expressionViewModel)
			: base("[] [] items of category are in shopping cart", expressionViewModel)
		{
			 ExactlyLeast = WithElement(new ExactlyLeast()) as ExactlyLeast;
			 _numItemEl = WithUserInput(1, 0) as UserInputElement;
			 _itemsInCategoryEl = WithElement(new ItemsInCategory(expressionViewModel)) as ItemsInCategory;
             WithLabel("are in shopping cart");
			 WithAvailableExcluding(() => new ItemsInCategory(expressionViewModel));
			 WithAvailableExcluding(() => new ItemsInEntry(expressionViewModel));
			 WithAvailableExcluding(() => new ItemsInSku(expressionViewModel));
		}