当前位置: 首页>>代码示例>>C#>>正文


C# Panel.Dispose方法代码示例

本文整理汇总了C#中System.Web.UI.WebControls.Panel.Dispose方法的典型用法代码示例。如果您正苦于以下问题:C# Panel.Dispose方法的具体用法?C# Panel.Dispose怎么用?C# Panel.Dispose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Web.UI.WebControls.Panel的用法示例。


在下文中一共展示了Panel.Dispose方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateInfoCardUnsupportedPanel

		private Panel CreateInfoCardUnsupportedPanel() {
			Contract.Ensures(Contract.Result<Panel>() != null);

			Panel unsupportedPanel = new Panel();
			try {
				if (this.UnsupportedTemplate != null) {
					this.UnsupportedTemplate.InstantiateIn(unsupportedPanel);
				}
				return unsupportedPanel;
			} catch {
				unsupportedPanel.Dispose();
				throw;
			}
		}
开发者ID:jsmale,项目名称:dotnetopenid,代码行数:14,代码来源:InfoCardSelector.cs

示例2: CreateInfoCardUnsupportedPanel

		private Panel CreateInfoCardUnsupportedPanel() {
			Panel unsupportedPanel = new Panel();
			try {
				if (this.UnsupportedTemplate != null) {
					this.UnsupportedTemplate.InstantiateIn(unsupportedPanel);
				}
				return unsupportedPanel;
			} catch {
				unsupportedPanel.Dispose();
				throw;
			}
		}
开发者ID:Cyberlane,项目名称:DotNetOpenAuth,代码行数:12,代码来源:InfoCardSelector.cs

示例3: CreateInfoCardSupportedPanel

		private Panel CreateInfoCardSupportedPanel() {
			Contract.Ensures(Contract.Result<Panel>() != null);

			Panel supportedPanel = new Panel();

			try {
				if (!this.DesignMode) {
					// At the user agent, assume InfoCard is not supported until
					// the JavaScript discovers otherwise and reveals this panel.
					supportedPanel.Style[HtmlTextWriterStyle.Display] = "none";
				}

				supportedPanel.Controls.Add(this.CreateInfoCardImage());

				// trigger the selector at page load?
				if (this.AutoPopup && !this.Page.IsPostBack) {
					this.Page.ClientScript.RegisterStartupScript(
						typeof(InfoCardSelector),
						"selector_load_trigger",
						this.GetInfoCardSelectorActivationScript(true),
						true);
				}
				return supportedPanel;
			} catch {
				supportedPanel.Dispose();
				throw;
			}
		}
开发者ID:jsmale,项目名称:dotnetopenid,代码行数:28,代码来源:InfoCardSelector.cs

示例4: CreateRotatorContainer

        /// <summary>Creates a <see cref="Panel" /> from a tag, setting its <see cref="Panel.CssClass" /> and supplying Text or inner controls, if it has any.</summary>
        /// <param name="tag">The tag whose content is being represented.</param>
        /// <param name="slide">The object from which to get the property.</param>
        /// <param name="resourceFile">The resource file from which to get localized resources.</param>
        /// <returns>The created container</returns>
        private Panel CreateRotatorContainer(Tag tag, ITemplateable slide, string resourceFile)
        {
            Panel container = null;
            try
            {
                container = new Panel();
                container.CssClass = TemplateEngine.GetAttributeValue(tag, slide, null, resourceFile, "CssClass", "class");

                if (tag.HasChildTags)
                {
                    TemplateEngine.ProcessTags(container, tag.ChildTags, slide, null, resourceFile, this.ProcessTags, this.GetSlides);
                }
                else
                {
                    var innerText = TemplateEngine.GetAttributeValue(tag, slide, (ITemplateable)null, resourceFile, "Text");
                    if (!string.IsNullOrEmpty(innerText))
                    {
                        container.Controls.Add(new LiteralControl(innerText));
                    }
                }

                return container;
            }
            catch
            {
                if (container != null)
                {
                    container.Dispose();
                }

                throw;
            }
        }
开发者ID:EngageSoftware,项目名称:Engage-Rotator,代码行数:38,代码来源:Rotator.ascx.cs


注:本文中的System.Web.UI.WebControls.Panel.Dispose方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。