Ejemplo n.º 1
0
 public static CommandContext CreateNestedContext(this CommandContext context, IContentForm<CommandContext> subBinder, ContentItem subItem, ItemDefinition subDefinition)
 {
     return new CommandContext(subDefinition, subItem, context.Interface, context.User)
     {
         Binder = subBinder,
         Errors = context.Errors,
         Parameters = context.Parameters,
         ValidationErrors = context.ValidationErrors,
         Validator = context.Validator
     };
 }
Ejemplo n.º 2
0
        private void DockPanel1ActiveContentChanged(object sender, EventArgs e)
        {
            IContentForm content = this.dockPanel1.ActiveContent as IContentForm;

            if (content == null)
            {
                content = this.dockPanel1.ActiveDocument as IContentForm;
            }

            this.SetContentMenus(content);
        }
Ejemplo n.º 3
0
        void dockPanel1_ActiveContentChanged(object sender, EventArgs e)
        {
            IContentForm content = dockPanel1.ActiveContent as IContentForm;

            if (content == null)
            {
                content = dockPanel1.ActiveDocument as IContentForm;
            }

            SetContentMenus(content);
        }
Ejemplo n.º 4
0
 public CommandContext(ItemDefinition definition, ContentItem content, string userInterface, IPrincipal user, IContentForm <CommandContext> binder, IValidator <CommandContext> validator)
 {
     Definition       = definition;
     Content          = content;
     Interface        = userInterface;
     User             = user;
     Binder           = binder;
     Validator        = validator;
     ValidationErrors = new List <ValidationError>();
     Errors           = new List <Exception>();
     Parameters       = new Dictionary <string, object>();
 }
Ejemplo n.º 5
0
 public CommandContext(ItemDefinition definition, ContentItem content, string userInterface, IPrincipal user, IContentForm<CommandContext> binder, IValidator<CommandContext> validator)
 {
     Definition = definition;
     Content = content;
     Interface = userInterface;
     User = user;
     Binder = binder;
     Validator = validator;
     ValidationErrors = new List<ValidationError>();
     Errors = new List<Exception>();
     Parameters = new Dictionary<string, object>();
 }
Ejemplo n.º 6
0
 public static CommandContext CreateNestedContext(this CommandContext context, IContentForm <CommandContext> subBinder, ContentItem subItem, ItemDefinition subDefinition)
 {
     return(new CommandContext(subDefinition, subItem, context.Interface, context.User)
     {
         Binder = subBinder,
         Errors = context.Errors,
         Parameters = context.Parameters,
         ValidationErrors = context.ValidationErrors,
         Validator = context.Validator
     });
 }
Ejemplo n.º 7
0
 private void SetContentMenus(IContentForm content)
 {
     this.mnuDelete.Enabled = content != null && content.CanDelete();
 }