Esempio n. 1
0
        public IUiControl Render(
            IUiControl innerForm, 
            IUiControl customToolbarItems, 
            IFormChannelIdentifier channel, 
            IDictionary<string, object> eventHandlerBindings, 
            string containerLabel, 
            string containerLabelField, 
            ResourceHandle containerIcon)
        {
            if (string.IsNullOrEmpty(_templateFormVirtualPath) == false)
            {
                WebEmbeddedFormUiControl document = new WebEmbeddedFormUiControl(channel);
                document.FormPath = _templateFormVirtualPath; // "/Composite/Templates/Document.xml";

                document.Bindings = new Dictionary<string, object>(eventHandlerBindings);
                document.Bindings.Add("Form", innerForm);
                if (customToolbarItems != null)
                {
                    document.Bindings.Add("CustomToolbarItems", customToolbarItems);
                }

                _webDocument = new TemplatedExecutionContainer(document, _templateUserControlType, containerLabel, containerLabelField, containerIcon);
            }
            else
            {
                _webDocument = new TemplatedExecutionContainer((IWebUiControl)innerForm, _templateUserControlType, containerLabel, containerLabelField, containerIcon);
            }

            return _webDocument;
        }
Esempio n. 2
0
 public TemplatedExecutionContainer(IWebUiControl form, Type templateUserControlType, string containerLabel, string containerLabelField, ResourceHandle containerIcon)
 {
     _form = form;
     _templateUserControlType = templateUserControlType;
     _containerLabel = containerLabel;
     _containerLabelField = containerLabelField;
     _containerIcon = containerIcon;
 }
        /// <exclude />
        protected override void OnAddAction(Action<ElementAction> actionAdder, EntityToken entityToken, TreeNodeDynamicContext dynamicContext, DynamicValuesHelperReplaceContext dynamicValuesHelperReplaceContext)
        {
            Icon = new ResourceHandle(BuildInIconProviderName.ProviderName, "copy");

            actionAdder(new ElementAction(new ActionHandle(new ProxyDataActionToken(ActionIdentifier.Duplicate,this.PermissionTypes)))
            {
                VisualData = CreateActionVisualizedData(dynamicValuesHelperReplaceContext)
            });
        }
 public override void SetContainerIcon(ResourceHandle icon)
 {
     this.ContainerIcon = icon;
 }
        private static string GetImage(ResourceHandle resourceHandle)
        {
            if (resourceHandle == null) return null;
	        
		    return string.Format("${{icon:{0}:{1}}}",
			        resourceHandle.ResourceNamespace, resourceHandle.ResourceName);
	      
        }
 private string BuildImgUrl(ResourceHandle iconHandle)
 {
     return
         string.Format("../../../../../services/Icon/GetIcon.ashx?resourceName={0}&resourceNamespace={1}&size={2}", iconHandle.ResourceName, iconHandle.ResourceNamespace, IconSize.SelectedValue);
 }
 /// <exclude />
 public abstract void SetContainerIcon(ResourceHandle icon);