private void InitializeAvailableExpressions()
        {
            var availableElements = new Func <CompositeElement>[] {
                //()=> {
                //	var group = new CompositeElement { DisplayName = "Customer conditions" };
                //	group.AvailableChildrenGetters.AddRange(new Func<ExpressionElement>[] {
                //		()=> new ConditionCustomerStatus(this.ExpressionViewModel)
                //	});
                //	return group;
                //},

                () => {
                    var group = new CompositeElement {
                        DisplayName = "Case conditions".Localize()
                    };
                    group.AvailableChildrenGetters.AddRange(new Func <ExpressionElement>[] {
                        () => new ConditionCaseStatus(this.ExpressionViewModel)
                    });
                    return(group);
                }

                //()=> {
                //	var group = new CompositeElement { DisplayName = "Order conditions" };
                //	group.AvailableChildrenGetters.AddRange(new Func<ExpressionElement>[] {
                //		()=> new ConditionOrderStatus(this.ExpressionViewModel)
                //	});
                //	return group;
                //}
            };

            ConditionBlock.WithAvailabeChildren(availableElements);
            ConditionBlock.NewChildLabel = "+ add condition".Localize(null, LocalizationScope.DefaultCategory);

            availableElements = new Func <CompositeElement>[] {
                () => new ActionXslInlineAlert(this.ExpressionViewModel),
                () => new ActionHtmlInlineAlert(this.ExpressionViewModel),
                () => new ActionRedirectAlert(this.ExpressionViewModel)
            };

            ActionBlock.WithAvailabeChildren(availableElements);
            ActionBlock.NewChildLabel = "+ add effect".Localize(null, LocalizationScope.DefaultCategory);
        }
        private void InitializeAvailableExpressions()
        {
            var availableElements = new Func <CompositeElement>[] {
                () => new ConditionCategoryIs(ExpressionViewModel),
                () => new ConditionEntryIs(ExpressionViewModel),
                () => new ConditionCurrencyIs(ExpressionViewModel)
            };

            ConditionBlock.WithAvailabeChildren(availableElements);
            ConditionBlock.NewChildLabel      = "+ add condition".Localize(null, LocalizationScope.DefaultCategory);
            ConditionBlock.IsChildrenRequired = true;
            ConditionBlock.ErrorMessage       = "Promotion requires at least one condition".Localize();

            availableElements = new Func <CompositeElement>[] {
                () => new ActionCatalogItemGetOfAbs(ExpressionViewModel),
                () => new ActionCatalogItemGetOfRel(ExpressionViewModel)
                , () => new ActionCatalogItemGiftNumItemOfSku(ExpressionViewModel)
            };
            ActionBlock.WithAvailabeChildren(availableElements);
            ActionBlock.NewChildLabel      = "+ add effect".Localize(null, LocalizationScope.DefaultCategory);
            ActionBlock.IsChildrenRequired = true;
            ActionBlock.ErrorMessage       = "Promotion requires at least one reward".Localize();
        }