コード例 #1
0
ファイル: NCarouselListEditor.cs プロジェクト: amraa/eXpand
 string GetDisplayText(INCarouselItem pictureItem)
 {
     string text = ShownProperties.Aggregate("", (current, property) => current + (ObjectTypeInfo.FindMember(property).GetValue(pictureItem) + "<br>"));
     return text.TrimEnd("<br>".ToCharArray());
 }
コード例 #2
0
ファイル: NCarouselListEditor.cs プロジェクト: amraa/eXpand
 Uri GetUrl(INCarouselItem pictureItem) {
     var url = pictureItem.Image!= null? HttpContext.Current.Request.Url.AbsoluteUri + "&imageid=" + pictureItem.ID:pictureItem.ImagePath;
     if (!(string.IsNullOrEmpty(url))) 
         return new Uri(url);
     DictionaryNode ncarouselNode = Model.Node.FindChildNode(NCarouselWebModule.NCarouselAttributeName);
     if (ncarouselNode.GetAttributeBoolValue(NCarouselWebModule.UseNoImageAttributeName, true)){
         var webResourceUrl = ClientScriptProxy.Current.GetWebResourceUrl(control, GetType(), "NCarousel.Web.Resources.noimage.jpg");
         webResourceUrl =HttpContext.Current.Request.Url.AbsoluteUri.Replace(HttpContext.Current.Request.Url.PathAndQuery, "") +webResourceUrl;
         return new Uri(webResourceUrl);
     }
     return null;
 }