示例#1
0
        public override string GetDesignTimeHtml(DesignerRegionCollection regions)
        {
            string title = CurrentControl.Title;

            if (String.IsNullOrEmpty(title))
            {
                title = String.Format("[{0}]", CurrentControl.ID);
            }

            EditableDesignerRegion itemsRegion = new EditableDesignerRegion(this, "Items", true);

            regions.Add(itemsRegion);

            string itemsContent = String.Format("<div style=\"border:solid 1px #ccc;\"><div style=\"font-size:11px;background-color:#ddd;\">Items</div><div style=\"padding:2px;\" {0}=\"{1}\">{2}</div></div>",
                                                DesignerRegion.DesignerRegionAttributeName, "0", GetEditableDesignerRegionContent(itemsRegion));


            string toolbarsContent = "";

            if (CurrentControl.Toolbars.Count > 0)
            {
                EditableDesignerRegion toolbarsRegion = new EditableDesignerRegion(this, "Toolbars", true);
                regions.Add(toolbarsRegion);

                toolbarsContent = String.Format("<div style=\"border:solid 1px #ccc;margin-bottom:5px;\"><div style=\"font-size:11px;background-color:#ddd;\">Toolbars</div><div style=\"padding:2px;\" {0}=\"{1}\">{2}</div></div>",
                                                DesignerRegion.DesignerRegionAttributeName, "1", GetEditableDesignerRegionContent(toolbarsRegion));
            }

            return(String.Format(TEMPLATE, title, toolbarsContent, itemsContent));
        }
示例#2
0
        /// <summary>
        /// GetDesignTimeHtml
        /// </summary>
        /// <param name="regions"></param>
        /// <returns></returns>
        /// <remarks>
        /// GetDesignTimeHtml
        /// </remarks>
        public override string GetDesignTimeHtml(DesignerRegionCollection regions)
        {
            this.CreateChildControls();

            for (int i = 0; i < this.nbRegions; i++)
            {
                DesignerRegion r;
                if (this.currentRegion == i)
                {
                    r = new EditableDesignerRegion(this, i.ToString());
                }
                else
                {
                    r = new DesignerRegion(this, i.ToString());
                }
                regions.Add(r);
            }

            if ((this.currentRegion >= 0) && (this.currentRegion < this.nbRegions))
            {
                regions[this.currentRegion].Highlight = true;
            }
            UpdateDesignTimeHtml();
            return(base.GetDesignTimeHtml(regions));
        }
        public override string GetDesignTimeHtml(DesignerRegionCollection regions)
        {
            IDictionary data = new HybridDictionary(2);

            data["CurrentView"] = this.CurrentView;
            if (base.UseRegions(regions, this.GetTemplate(this._changePassword)))
            {
                ((WebControl)base.ViewControl).Enabled = true;
                data.Add("RegionEditing", true);
                EditableDesignerRegion region = new TemplatedEditableDesignerRegion(this.TemplateDefinition)
                {
                    Description = System.Design.SR.GetString("ContainerControlDesigner_RegionWatermark")
                };
                regions.Add(region);
            }
            try
            {
                ((IControlDesignerAccessor)base.ViewControl).SetDesignModeState(data);
                ((ICompositeControlDesignerAccessor)base.ViewControl).RecreateChildControls();
                return(base.GetDesignTimeHtml());
            }
            catch (Exception exception)
            {
                return(this.GetErrorDesignTimeHtml(exception));
            }
        }
示例#4
0
 public override string GetDesignTimeHtml(DesignerRegionCollection regions)
 {
     try
     {
         WebPartZone viewControl = (WebPartZone)base.ViewControl;
         bool        flag        = base.UseRegions(regions, this._zone.ZoneTemplate, viewControl.ZoneTemplate);
         if ((viewControl.ZoneTemplate == null) && !flag)
         {
             return(this.GetEmptyDesignTimeHtml());
         }
         ((ICompositeControlDesignerAccessor)viewControl).RecreateChildControls();
         if (flag)
         {
             viewControl.Controls.Clear();
             WebPartEditableDesignerRegion region = new WebPartEditableDesignerRegion(viewControl, base.TemplateDefinition)
             {
                 IsSingleInstanceTemplate = true,
                 Description = System.Design.SR.GetString("ContainerControlDesigner_RegionWatermark")
             };
             regions.Add(region);
         }
         return(base.GetDesignTimeHtml());
     }
     catch (Exception exception)
     {
         return(this.GetErrorDesignTimeHtml(exception));
     }
 }
