예제 #1
0
        public static UIButton BSSArea(Subject su2bs, String model, bool isApp)
        {
            var best = new UIEventText('\uf087', su2bs.Favs > 0 ? String.Format("({0})", su2bs.Favs) : "赞").Format("{icon}{text}")
                       .Style(new UIStyle().Radius(20).BorderColor(0x999).Color(0x999).Name("icon", new UIStyle().Font("wdk")).Size(16));

            best.Click(Web.UIClick.Click(new UIClick("Key", su2bs.Id.ToString())
            {
                Model = model, Command = "Best"
            }));
            var footer = new UIButton();

            footer.Style.AlignCenter().Height(40).Padding(10, 20).Name("min-width", 80);//.Radius(20);
            if (su2bs.IsComment == false)
            {
                if (isApp)
                {
                    footer.Button(best,
                                  new UIEventText("分享").Style(new UIStyle().Radius(20).Color(0x999).BorderColor(0x999).Size(16))
                                  .Click(Web.UIClick.Click(new UIClick(su2bs.Id.ToString())
                    {
                        Model = model, Command = "Share"
                    })));
                }
                else
                {
                    footer.Button(best);
                }
            }
            else
            {
                if (isApp)
                {
                    footer.Button(best, new UIEventText("评论").Style(new UIStyle().Radius(20).Color(0x999).BorderColor(0x999).Size(16))
                                  .Click(Web.UIClick.Click(new UIClick("Refer", su2bs.Id.ToString())
                    {
                        Model = model, Command = "Comment"
                    })),
                                  new UIEventText("分享").Style(new UIStyle().Radius(20).Color(0x999).BorderColor(0x999).Size(16))
                                  .Click(Web.UIClick.Click(new UIClick(su2bs.Id.ToString())
                    {
                        Model = model, Command = "Share"
                    })));
                }
                else
                {
                    footer.Button(best, new UIEventText("评论").Style(new UIStyle().Radius(20).Color(0x999).BorderColor(0x999).Size(16))
                                  .Click(Web.UIClick.Click(new UIClick("Refer", su2bs.Id.ToString())
                    {
                        Model = model, Command = "Comment"
                    })));
                }
            }
            return(footer);
        }
예제 #2
0
        void Icons(Guid parentId, List <Design_Item> baners, UISection U)
        {
            List <UIEventText> list = new List <UIEventText>();

            UMC.Data.WebResource webr = UMC.Data.WebResource.Instance();
            foreach (Design_Item b in baners)
            {
                UIEventText slider = new UIEventText(b.ItemName);
                if (String.IsNullOrEmpty(b.Data) == false)
                {
                    WebMeta s = UMC.Data.JSON.Deserialize <WebMeta>(b.Data);

                    slider.Icon(s.Get("icon"), s.Get("color"));
                }
                else
                {
                    slider.Src(webr.ImageResolve(b.Id.Value, "1", 4) + "?" + TimeSpan(b.ModifiedDate));
                }
                slider.Click(this.Click(b));

                list.Add(slider);
            }
            if (list.Count > 0)
            {
                var ic = new UMC.Web.UI.UIIcon();
                ic.Style.Name("icon", new UIStyle().Font("wdk").Size(24));

                ic.Add(list.ToArray());
                //U.AddIcon(new UIStyle().Name("icon", new UIStyle().Font("wdk").Size(24)), list.ToArray());
            }
            else if (_editer)
            {
                UIDesc desc = new UIDesc("\ue907");
                desc.Desc("{desc}\r\n配置图标栏");
                desc.Click(new UIClick(parentId.ToString())
                           .Send("Design", "Item"));

                desc.Style.AlignCenter().Name("desc", new UIStyle().Font("wdk").Size(38));
                U.Add(desc);
            }
        }
예제 #3
0
 public UITextItems Add(UIEventText item)
 {
     this.items.Add(item);
     return(this);
 }
예제 #4
0
 public UIComment Tag(UIEventText tag)
 {
     this.data.Put("tag", tag);
     return(this);
 }