本文整理汇总了C#中System.Web.UI.Design.EditableDesignerRegion类的典型用法代码示例。如果您正苦于以下问题:C# EditableDesignerRegion类的具体用法?C# EditableDesignerRegion怎么用?C# EditableDesignerRegion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EditableDesignerRegion类属于System.Web.UI.Design命名空间,在下文中一共展示了EditableDesignerRegion类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: SetEditableDesignerRegionContent
public override void SetEditableDesignerRegionContent(EditableDesignerRegion region, string content)
{
int regionIndex = Int32.Parse(region.Name.Substring(7));
if (content == null)
{
if (regionIndex == 0)
myControl.View1 = null;
else if (regionIndex == 1)
myControl.View2 = null;
return;
}
IDesignerHost host =
(IDesignerHost)Component.Site.GetService(typeof(IDesignerHost));
if (host != null)
{
ITemplate template = ControlParser.ParseTemplate(host, content);
if (template != null)
{
if (regionIndex == 0)
myControl.View1 = template;
else if (regionIndex == 1)
myControl.View2 = template;
}
}
}
开发者ID:netatomy,项目名称:LearningNet,代码行数:29,代码来源:Listing26-43.cs
示例2: GetDesignTimeHtml
public override string GetDesignTimeHtml(DesignerRegionCollection regions)
{
this.CreateChildControls();
for (int i = 0; i < _nbRegions; i++)
{
DesignerRegion r;
if (_currentRegion == i)
r = new EditableDesignerRegion(this, i.ToString());
else
r = new DesignerRegion(this, i.ToString());
regions.Add(r);
}
if ((_currentRegion >= 0) && (_currentRegion < _nbRegions))
regions[_currentRegion].Highlight = true;
return base.GetDesignTimeHtml(regions);
}
开发者ID:Ghostxx7Org,项目名称:EShop,代码行数:27,代码来源:TitledBoxDisigner.cs
示例3: GetDesignTimeHtml
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);
}
开发者ID:g992com,项目名称:esb,代码行数:28,代码来源:SimpleFormDesigner.cs
示例4: GetDesignTimeHtml
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 });
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:9,代码来源:LocalizeDesigner.cs
示例5: GetDesignTimeHtml
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 {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) });
}
开发者ID:Reegenerator,项目名称:Sample-CustomizeDatasetCS,代码行数:10,代码来源:ContentDesigner.cs
示例6: GetDesignTimeHtml
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;
}
开发者ID:g992com,项目名称:esb,代码行数:10,代码来源:ToolbarDesigner.cs
示例7: GetEditableDesignerRegionContent
public override string GetEditableDesignerRegionContent(EditableDesignerRegion region)
{
IDesignerHost host = (IDesignerHost)Component.Site.GetService(typeof(IDesignerHost));
if (host != null)
{
ITemplate template = (region.Name == String.Concat(DesignerRegion.DesignerRegionAttributeName, "0")) ? _Control.FirstTemplate : _Control.SecondTemplate;
if (template != null)
return ControlPersister.PersistTemplate(template, host);
}
return String.Empty;
}
开发者ID:cstruter,项目名称:ASPNetDemoTemplateControl,代码行数:11,代码来源:CustomTemplateDesigner.cs
示例8: GetEditableDesignerRegionContent
public override string GetEditableDesignerRegionContent(EditableDesignerRegion region)
{
if (this._content == null)
{
this._content = base.Tag.GetContent();
}
if (this._content == null)
{
return string.Empty;
}
return this._content;
}
开发者ID:Reegenerator,项目名称:Sample-CustomizeDatasetCS,代码行数:12,代码来源:ContentDesigner.cs
示例9: GetEditableDesignerRegionContent
// Get the content string for the selected region. Called by the designer host?
public override string GetEditableDesignerRegionContent(EditableDesignerRegion region)
{
//Get a reference to the designer host
IDesignerHost host = (IDesignerHost)Component.Site.GetService(typeof(IDesignerHost));
if (host != null)
{
TabPage tb;
tb = (TabPage)tabView.Tabs[tabView.CurrentTabIndex];
return ControlPersister.PersistControl(tb, host);
}
return String.Empty;
}
开发者ID:Confirmit,项目名称:Portal,代码行数:13,代码来源:TabViewDesigner.cs
示例10: SetEditableDesignerRegionContent
public override void SetEditableDesignerRegionContent(EditableDesignerRegion region, string content)
{
IDesignerHost host = (IDesignerHost)Component.Site.GetService(typeof(IDesignerHost));
if (host != null)
{
ITemplate template = ControlParser.ParseTemplate(host, content);
if (template != null)
{
_Control.Content = template;
}
}
}
开发者ID:trankimhieu,项目名称:eCommerce-MVC,代码行数:14,代码来源:Designer.cs
示例11: GetEditableDesignerRegionContent
public override string GetEditableDesignerRegionContent(EditableDesignerRegion region)
{
IDesignerHost host = (IDesignerHost)Component.Site.GetService(typeof(IDesignerHost));
if (host != null)
{
ITemplate template = _Control.Content;
if (template != null)
return ControlPersister.PersistTemplate(template, host);
}
return "oops...";
}
开发者ID:trankimhieu,项目名称:eCommerce-MVC,代码行数:14,代码来源:Designer.cs
示例12: GetDesignTimeHtml
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);
}
开发者ID:g992com,项目名称:esb,代码行数:15,代码来源:WindowDesigner.cs
示例13: SetEditableDesignerRegionContent
public override void SetEditableDesignerRegionContent(EditableDesignerRegion region, string content)
{
if (content == null)
return;
IDesignerHost host = (IDesignerHost)Component.Site.GetService(typeof(IDesignerHost));
if (host != null)
{
ITemplate template = ControlParser.ParseTemplate(host, content);
if (region.Name == String.Concat(DesignerRegion.DesignerRegionAttributeName, "0"))
_Control.FirstTemplate = template;
else
_Control.SecondTemplate = template;
}
}
开发者ID:cstruter,项目名称:ASPNetDemoTemplateControl,代码行数:15,代码来源:CustomTemplateDesigner.cs
示例14: GetEditableDesignerRegionContent
public override string GetEditableDesignerRegionContent(EditableDesignerRegion region)
{
IDesignerHost host = (IDesignerHost)Component.Site.GetService(typeof(IDesignerHost));
if (host != null)
{
ITemplate template = ((Component)this.Control).Content as ITemplate;
if (template != null)
{
return ControlPersister.PersistTemplate(template, host);
}
}
return "";
}
开发者ID:pgodwin,项目名称:Ext.net,代码行数:16,代码来源:ContentPanelDesigner.cs
示例15: GetDesignTimeHtml
public override String GetDesignTimeHtml(DesignerRegionCollection regions)
{
int i = 0;
foreach (TabPage tabPage in tabControl.TabPages)
{
regions.Add(new DesignerRegion(this, HEADER_PREFIX + i.ToString()));
i++;
}
EditableDesignerRegion editableRegion =
new EditableDesignerRegion(this,
CONTENT_PREFIX + tabControl.CurrentDesignTab, false);
regions.Add(editableRegion);
regions[tabControl.CurrentDesignTab].Highlight = true;
return base.GetDesignTimeHtml();
}
开发者ID:JadJabbour,项目名称:SimpleCSharpTabControl,代码行数:16,代码来源:TabControlDesigner.cs
示例16: GetEditableDesignerRegionContent
public override string GetEditableDesignerRegionContent(EditableDesignerRegion region)
{
IDesignerHost service = (IDesignerHost)base.Component.Site.GetService(typeof(IDesignerHost));
if (service != null)
{
StringBuilder sb = new StringBuilder();
foreach (Control c in CurrentControl.Controls)
{
sb.Append(ControlPersister.PersistControl(c, service));
}
return sb.ToString();
}
return String.Empty;
}
开发者ID:g992com,项目名称:esb,代码行数:16,代码来源:ContentPanelDesigner.cs
示例17: XGetDesignTimeHtml
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\"> </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();
}
开发者ID:pgodwin,项目名称:Ext.net,代码行数:47,代码来源:FieldSetDesigner.cs
示例18: GetEditableDesignerRegionContent
public override string GetEditableDesignerRegionContent(EditableDesignerRegion region)
{
IDesignerHost host =
(IDesignerHost)Component.Site.GetService(typeof(IDesignerHost));
if (host != null)
{
ITemplate template = myControl.View1;
if (region.Name == "Content1")
template = myControl.View2;
if (template != null)
return ControlPersister.PersistTemplate(template, host);
}
return String.Empty;
}
开发者ID:netatomy,项目名称:LearningNet,代码行数:18,代码来源:Listing26-43.cs
示例19: GetEditableDesignerRegionContent
public override string GetEditableDesignerRegionContent(EditableDesignerRegion region)
{
IDesignerHost host = (IDesignerHost)(new Component().Site.GetService(typeof(IDesignerHost)));
if (host != null && tabControl.TabPages.Count > 0)
{
ITemplate template = tabControl.TabPages[0].TabBody;
if (region.Name.StartsWith(CONTENT_PREFIX))
{
int tabIndex = int.Parse(region.Name.Substring(CONTENT_PREFIX.Length));
template = tabControl.TabPages[tabIndex].TabBody;
}
if (template != null)
return ControlPersister.PersistTemplate(template, host);
}
return String.Empty;
}
开发者ID:JadJabbour,项目名称:SimpleCSharpTabControl,代码行数:19,代码来源:TabControlDesigner.cs
示例20: SetEditableDesignerRegionContent
public override void SetEditableDesignerRegionContent(EditableDesignerRegion region, string content)
{
if (content == null)
return;
IDesignerHost host = (IDesignerHost)(new Component().Site.GetService(typeof(IDesignerHost)));
if (host != null)
{
ITemplate template = ControlParser.ParseTemplate(host, content);
if (template != null)
{
if (region.Name.StartsWith(CONTENT_PREFIX))
{
int tabIndex = int.Parse(region.Name.Substring(CONTENT_PREFIX.Length));
tabControl.TabPages[tabIndex].TabBody = template;
}
}
}
}
开发者ID:JadJabbour,项目名称:SimpleCSharpTabControl,代码行数:20,代码来源:TabControlDesigner.cs
注:本文中的System.Web.UI.Design.EditableDesignerRegion类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论