• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# WebParts.WebPart类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



WebPart类属于System.Web.UI.WebControls.WebParts命名空间,在下文中一共展示了WebPart类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: RenderPartContents

 protected virtual new void RenderPartContents (System.Web.UI.HtmlTextWriter writer, WebPart webPart)
 {
   Contract.Requires (webPart != null);
   Contract.Requires (this.Zone != null);
   Contract.Requires (this.Zone.ErrorStyle != null);
   Contract.Requires (writer != null);
 }
开发者ID:asvishnyakov,项目名称:CodeContracts,代码行数:7,代码来源:System.Web.UI.WebControls.WebParts.WebPartChrome.cs


示例2: RenderTitleBar

 protected virtual void RenderTitleBar(HtmlTextWriter writer, WebPart webPart)
 {
     writer.AddAttribute(HtmlTextWriterAttribute.Cellspacing, "0");
     writer.AddAttribute(HtmlTextWriterAttribute.Cellpadding, "0");
     writer.AddAttribute(HtmlTextWriterAttribute.Border, "0");
     writer.AddStyleAttribute(HtmlTextWriterStyle.Width, "100%");
     writer.RenderBeginTag(HtmlTextWriterTag.Table);
     writer.RenderBeginTag(HtmlTextWriterTag.Tr);
     base.Zone.PartTitleStyle.AddAttributesToRender(writer, base.Zone);
     writer.RenderBeginTag(HtmlTextWriterTag.Td);
     writer.AddAttribute(HtmlTextWriterAttribute.Title, webPart.Description, true);
     writer.RenderBeginTag(HtmlTextWriterTag.Span);
     writer.WriteEncodedText(webPart.Title);
     writer.RenderEndTag();
     writer.RenderEndTag();
     base.Zone.PartTitleStyle.AddAttributesToRender(writer, base.Zone);
     writer.AddStyleAttribute(HtmlTextWriterStyle.TextAlign, TextAlign.Right.ToString());
     writer.RenderBeginTag(HtmlTextWriterTag.Td);
     if (base.WebPartManager.DisplayMode == WebPartManager.EditDisplayMode)
     {
         this.RenderVerbs(writer, webPart);
     }
     writer.RenderEndTag();
     writer.RenderEndTag();
     writer.RenderEndTag();
 }
开发者ID:t1b1c,项目名称:lwas,代码行数:26,代码来源:BaseChrome.cs


示例3: RenderWebPart

 public override void RenderWebPart(HtmlTextWriter writer, WebPart webPart)
 {
     if (webPart == null)
     {
         throw new ArgumentNullException("webPart");
     }
     base.Zone.PartChromeStyle.AddAttributesToRender(writer, base.Zone);
     writer.AddAttribute(HtmlTextWriterAttribute.Class, "divzone_part_chrome");
     writer.RenderBeginTag(HtmlTextWriterTag.Div);
     if (base.WebPartManager.DisplayMode == WebPartManager.EditDisplayMode || webPart.ChromeType != PartChromeType.None || !webPart.Hidden)
     {
         this.RenderTitleBar(writer, webPart);
     }
     base.Zone.PartStyle.AddAttributesToRender(writer, base.Zone);
     if (webPart.Hidden && !base.WebPartManager.DisplayMode.ShowHiddenWebParts)
     {
         writer.AddAttribute(HtmlTextWriterAttribute.Class, "divzone_part_hidden");
     }
     else
     {
         writer.AddAttribute(HtmlTextWriterAttribute.Class, "divzone_part");
     }
     writer.RenderBeginTag(HtmlTextWriterTag.Div);
     this.RenderPartContents(writer, webPart);
     writer.RenderEndTag();
     writer.RenderEndTag();
 }
开发者ID:t1b1c,项目名称:lwas,代码行数:27,代码来源:DivChrome.cs


