コード例 #1
0
		/// <summary>Adds the fieldset to a parent container and returns it.</summary>
		/// <param name="container">The parent container onto which to add the container defined by this interface.</param>
		/// <returns>The newly added fieldset.</returns>
		public override Control AddTo(Control container)
		{
			FieldSet fieldSet = new FieldSet();
			fieldSet.ID = Name;
			fieldSet.Legend = GetLocalizedText("Legend") ?? Legend;
			container.Controls.Add(fieldSet);
			return fieldSet;
		}
コード例 #2
0
ファイル: ItemEditorList.cs プロジェクト: amarwadi/n2cms
        protected virtual void AddToContainer(Control container, ItemEditor itemEditor, ContentItem item)
        {
            var fs = new FieldSet();

            fs.Legend = Engine.Definitions.GetDefinition(item).Title;
            container.Controls.Add(fs);
            fs.Controls.Add(itemEditor);
        }
        public override Control AddTo(Control container)
        {
            var child = new FieldSet
                            {
                                ID = Name,
                                Legend = GetLocalizedText("Legend") ?? Legend,
                                CssClass = CssClass
                            };
            if (string.IsNullOrEmpty(ImageUrl) == false)
            {
                var imageUrl = container.ResolveUrl(ImageUrl);

                var imageStyle = "";
                if (string.IsNullOrEmpty(ImageStyle) == false)
                {
                    imageStyle = string.Format(" style=\"{0}\"", ImageStyle.Replace('"', '\''));
                }

                child.Legend = string.Format("<img src=\"{0}\" alt=\"{1}\"{2} />&nbsp;{1}", imageUrl, child.Legend, imageStyle);
            }

            container.Controls.Add(child);
            return child;
        }
コード例 #4
0
ファイル: ItemEditorList.cs プロジェクト: wrohrbach/n2cms
 protected virtual void AddToContainer(Control container, ItemEditor itemEditor, ContentItem item)
 {
     var fs = new FieldSet();
     fs.Legend = Engine.Definitions.GetDefinition(item).Title;
     container.Controls.Add(fs);
     fs.Controls.Add(itemEditor);
 }