示例#5
0
        protected virtual void BuildRegions(DesignerRegionCollection regions)
        {
            //regions.Add(new DesignerRegion(this, "Header0"));
            //regions.Add(new DesignerRegion(this, "Header1"));

            //int i = 0;
            //foreach (RibbonTab lTab in _ListTabs)
            //{

            //    i++;
            //}

            for (int i = 0; i < _ListTabs.Count; i++)
            {
                regions.Add(new DesignerRegion(this, "Tab_" + i.ToString()));
            }

            // If the current view is for all, we need another editable region
            //EditableDesignerRegion edr0 = new EditableDesignerRegion(this, "Content" + _currentView, false);
            //regions.Add(edr0);

            // Set the highlight, depending upon the selected region
            //if (_currentView == 0 || _currentView == 1 || _currentView == 2)
            regions[CurrentTab].Highlight = true;
        }
示例#6
0
        public override string XGetDesignTimeHtml(DesignerRegionCollection regions)
        {
            if (regions == null)
            {
                base.GetDesignTimeHtml(regions);
            }

            this.designerRegions = regions;

            HtmlGenericControl tabPanel = new HtmlGenericControl("div");

            tabPanel.Attributes["class"] = "{0}{1}".FormatWith(this.tabPanelControl.BaseCls, !this.tabPanelControl.Border ? " x-tab-panel-noborder" : "");
            tabPanel.Style["width"]      = this.tabPanelControl.Width == Unit.Empty ? "auto" : this.tabPanelControl.Width.ToString();

            if (this.tabPanelControl.TabPosition == TabPosition.Top && this.tabPanelControl.Items.Count > 0)
            {
                tabPanel.Controls.Add(BuildTabs(TabPosition.Top));
            }

            tabPanel.Controls.Add(this.BuildBody());

            StringWriter   sr = new StringWriter(CultureInfo.CurrentCulture);
            HtmlTextWriter hw = new HtmlTextWriter(sr);

            tabPanel.RenderControl(hw);

            return(sr.ToString());
        }
示例#7
0
        public ViewRendering GetViewRendering(Control control)
        {
            string str2;
            DesignerRegionCollection regions;
            CatalogPart part = control as CatalogPart;

            if (part == null)
            {
                return(new ViewRendering(ControlDesigner.CreateErrorDesignTimeHtml(System.Design.SR.GetString("CatalogZoneDesigner_OnlyCatalogParts"), null, control), new DesignerRegionCollection()));
            }
            try
            {
                IDictionary data = new HybridDictionary(1);
                data["Zone"] = base.Zone;
                ((IControlDesignerAccessor)part).SetDesignModeState(data);
                this._partViewRendering = ControlDesigner.GetViewRendering(part);
                regions = this._partViewRendering.Regions;
                StringWriter writer = new StringWriter(CultureInfo.InvariantCulture);
                this.RenderCatalogPart(new DesignTimeHtmlTextWriter(writer), (CatalogPart)PartDesigner.GetViewControl(part));
                str2 = writer.ToString();
            }
            catch (Exception exception)
            {
                str2    = ControlDesigner.CreateErrorDesignTimeHtml(System.Design.SR.GetString("ControlDesigner_UnhandledException"), exception, control);
                regions = new DesignerRegionCollection();
            }
            return(new ViewRendering(str2, regions));
        }
 public override string GetDesignTimeHtml(DesignerRegionCollection regions)
 {
     if (this.Disabled)
     {
         return(this.EmptyDesignerText);
     }
     return(this.XGetDesignTimeHtml(regions));
 }
        protected virtual void BuildRegions(DesignerRegionCollection regions)
        {
            EditableDesignerRegion edr0 = new EditableDesignerRegion(this, "Content", false);

            regions.Add(edr0);

            regions[0].Highlight = true;
        }
示例#10
0
        public override string GetDesignTimeHtml(DesignerRegionCollection regions)
        {
            PrintLabel printLabel = Component as PrintLabel;

            HtmlTextWriter htmlWriter = new HtmlTextWriter(new StringWriter());

            printLabel.RenderControl(htmlWriter);
            return(htmlWriter.InnerWriter.ToString());
        }