示例4: RenderWebPart

 public override void RenderWebPart(HtmlTextWriter writer, WebPart webPart)
 {
     if (webPart == null)
     {
         throw new ArgumentNullException("webPart");
     }
     base.Zone.PartChromeStyle.AddAttributesToRender(writer, base.Zone);
     writer.AddAttribute(HtmlTextWriterAttribute.Cellspacing, "0");
     writer.AddAttribute(HtmlTextWriterAttribute.Cellpadding, "0");
     writer.AddAttribute(HtmlTextWriterAttribute.Border, "0");
     writer.AddStyleAttribute(HtmlTextWriterStyle.Width, "100%");
     if (webPart.Hidden && !base.WebPartManager.DisplayMode.ShowHiddenWebParts)
     {
         writer.AddStyleAttribute(HtmlTextWriterStyle.Display, "none");
     }
     writer.RenderBeginTag(HtmlTextWriterTag.Table);
     writer.RenderBeginTag(HtmlTextWriterTag.Tr);
     writer.RenderBeginTag(HtmlTextWriterTag.Td);
     if (base.WebPartManager.DisplayMode == WebPartManager.EditDisplayMode || webPart.ChromeType != PartChromeType.None)
     {
         this.RenderTitleBar(writer, webPart);
     }
     writer.RenderEndTag();
     writer.RenderEndTag();
     writer.RenderBeginTag(HtmlTextWriterTag.Tr);
     base.Zone.PartStyle.AddAttributesToRender(writer, base.Zone);
     writer.AddStyleAttribute(HtmlTextWriterStyle.Padding, base.Zone.PartChromePadding.ToString());
     writer.RenderBeginTag(HtmlTextWriterTag.Td);
     this.RenderPartContents(writer, webPart);
     writer.RenderEndTag();
     writer.RenderEndTag();
     writer.RenderEndTag();
 }
开发者ID:t1b1c,项目名称:lwas,代码行数:33,代码来源:BaseChrome.cs


示例5: GetWebPartDetails

        /// <summary>
        /// Gets the web part details.
        /// </summary>
        /// <param name="wp">The web part.</param>
        /// <param name="manager">The web part manager.</param>
        /// <returns></returns>
        internal static string GetWebPartDetails(WebPart wp, SPLimitedWebPartManager manager)
        {
            if (wp.ExportMode == WebPartExportMode.None)
            {
                Logger.WriteWarning("Unable to export {0}", wp.Title);
                return "";
            }
            StringBuilder sb = new StringBuilder();

            XmlTextWriter xmlWriter = new XmlTextWriter(new StringWriter(sb));
            xmlWriter.Formatting = Formatting.Indented;
            manager.ExportWebPart(wp, xmlWriter);
            xmlWriter.Flush();

            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.LoadXml(sb.ToString());

            XmlElement elem = xmlDoc.DocumentElement;
            if (xmlDoc.DocumentElement.Name == "webParts")
            {
                elem = (XmlElement)xmlDoc.DocumentElement.ChildNodes[0];

                // We've found a v3 web part but the export method does not export what the zone ID is so we
                // have to manually add that in.  Unfortunately the Zone property is always null because we are
                // using a SPLimitedWebPartManager so we have to use the helper method GetZoneID to set the zone ID.
                XmlElement property = xmlDoc.CreateElement("property");
                property.SetAttribute("name", "ZoneID");
                property.SetAttribute("type", "string");
                property.InnerText = manager.GetZoneID(wp);
                elem.ChildNodes[1].ChildNodes[0].AppendChild(property);
            }

            return elem.OuterXml.Replace(" xmlns=\"\"", ""); // Just some minor cleanup to deal with erroneous namespace tags added due to the zoneID being added manually.
        }
开发者ID:GSoft-SharePoint,项目名称:PowerShell-SPCmdlets,代码行数:40,代码来源:EnumPageWebParts.cs


