예제 #1
0
        public override void CreatingDisplay(ElementCreatingDisplayShapeContext context)
        {
            if (context.DisplayType == "Design")
            {
                return;
            }

            if (String.IsNullOrWhiteSpace(context.Element.Rule))
            {
                return;
            }

            context.Cancel = !EvaluateRule(context.Element.Rule);
        }
        protected override void OnCreatingDisplay(Notifications element, ElementCreatingDisplayShapeContext context)
        {
            if (context.DisplayType == "Design")
            {
                return;
            }

            var httpContext = _httpContextAccessor.Current();

            if (httpContext == null)
            {
                return;
            }

            var messageEntries = httpContext.Items[NotifyFilter.TempDataMessages] as IList <NotifyEntry> ?? new List <NotifyEntry>();

            context.Cancel = !messageEntries.Any();
        }
        private void CreatingDisplay(ElementCreatingDisplayShapeContext context, ElementBlueprint blueprint)
        {
            var bluePrintState = ElementDataHelper.Deserialize(blueprint.BaseElementState);

            context.Element.Data = bluePrintState;
        }
 public virtual void CreatingDisplay(ElementCreatingDisplayShapeContext context)
 {
 }
예제 #5
0
 protected virtual void OnCreatingDisplay(TElement element, ElementCreatingDisplayShapeContext context)
 {
 }
예제 #6
0
 public void CreatingDisplay(ElementCreatingDisplayShapeContext context)
 {
     OnCreatingDisplay((TElement)context.Element, context);
 }
 void IElementEventHandler.CreatingDisplay(ElementCreatingDisplayShapeContext context)
 {
 }