示例#11
0
        public override string GetDesignTimeHtml(DesignerRegionCollection regions)
        {
            if (CurrentControl.Tabs.Count == 0)
            {
                return(GetEmptyDesignTimeHtml());
            }


            // 1. Add tabs title list
            StringBuilder sb       = new StringBuilder();
            int           tabIndex = 0;

            foreach (Tab tab in CurrentControl.Tabs)
            {
                HtmlNodeBuilder nb = new HtmlNodeBuilder("div");

                if (!String.IsNullOrEmpty(tab.Title))
                {
                    nb.InnerProperty = tab.Title;
                }
                else
                {
                    nb.InnerProperty = String.Format("[{0}]", tab.ID);
                }

                string styleStr = "padding:0 5px;margin-right:5px;display:inline;";
                if (CurrentControl.ActiveTabIndex == tabIndex)
                {
                    styleStr += "background-color:#666;";
                }
                nb.SetProperty("style", styleStr);

                nb.SetProperty(DesignerRegion.DesignerRegionAttributeName, tabIndex.ToString());

                DesignerRegion region = new DesignerRegion(this, "Tab_" + tabIndex, true);
                region.Properties["TabIndex"] = tabIndex.ToString();
                regions.Add(region);

                sb.Append(nb.ToString());
                tabIndex++;
            }
            string tabsHtml = sb.ToString();


            // 2. Add current active tab content
            // Note: Currently, we have add (CurrentControl.Tabs.Count - 1) items into regions,
            // So This editable region's index is CurrentControl.Tabs.Count.
            EditableDesignerRegion editableRegion = new EditableDesignerRegion(this, "Content", true);

            regions.Add(editableRegion);
            //editableRegion.Properties["ActiveTabIndex"] = CurrentControl.ActiveTabIndex.ToString();

            string contentHtml = String.Format("<div {0}='{1}'>{2}</div>",
                                               DesignerRegion.DesignerRegionAttributeName, CurrentControl.Tabs.Count, GetEditableDesignerRegionContent(editableRegion));

            return(String.Format(PANEL_TEMPLATE, tabsHtml, contentHtml));
        }
示例#12
0
        public override string GetDesignTimeHtml(DesignerRegionCollection regions)
        {
            var chart         = (ChartBase)Component;
            var stringBuilder = new StringBuilder(1024);

            stringBuilder.AppendFormat("<div style=\"width: {0}px; height:{1}px;border-style: solid; border-width: 1px;\">", chart.ChartWidth, chart.ChartHeight);

            return(stringBuilder.ToString());
        }
示例#13
0
        public override string GetDesignTimeHtml(DesignerRegionCollection regions)
        {
            StringBuilder  sb     = new StringBuilder(1024);
            StringWriter   sr     = new StringWriter(sb, CultureInfo.InvariantCulture);
            HtmlTextWriter writer = new HtmlTextWriter(sr);

            AsyncFileUpload.CreateChilds();
            AsyncFileUpload.RenderControl(writer);
            return(sb.ToString());
        }
示例#14
0
        public override string GetDesignTimeHtml(DesignerRegionCollection regions)
        {
            this.FrameStyle.BackColor   = Color.White;
            this.FrameStyle.BorderColor = Color.LightGray;
            this.FrameStyle.BorderWidth = Unit.Pixel(1);

            RoundedPanel roundPanel = (RoundedPanel)Component;

            return(roundPanel.GetBeginTag() + base.GetDesignTimeHtml(regions) + roundPanel.GetEndTag());
        }