示例6: WebPartConnectionsEventArgs

 public WebPartConnectionsEventArgs(WebPart provider, System.Web.UI.WebControls.WebParts.ProviderConnectionPoint providerConnectionPoint, WebPart consumer, System.Web.UI.WebControls.WebParts.ConsumerConnectionPoint consumerConnectionPoint)
 {
     this._provider = provider;
     this._providerConnectionPoint = providerConnectionPoint;
     this._consumer = consumer;
     this._consumerConnectionPoint = consumerConnectionPoint;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:WebPartConnectionsEventArgs.cs


示例7: WebPartConnectionsEventArgs

 public WebPartConnectionsEventArgs(WebPart provider, ProviderConnectionPoint providerConnectionPoint,
                                    WebPart consumer, ConsumerConnectionPoint consumerConnectionPoint) {
     // Arguments may be null, when deleting a connection because a part is no longer on the page
     _provider = provider;
     _providerConnectionPoint = providerConnectionPoint;
     _consumer = consumer;
     _consumerConnectionPoint = consumerConnectionPoint;
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:8,代码来源:WebPartConnectionsEventArgs.cs


示例8: ContainsProvider

 internal bool ContainsProvider(WebPart provider) {
     foreach (WebPartConnection connection in List) {
         if (connection.Provider == provider) {
             return true;
         }
     }
     return false;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:8,代码来源:WebPartConnectionCollection.cs


示例9: ConnectWebParts

    public virtual new WebPartConnection ConnectWebParts (WebPart provider, ProviderConnectionPoint providerConnectionPoint, WebPart consumer, ConsumerConnectionPoint consumerConnectionPoint, WebPartTransformer transformer)
    {
      Contract.Requires (provider != null);
      Contract.Requires (consumer != null);
      Contract.Requires (providerConnectionPoint != null);
      Contract.Requires (consumerConnectionPoint != null);

      return default(WebPartConnection);
    }
开发者ID:asvishnyakov,项目名称:CodeContracts,代码行数:9,代码来源:System.Web.UI.WebControls.WebParts.WebPartManager.cs


示例10: RenderWebPart

        public override void RenderWebPart(HtmlTextWriter writer, WebPart webPart)
        {
            var chromeType = this.Zone.GetEffectiveChromeType(webPart);
            AddPortletSkinCss(writer, webPart, chromeType.ToString().ToLower());
            writer.AddAttribute(HtmlTextWriterAttribute.Id, this.GetWebPartChromeClientID(webPart));
            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            var currentDisplayMode = this.WebPartManager.DisplayMode;

            if (currentDisplayMode == WebPartManager.EditDisplayMode || currentDisplayMode == WebPartManager.DesignDisplayMode)
            {
                RenderVerbs(writer, webPart);
            }

            if (chromeType == PartChromeType.TitleAndBorder || chromeType == PartChromeType.BorderOnly)
            {
                writer.AddAttribute(HtmlTextWriterAttribute.Class, "sn-pt-border ui-widget-content ui-corner-all");
                writer.RenderBeginTag(HtmlTextWriterTag.Div);
            }

            if ((chromeType == PartChromeType.TitleOnly) || (chromeType == PartChromeType.TitleAndBorder))
                RenderTitleBar(writer, webPart);

            if (chromeType == PartChromeType.TitleAndBorder || chromeType == PartChromeType.BorderOnly)
            {
                RenderPortletBodyBeginTag(writer);
            }
            else
            {
                writer.AddAttribute(HtmlTextWriterAttribute.Class, "sn-pt-body-borderless");
                writer.RenderBeginTag(HtmlTextWriterTag.Div);
            }

            RenderPartContents(writer, webPart);

            if (chromeType == PartChromeType.TitleAndBorder || chromeType == PartChromeType.BorderOnly)
            {
                RenderPortletBodyEndTag(writer);
            }
            else
            {
                writer.RenderEndTag(); // sn-pt-body-borderless
            }

            if (chromeType == PartChromeType.TitleAndBorder)
                RenderChromeFooter(writer);

            if (chromeType == PartChromeType.TitleAndBorder || chromeType == PartChromeType.BorderOnly)
                writer.RenderEndTag(); // sn-pt-border

            if (this.WebPartManager.DisplayMode == WebPartManager.DesignDisplayMode)
                RenderMaskTag(writer);

            writer.RenderEndTag();
        }
开发者ID:maxpavlov,项目名称:FlexNet,代码行数:55,代码来源:SNWebPartChrome.cs


示例11: GetWebPartDetailsMinimal

        /// <summary>
        /// Gets the web part details.
        /// </summary>
        /// <param name="wp">The web part.</param>
        /// <param name="manager">The web part manager.</param>
        internal static string GetWebPartDetailsMinimal(WebPart wp, SPLimitedWebPartManager manager)
        {
            XmlDocument xmlDoc = new XmlDocument();

            XmlElement wpXml = xmlDoc.CreateElement("WebPart");
            xmlDoc.AppendChild(wpXml);

            wpXml.SetAttribute("id", wp.ID);

            XmlElement prop = xmlDoc.CreateElement("Title");
            prop.InnerText = wp.Title;
            wpXml.AppendChild(prop);

            prop = xmlDoc.CreateElement("Description");
            prop.InnerText = wp.Description;
            wpXml.AppendChild(prop);

            prop = xmlDoc.CreateElement("DisplayTitle");
            prop.InnerText = wp.DisplayTitle;
            wpXml.AppendChild(prop);

            prop = xmlDoc.CreateElement("Hidden");
            prop.InnerText = wp.Hidden.ToString();
            wpXml.AppendChild(prop);

            prop = xmlDoc.CreateElement("IsClosed");
            prop.InnerText = wp.IsClosed.ToString();
            wpXml.AppendChild(prop);

            prop = xmlDoc.CreateElement("IsShared");
            prop.InnerText = wp.IsShared.ToString();
            wpXml.AppendChild(prop);

            prop = xmlDoc.CreateElement("IsStandalone");
            prop.InnerText = wp.IsStandalone.ToString();
            wpXml.AppendChild(prop);

            prop = xmlDoc.CreateElement("IsStatic");
            prop.InnerText = wp.IsStatic.ToString();
            wpXml.AppendChild(prop);

            prop = xmlDoc.CreateElement("Zone");
            if (wp.Zone != null)
                prop.InnerText = wp.Zone.ToString();
            else
                prop.InnerText = manager.GetZoneID(wp);
            wpXml.AppendChild(prop);

            prop = xmlDoc.CreateElement("ZoneIndex");
            prop.InnerText = wp.ZoneIndex.ToString();
            wpXml.AppendChild(prop);

            return Utilities.GetFormattedXml(xmlDoc);
        }
开发者ID:GSoft-SharePoint,项目名称:PowerShell-SPCmdlets,代码行数:59,代码来源:EnumPageWebParts.cs


示例12: ValidateWebPart

 protected void ValidateWebPart(WebPart webPart)
 {
     if (webPart == null)
     {
         throw new ArgumentNullException("webPart");
     }
     if (!this._webPartManager.WebParts.Contains(webPart))
     {
         throw new ArgumentException(System.Web.SR.GetString("UnknownWebPart"), "webPart");
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:11,代码来源:PersonalizationState.cs


示例13: ApplyPersonalizationState

 protected internal virtual void ApplyPersonalizationState(WebPart webPart)
 {
     if (webPart == null)
     {
         throw new ArgumentNullException("webPart");
     }
     if (this.IsEnabled)
     {
         this.EnsurePersonalizationState();
         this._personalizationState.ApplyWebPartPersonalization(webPart);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:12,代码来源:WebPartPersonalization.cs


示例14: ProcessWebpartProperties

        protected virtual void ProcessWebpartProperties(WebPart instance, WebPartDefinition definition)
        {
            if (definition.Width.HasValue)
                instance.Width = new Unit(definition.Width.Value);

            if (definition.Height.HasValue)
                instance.Height = new Unit(definition.Height.Value);

            if (!string.IsNullOrEmpty(definition.ChromeState))
                instance.ChromeState = (PartChromeState)Enum.Parse(typeof(PartChromeState), definition.ChromeState);

            if (!string.IsNullOrEmpty(definition.ChromeType))
            {
                var chromeType = WebPartChromeTypesConvertService.NormilizeValueToPartChromeTypes(definition.ChromeType);
                instance.ChromeType = (PartChromeType)Enum.Parse(typeof(PartChromeType), chromeType);
            }

            if (!string.IsNullOrEmpty(definition.ImportErrorMessage))
                instance.ImportErrorMessage = definition.ImportErrorMessage;

            if (!string.IsNullOrEmpty(definition.Description))
                instance.Description = definition.Description;

            if (!string.IsNullOrEmpty(definition.TitleIconImageUrl))
                instance.TitleIconImageUrl = definition.TitleIconImageUrl;

            if (!string.IsNullOrEmpty(definition.TitleUrl))
            {
                var urlValue = definition.TitleUrl ?? string.Empty;

                TraceService.VerboseFormat((int)LogEventId.ModelProvisionCoreCall, "Original value: [{0}]",
                    urlValue);

                urlValue = TokenReplacementService.ReplaceTokens(new TokenReplacementContext
                {
                    Value = urlValue,
                    Context = CurrentHost.HostFile.Web
                }).Value;

                TraceService.VerboseFormat((int)LogEventId.ModelProvisionCoreCall, "Token replaced value: [{0}]", urlValue);

                instance.TitleUrl = urlValue;
            }

            if (!string.IsNullOrEmpty(definition.ExportMode))
                instance.ExportMode = (WebPartExportMode)Enum.Parse(typeof(WebPartExportMode), definition.ExportMode);

            ProcessWebpartCustomProperties(instance, definition);
            ProcessParameterBindings(instance, definition);
        }
开发者ID:karayakar,项目名称:spmeta2,代码行数:50,代码来源:WebPartModelHandler.cs


示例15: ProcessWebpartProperties

        protected override void ProcessWebpartProperties(WebPart webpartInstance, WebPartDefinition definition)
        {
            base.ProcessWebpartProperties(webpartInstance, definition);

            var typedWebpart = webpartInstance.WithAssertAndCast<RefinementScriptWebPart>("webpartInstance", value => value.RequireNotNull());
            var typedModel = definition.WithAssertAndCast<RefinementScriptWebPartDefinition>("webpartModel", value => value.RequireNotNull());


            if (!string.IsNullOrEmpty(typedModel.SelectedRefinementControlsJson))
                typedWebpart.SelectedRefinementControlsJson = typedModel.SelectedRefinementControlsJson;

            if (!string.IsNullOrEmpty(typedModel.EmptyMessage))
                typedWebpart.EmptyMessage = typedModel.EmptyMessage;
        }
开发者ID:karayakar,项目名称:spmeta2,代码行数:14,代码来源:RefinementScriptWebPartModelHandler.cs


示例16: ProxyWebPart

 protected ProxyWebPart(WebPart webPart)
 {
     if (webPart == null)
     {
         throw new ArgumentNullException("webPart");
     }
     GenericWebPart part = webPart as GenericWebPart;
     if (part != null)
     {
         Type type;
         Control childControl = part.ChildControl;
         if (childControl == null)
         {
             throw new ArgumentException(System.Web.SR.GetString("PropertyCannotBeNull", new object[] { "ChildControl" }), "webPart");
         }
         this._originalID = childControl.ID;
         if (string.IsNullOrEmpty(this._originalID))
         {
             throw new ArgumentException(System.Web.SR.GetString("PropertyCannotBeNullOrEmptyString", new object[] { "ChildControl.ID" }), "webPart");
         }
         UserControl control2 = childControl as UserControl;
         if (control2 != null)
         {
             type = typeof(UserControl);
             this._originalPath = control2.AppRelativeVirtualPath;
         }
         else
         {
             type = childControl.GetType();
         }
         this._originalTypeName = WebPartUtil.SerializeType(type);
         this._genericWebPartID = part.ID;
         if (string.IsNullOrEmpty(this._genericWebPartID))
         {
             throw new ArgumentException(System.Web.SR.GetString("PropertyCannotBeNullOrEmptyString", new object[] { "ID" }), "webPart");
         }
         this.ID = this._genericWebPartID;
     }
     else
     {
         this._originalID = webPart.ID;
         if (string.IsNullOrEmpty(this._originalID))
         {
             throw new ArgumentException(System.Web.SR.GetString("PropertyCannotBeNullOrEmptyString", new object[] { "ID" }), "webPart");
         }
         this._originalTypeName = WebPartUtil.SerializeType(webPart.GetType());
         this.ID = this._originalID;
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:49,代码来源:ProxyWebPart.cs


示例17: AddDynamicWebPart

        public void AddDynamicWebPart(
            WebPart webPart,
            Microsoft.Web.Preview.UI.Controls.WebParts.WebPartZone webPartZone,
            int zoneIndex, bool isShared)
        {
            if (!this.WebParts.Contains(webPart))
            {
                Internals.SetZoneID(webPart, webPartZone.ID);
                Internals.SetIsShared(webPart, isShared);
                Internals.SetZoneIndex(webPart, zoneIndex);
                Internals.AddWebPart(webPart);
                this.SetPersonalizationDirty();

            }
        }
开发者ID:joedavis01,项目名称:mojoportal,代码行数:15,代码来源:mojoWebPartManager.cs


示例18: ProcessWebpartProperties

        protected virtual void ProcessWebpartProperties(WebPart instance, WebPartDefinition definition)
        {
            if (definition.Width.HasValue)
                instance.Width = new Unit(definition.Width.Value);

            if (definition.Height.HasValue)
                instance.Height = new Unit(definition.Height.Value);

            if (!string.IsNullOrEmpty(definition.ChromeState))
                instance.ChromeState = (PartChromeState)Enum.Parse(typeof(PartChromeState), definition.ChromeState);

            if (!string.IsNullOrEmpty(definition.ChromeType))
            {
                var chromeType = WebPartChromeTypesConvertService.NormilizeValueToPartChromeTypes(definition.ChromeType);
                instance.ChromeType = (PartChromeType)Enum.Parse(typeof(PartChromeType), chromeType);
            }

            if (!string.IsNullOrEmpty(definition.ImportErrorMessage))
                instance.ImportErrorMessage = definition.ImportErrorMessage;

            if (!string.IsNullOrEmpty(definition.Description))
                instance.Description = definition.Description;

            if (!string.IsNullOrEmpty(definition.TitleIconImageUrl))
                instance.TitleIconImageUrl = definition.TitleIconImageUrl;

            if (!string.IsNullOrEmpty(definition.TitleUrl))
                instance.TitleUrl = definition.TitleUrl;

            if (!string.IsNullOrEmpty(definition.ExportMode))
                instance.ExportMode = (WebPartExportMode)Enum.Parse(typeof(WebPartExportMode), definition.ExportMode);


            var dataFomWebPart = instance as DataFormWebPart;

            if (dataFomWebPart != null
                && definition.ParameterBindings != null
                && definition.ParameterBindings.Count > 0)
            {
                var parameterBinder = new WebPartParameterBindingsOptions();

                foreach (var binding in definition.ParameterBindings)
                    parameterBinder.AddParameterBinding(binding.Name, binding.Location);

                var parameterBindingValue = SecurityElement.Escape(parameterBinder.ParameterBinding);
                dataFomWebPart.ParameterBindings = parameterBindingValue;
            }
        }
开发者ID:Uolifry,项目名称:spmeta2,代码行数:48,代码来源:WebPartModelHandler.cs


示例19: ProcessWebpartProperties

        protected override void ProcessWebpartProperties(WebPart webpartInstance, WebPartDefinition webpartModel)
        {
            base.ProcessWebpartProperties(webpartInstance, webpartModel);

            var typedWebpart = webpartInstance.WithAssertAndCast<ResultScriptWebPart>("webpartInstance", value => value.RequireNotNull());
            var definition = webpartModel.WithAssertAndCast<ResultScriptWebPartDefinition>("webpartModel", value => value.RequireNotNull());

            if (!string.IsNullOrEmpty(definition.DataProviderJSON))
                typedWebpart.DataProviderJSON = definition.DataProviderJSON;

            if (!string.IsNullOrEmpty(definition.EmptyMessage))
                typedWebpart.EmptyMessage = definition.EmptyMessage;

            if (definition.ResultsPerPage.HasValue)
                typedWebpart.ResultsPerPage = definition.ResultsPerPage.Value;

            if (definition.ShowResultCount.HasValue)
                typedWebpart.ShowResultCount = definition.ShowResultCount.Value;
        }
开发者ID:karayakar,项目名称:spmeta2,代码行数:19,代码来源:ResultScriptWebPartModelHandler.cs


示例20: WebPartDescription

        public WebPartDescription(WebPart part) {
            string id = part.ID;
            if (String.IsNullOrEmpty(id)) {
                throw new ArgumentException(SR.GetString(SR.WebPartManager_NoWebPartID), "part");
            }

            _id = id;

            string displayTitle = part.DisplayTitle;
            _title = (displayTitle != null) ? displayTitle : String.Empty;

            string description = part.Description;
            _description = (description != null) ? description : String.Empty;

            string imageUrl = part.CatalogIconImageUrl;
            _imageUrl = (imageUrl != null) ? imageUrl : String.Empty;

            _part = part;
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:19,代码来源:WebPartDescription.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Controls.ItemCollection类代码示例发布时间:2022-05-26
下一篇:
C# WebControls.XmlDataSource类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap