Esempio n. 1
0
        public void Create(ConfigElementNodeBuilder builder, ICollection <ConfigElementNode> elements,
                           ConfigElementNode elementNode)
        {
            var contentDirectory = ConfigurationManager.AppSettings["ContentDirectory"];

            if (string.IsNullOrEmpty(contentDirectory))
            {
                contentDirectory = Path.Combine("..", "Assemblies", "content");
            }

            var contentPath = Path.GetFullPath(contentDirectory);

            elementNode.ElementId   = contentPath;
            elementNode.ElementName = contentPath;
            elementNode.Version     = builder.Version;

            elementNode.RefreshCommand = new RefreshElementCommand(builder, elements, elementNode, MetadataType.Configuration);
            elementNode.RegisterAddCommands(builder, ElementChildrenTypes);
            elementNode.EditCommands = new[] { new ReconnectCommand(builder, elementNode, "EditView")
                                               {
                                                   Text = Resources.Reconnect, Image = ElementType
                                               } };
            elementNode.DeleteCommand = FactoryHelper.NoDeleteCommand;
            elementNode.CopyCommand   = FactoryHelper.NoCopyCommand;
            elementNode.PasteCommand  = FactoryHelper.NoPasteCommand;

            elementNode.RefreshCommand.TryExecute();
        }
Esempio n. 2
0
        public void Create(ConfigElementNodeBuilder builder, ICollection <ConfigElementNode> elements,
                           ConfigElementNode elementNode)
        {
            elementNode.ElementName = Resources.ScenarioContainer;

            elementNode.RefreshCommand = new RefreshElementCommand(builder, elements, elementNode, MetadataType.Scenario);
            elementNode.RegisterAddCommands(builder, ElementChildrenTypes);
            elementNode.DeleteCommand = FactoryHelper.NoDeleteCommand;
            elementNode.CopyCommand   = FactoryHelper.NoCopyCommand;
            elementNode.RegisterPasteCommand(builder);

            FactoryHelper.AddEmptyElement(elements, elementNode);
        }
Esempio n. 3
0
        public void Create(ConfigElementNodeBuilder builder, ICollection <ConfigElementNode> elements, ConfigElementNode elementNode)
        {
            elementNode.DocumentId  = elementNode.ElementMetadata.Name;
            elementNode.ElementId   = FactoryHelper.BuildId(elementNode);
            elementNode.ElementName = FactoryHelper.BuildName(elementNode);

            elementNode.RefreshCommand = new RefreshContainerCommand(elementNode);
            elementNode.RegisterAddCommands(builder, ElementChildrenTypes);
            elementNode.RegisterEditCommand(builder);
            elementNode.DeleteCommand = new DeleteElementCommand(builder, elements, elementNode);
            elementNode.CopyCommand   = FactoryHelper.NoCopyCommand;
            elementNode.RegisterPasteCommand(builder);

            builder.BuildElement(elements, elementNode, elementNode.ElementMetadata, ViewContainerNodeFactory.ElementType);
            builder.BuildElement(elements, elementNode, elementNode.ElementMetadata, PrintViewContainerNodeFactory.ElementType);
            builder.BuildElement(elements, elementNode, elementNode.ElementMetadata, ScenarioContainerNodeFactory.ElementType);
            builder.BuildElement(elements, elementNode, elementNode.ElementMetadata, ProcessContainerNodeFactory.ElementType);
            builder.BuildElement(elements, elementNode, elementNode.ElementMetadata, ServiceContainerNodeFactory.ElementType);
        }
Esempio n. 4
0
        public void Create(ConfigElementNodeBuilder builder, ICollection <ConfigElementNode> elements, ConfigElementNode elementNode)
        {
            elementNode.ConfigId    = elementNode.ElementMetadata.Name;
            elementNode.Version     = elementNode.ElementMetadata.Version;
            elementNode.ElementId   = FactoryHelper.BuildId(elementNode);
            elementNode.ElementName = FactoryHelper.BuildName(elementNode);

            elementNode.RefreshCommand = new RefreshContainerCommand(elementNode);
            elementNode.RegisterAddCommands(builder, ElementChildrenTypes);
            elementNode.RegisterEditCommand(builder);
            elementNode.DeleteCommand = new DeleteElementCommand(builder, elements, elementNode);
            elementNode.CopyCommand   = FactoryHelper.NoCopyCommand;
            elementNode.PasteCommand  = FactoryHelper.NoPasteCommand;

            builder.BuildElement(elements, elementNode, elementNode.ElementMetadata, MenuContainerNodeFactory.ElementType);
            builder.BuildElement(elements, elementNode, elementNode.ElementMetadata, DocumentContainerNodeFactory.ElementType);
            builder.BuildElement(elements, elementNode, elementNode.ElementMetadata, RegisterContainerNodeFactory.ElementType);
            builder.BuildElement(elements, elementNode, elementNode.ElementMetadata, ReportContainerNodeFactory.ElementType);

            elementNode.RefreshCommand.TryExecute();
        }