示例#15
0
        public override string GetDesignTimeHtml(DesignerRegionCollection regions)
        {
            var controlPreviewHtml =
                @"<div class=""ajax__fileupload"" id=""SampleContent_AjaxFileUpload1_ctl00"" style=""padding: 4px;border: #D3D3D3 1px solid;overflow: auto;"">
	                <div style=""width: 100%; height: 60px; visibility: visible; border-style: dotted; border-width: 1px; line-height: 50px; text-align: center; margin-bottom: 2px;"">Drop files here</div>
	                <span style=""display: inline-block;overflow: hidden;position: relative;width: 80px;height: 24px;line-height: 24px;"">
	                <span style=""display: block;height: 24px;line-height: 24px;width: 80px;text-align: center;background-color: #212121;color: #D0D0D0;cursor: pointer;margin-right: 4px;font-size: 13px;"">Select File</span>
	                <div style=""overflow: hidden;"">
	                <div style=""visibility: visible;border: #A9A9A9 1px solid;border-width: 1px;margin-top: 2px;padding: 4px;clear: both;""></div></div></span>
	                <div style=""visibility: visible;border: #A9A9A9 1px solid;border-width: 1px;margin-top: 2px;padding: 4px;clear: both;"">
		                <div style=""position: relative;z-index: 0; color: #009; line-height: 20px;line-height: 20px;height: 20px;margin-bottom: 2px;overflow: hidden;"">
		                <div style=""display: inline-block;"" class=""pendingState"">
		                <span class=""ajax__fileupload_fileItemInfo"">
			                <span>File 1.jpg</span> <span class=""filetype"">(image/jpeg)</span> 
			                - 
			                <span>1.28 MB</span> 
		                </span>
		                <span> (uploading)</span></div>
		                <div style=""cursor: pointer;background-color: #900;color: white;width: 55px;height: 20px;line-height: 20px;text-align: center;display: block;float: left;position: absolute;top: 0;right: 0;"">Remove</div>
		                </div>

		                <div style=""position: relative;z-index: 0; color: #009; line-height: 20px;line-height: 20px;height: 20px;margin-bottom: 2px;overflow: hidden;"">
		                <div style=""display: inline-block;"" class=""pendingState"">
		                <span class=""ajax__fileupload_fileItemInfo"">
			                <span>File 2.jpg</span> <span class=""filetype"">(image/jpeg)</span> 
			                - 
			                <span>2.18 MB</span> 
		                </span>
		                <span> (pending)</span></div>
		                <div style=""cursor: pointer;background-color: #900;color: white;width: 55px;height: 20px;line-height: 20px;text-align: center;display: block;float: left;position: absolute;top: 0;right: 0;"">Remove</div>
		                </div>
		
		                <div style=""position: relative;z-index: 0; color: #009; line-height: 20px;line-height: 20px;height: 20px;margin-bottom: 2px;overflow: hidden;"">
		                <div style=""display: inline-block;"" class=""pendingState"">
		                <span class=""ajax__fileupload_fileItemInfo"">
			                <span>File 3.jpg</span> <span class=""filetype"">(image/jpeg)</span> 
			                - 
			                <span>99 MB</span> 
		                </span>
		                <span> (pending)</span></div>
		                <div style=""cursor: pointer;background-color: #900;color: white;width: 55px;height: 20px;line-height: 20px;text-align: center;display: block;float: left;position: absolute;top: 0;right: 0;"">Remove</div>
		                </div>
	                </div>
	
	                <div align=""right"" style=""margin-top: 2px;line-height: 20px;height: 20px;"">
		                <div>
			                <div align=""left"" style=""width: 80%; float: left; line-height: 20px;"">
			                <div style=""width: 65%; height: 20px; overflow: visible; white-space: nowrap;padding-left: 4px;background-color: #CCFFCC;"">uploaded 65%</div></div>
		                </div>
		                <div style=""width: 60px;text-align: center;cursor: pointer;color: white;font-weight: bold;background-color: #000099; line-height: 20px;"">Upload</div>
	                </div>
                </div>";

            return(controlPreviewHtml);
        }
        public override string GetDesignTimeHtml(DesignerRegionCollection regions)
        {
            IDesignerHost service = (IDesignerHost)this.GetService(typeof(IDesignerHost));

            if (!(service.RootComponent is MasterPage))
            {
                throw new InvalidOperationException(System.Design.SR.GetString("ContentPlaceHolder_Invalid_RootComponent"));
            }
            regions.Add(new EditableDesignerRegion(this, "Content"));
            return(this.CreateDesignTimeHTML());
        }
        public override string GetDesignTimeHtml(DesignerRegionCollection regions)
        {
            EditableDesignerRegion region = new EditableDesignerRegion(this, "Text")
            {
                Description = System.Design.SR.GetString("LocalizeDesigner_RegionWatermark")
            };

            region.Properties[typeof(Control)] = base.Component;
            regions.Add(region);
            return(string.Format(CultureInfo.InvariantCulture, "<span {0}=0></span>", new object[] { DesignerRegion.DesignerRegionAttributeName }));
        }
示例#18
0
        public override string GetDesignTimeHtml(DesignerRegionCollection regions)
        {
            EditableDesignerRegion editableRegion = new EditableDesignerRegion(this, "Content", true);

            regions.Add(editableRegion);

            string content = String.Format("<div {0}='{1}'>{2}</div>",
                                           DesignerRegion.DesignerRegionAttributeName, 0, GetEditableDesignerRegionContent(editableRegion));

            return(content);
        }
        public override string GetDesignTimeHtml(DesignerRegionCollection regions)
        {
            EditableDesignerRegion region = new EditableDesignerRegion(this, "Content");

            regions.Add(region);
            Font   captionFont = SystemFonts.CaptionFont;
            Color  controlText = SystemColors.ControlText;
            Color  control     = SystemColors.Control;
            string str         = base.Component.GetType().Name + " - " + base.Component.Site.Name;

            return(string.Format(CultureInfo.InvariantCulture, "<table cellspacing=0 cellpadding=0 style=\"border:1px solid black; width:100%; height:200px\">\r\n            <tr>\r\n              <td style=\"width:100%; height:25px; font-family:Tahoma; font-size:{2}pt; color:{3}; background-color:{4}; padding:5px; border-bottom:1px solid black;\">\r\n                &nbsp;{0}\r\n              </td>\r\n            </tr>\r\n            <tr>\r\n              <td style=\"width:100%; height:175px; vertical-align:top;\" {1}=\"0\">\r\n              </td>\r\n            </tr>\r\n          </table>", new object[] { str, DesignerRegion.DesignerRegionAttributeName, captionFont.SizeInPoints, ColorTranslator.ToHtml(controlText), ColorTranslator.ToHtml(control) }));
        }
示例#20
0
        public override string GetDesignTimeHtml(DesignerRegionCollection regions)
        {
            StringBuilder sb = new StringBuilder(1024);

            sb.Append(string.Format("<div style=\"width: {0}px; height: {1}px;border-style: solid; border-width: 1px;\">", AreaChart.ChartWidth, AreaChart.ChartHeight));
            StringWriter   sr     = new StringWriter(sb, CultureInfo.InvariantCulture);
            HtmlTextWriter writer = new HtmlTextWriter(sr);

            AreaChart.CreateChilds();
            AreaChart.RenderControl(writer);
            return(sb.ToString());
        }
示例#21
0
        public override string XGetDesignTimeHtml(DesignerRegionCollection regions)
        {
            EditableDesignerRegion region = new EditableDesignerRegion(this, "Body", false);

            regions.Add(region);

            StringWriter   writer     = new StringWriter(CultureInfo.CurrentCulture);
            HtmlTextWriter htmlWriter = new HtmlTextWriter(writer);

            FieldSet c = (FieldSet)this.Control;

            string width  = " width: {0};".FormatWith(c.Width.ToString());
            string height = " height: {0}px;".FormatWith((c.Height.Value - 39).ToString());

            string buttons = "";

            buttons += (c.CheckboxToggle && !c.Collapsible) ? "<input name=\"ext-comp-1002-checkbox\" type=\"checkbox\">" : "";
            buttons += (c.Collapsible && !c.CheckboxToggle) ? "<div class=\"x-tool x-tool-toggle\">&nbsp;</div>" : "";

            /*
             * 0 - ClientID
             * 1 - Title
             * 2 - Width
             * 3 - Height
             * 4 - Buttons
             * 5 - BodyStyle
             */

            object[] args = new object[6];
            args[0] = c.ClientID;
            args[1] = c.Title;
            args[2] = width;
            args[3] = height;
            args[4] = buttons;
            args[5] = c.BodyStyle;

            LiteralControl topCtrl = new LiteralControl(string.Format(this.HtmlBegin, args));

            topCtrl.RenderControl(htmlWriter);

            HtmlGenericControl div = (HtmlGenericControl)c.ContentContainer;

            div.Attributes[DesignerRegion.DesignerRegionAttributeName] = "0";
            div.InnerHtml = this.GetEditableDesignerRegionContent(region);
            div.RenderControl(htmlWriter);

            LiteralControl bottomCtrl = new LiteralControl(this.HtmlEnd);

            bottomCtrl.RenderControl(htmlWriter);

            return(writer.ToString());
        }
 private string GetDesignTimeHtmlHelper(bool useRegions, DesignerRegionCollection regions)
 {
     System.Web.UI.WebControls.View component = (System.Web.UI.WebControls.View)base.Component;
     if (!(component.Parent is MultiView))
     {
         return(base.CreateInvalidParentDesignTimeHtml(typeof(System.Web.UI.WebControls.View), typeof(MultiView)));
     }
     if (useRegions)
     {
         return(base.GetDesignTimeHtml(regions));
     }
     return(base.GetDesignTimeHtml());
 }
示例#23
0
        } // PreFilterProperties

        // </snippet3>

        // <snippet4>
        // Generate the design-time markup.
        public override string GetDesignTimeHtml(DesignerRegionCollection regions)
        {
            // Make the control more visible in the designer.
            // Enclose the markup in a table with an orange border.
            const string openTableMarkup =
                "<table><tr><td style=\"border:4 solid #FF7F00;\">";
            const string closeTableMarkup = "</td></tr></table>";

            // Call the base method to generate the markup.
            string markup = base.GetDesignTimeHtml(regions);

            return(openTableMarkup + markup + closeTableMarkup);
        } // GetDesignTimeHtml
示例#24
0
        public override string GetDesignTimeHtml(DesignerRegionCollection regions)
        {
            string html;

            try
            {
                html = base.GetDesignTimeHtml();
            }
            catch (Exception exception)
            {
                html = this.GetErrorDesignTimeHtml(exception);
            }
            return(html);
        }
示例#25
0
        public override string GetDesignTimeHtml(DesignerRegionCollection regions)
        {
            StringBuilder  sb     = new StringBuilder(1024);
            StringWriter   sr     = new StringWriter(sb, CultureInfo.InvariantCulture);
            HtmlTextWriter writer = new HtmlTextWriter(sr);

            writer.AddAttribute(HtmlTextWriterAttribute.Rel, "stylesheet");
            writer.AddAttribute(HtmlTextWriterAttribute.Href, Editor.Page.ClientScript.GetWebResourceUrl(typeof(AjaxControlToolkit.HTMLEditor.Editor), "HTMLEditor.Editor.css"));
            writer.RenderBeginTag(HtmlTextWriterTag.Link);
            writer.RenderEndTag();
            Editor.CreateChilds(this);
            Editor.RenderControl(writer);
            return(sb.ToString());
        }
 public override string GetDesignTimeHtml(DesignerRegionCollection regions)
 {
     if (base.UseRegions(regions, this._login.LayoutTemplate))
     {
         ((WebControl)base.ViewControl).Enabled = true;
         IDictionary data = new HybridDictionary(1);
         data.Add("RegionEditing", true);
         ((IControlDesignerAccessor)base.ViewControl).SetDesignModeState(data);
         EditableDesignerRegion region = new TemplatedEditableDesignerRegion(this.TemplateDefinition)
         {
             Description = System.Design.SR.GetString("ContainerControlDesigner_RegionWatermark")
         };
         regions.Add(region);
     }
     return(this.GetDesignTimeHtml());
 }
示例#27
0
        public override string GetDesignTimeHtml(DesignerRegionCollection regions)
        {
            //if (DTEUtilities.Connect())
            //{
            //    // Make an approximate calculation for the current designer window height.
            //    EnvDTE._DTE dte = DTEUtilities._application;
            //    int offset = ((this.Control.ScriptManager.Hide) ? 42 : 143);
            //    this.height = dte.ActiveWindow.Height - offset;
            //}

            //EnvDTE.DTE dte = (EnvDTE.DTE)System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.9.0");
            //int offset = ((this.Control.ScriptManager.Hide) ? 42 : 143);
            //this.height = dte.ActiveWindow.Height - offset;



            designerRegions = regions;

            StringBuilder sb = new StringBuilder(256);

            if (this.viewPort.Layout == null)
            {
                sb.Append(begin);

                object[] prms = new object[]
                {
                    this.GetWebResourceUrl("Coolite.Ext.Web.Build.Resources.Coolite.icons.add.png"),
                    this.GetDesignerRegionAttribute(ViewPortClickAction.AddBorderLayout),
                    this.GetDesignerRegionAttribute(ViewPortClickAction.AddFitLayout),
                    this.GetDesignerRegionAttribute(ViewPortClickAction.AddAccordion)
                };

                sb.AppendFormat(content, prms);
                sb.AppendFormat(editor, GetEditableDesignerAttribute(), 100);
                sb.Append(end);
            }
            else
            {
                if (!this.viewPort.Height.IsEmpty)
                {
                    this.height = (int)this.viewPort.Height.Value;
                }
                sb.AppendFormat(editor, GetEditableDesignerAttribute(), this.height);
            }

            return(sb.ToString());
        }
示例#28
0
        public override string GetDesignTimeHtml(DesignerRegionCollection regions)
        {
            StringBuilder sb = new StringBuilder();

            int rowIndex = 0;

            foreach (FormRow row in CurrentControl.Rows)
            {
                #region oldcode
                //bool showInnerTable = row.Fields.Count > 1 ? true : false;
                //if (showInnerTable)
                //{
                //    sb.Append("<table cellpadding='0' cellspacing='2' border='0' width='100%'><tbody><tr>");
                //}

                //int columnIndex = 0;
                //foreach (Field field in row.Fields)
                //{
                //if (showInnerTable)
                //{
                //    sb.Append("<td>");
                //}
                #endregion

                string regionName = String.Format("{0}_{1}", EDITOR_REGION_PREFIX, rowIndex);
                EditableDesignerRegion editableRegion = new EditableDesignerRegion(this, regionName, false);
                editableRegion.Properties["RowIndex"] = rowIndex;
                regions.Add(editableRegion);

                sb.AppendFormat("<div style='margin:2px;' {0}='{1}'>{2}</div>",
                                DesignerRegion.DesignerRegionAttributeName, rowIndex, GetEditableDesignerRegionContent(editableRegion));

                rowIndex++;
            }


            string title = CurrentControl.Title;
            if (String.IsNullOrEmpty(title))
            {
                title = String.Format("[{0}]", CurrentControl.ID);
            }

            string content = String.Format(PANEL_TEMPLATE, title, sb.ToString());


            return(content);
        }
        public override string GetDesignTimeHtml(DesignerRegionCollection regions)
        {
            string designTimeHtml = string.Empty;

            if (base.UseRegions(regions, this.CurrentTemplate, this.CurrentViewControlTemplate))
            {
                regions.Add(this.BuildRegion());
            }
            else
            {
                designTimeHtml = this.GetDesignTimeHtml();
            }
            StringBuilder builder = new StringBuilder(0x400);

            builder.Append(string.Format(CultureInfo.InvariantCulture, "<table cellspacing=0 cellpadding=0 border=0 style=\"display:inline-block\">\r\n                <tr>\r\n                    <td nowrap align=center valign=middle style=\"color:{0}; background-color:{1}; \">{2}</td>\r\n                </tr>\r\n                <tr>\r\n                    <td style=\"vertical-align:top;\" {3}='0'>{4}</td>\r\n                </tr>\r\n          </table>", new object[] { ColorTranslator.ToHtml(SystemColors.ControlText), ColorTranslator.ToHtml(SystemColors.Control), this._loginView.ID, DesignerRegion.DesignerRegionAttributeName, designTimeHtml }));
            return(builder.ToString());
        }
示例#30
0
        public override string GetDesignTimeHtml(DesignerRegionCollection regions)
        {
            EditableDesignerRegion editableRegion = new EditableDesignerRegion(this, "Content", true);

            regions.Add(editableRegion);

            string title = CurrentControl.Title;

            if (String.IsNullOrEmpty(title))
            {
                title = String.Format("[{0}]", CurrentControl.ID);
            }
            string content = String.Format("<div {0}='{1}'>{2}</div>",
                                           DesignerRegion.DesignerRegionAttributeName, 0, GetEditableDesignerRegionContent(editableRegion));

            return(String.Format(PANEL_TEMPLATE, title, content));
        }
	public virtual string GetDesignTimeHtml(DesignerRegionCollection regions) {}
示例#32
0
		public virtual string GetDesignTimeHtml (DesignerRegionCollection regions) {
			throw new NotImplementedException ();
		}
 // Constructors
 public ViewRendering(string content, DesignerRegionCollection regions)
 {
 }
 public ViewRendering(string content, DesignerRegionCollection regions, bool visible)
 {
 }