public UIImageTitleBottom(UIClick click, WebMeta data, String src) { this.data = data; this.data.Put("src", src); this.data.Put("click", click); this.Type = "ImageTitleBottom"; }
public UITitleMore Click(UIClick click) { this.data.Put("click", click); this.data.Put("more", '\uE905'); this.Style.Name("more", new UIStyle().Font("wdk").Size(12)); return(this); }
public UICMSLook(String src, UIClick click, WebMeta data) { this.data = data; this.data.Put("src", src); this.data.Put("click", click); this.Type = "CMSLook"; }
/// <summary> /// 创建单图或者大图资讯组件 /// </summary> /// <param name="click"></param> /// <param name="data"></param> /// <param name="src"></param> /// <param name="max">是否是大图</param> public UICMS(UIClick click, WebMeta data, String src, bool max) { this.data = data; this.data.Put("src", src); this.data.Put("click", click); this.Type = max ? "CMSMax" : "CMSOne"; }
public override void ProcessActivity(WebRequest webRequest, WebResponse webResponse) { String ssid = this.AsyncDialog("Id", "请输入ID"); var sId = UMC.Data.Utility.Guid(ssid, true); var entity = Database.Instance().ObjectEntity <Design_Item>(); entity.Where.And().Equal(new Design_Item() { Id = (sId) }); Design_Item baner = entity.Single(); UIClick c = UMC.Data.JSON.Deserialize <UIClick>(baner.Click) ?? new UIClick(); entity.Update(new Design_Item() { Click = UMC.Data.JSON.Serialize(this.Click(c)) }); this.Context.Send("Click", false); this.Prompt("关联成功"); }
public override void ProcessActivity(WebRequest request, WebResponse response) { var Key = this.AsyncDialog("Key", "WebResource"); var UI = this.AsyncDialog("UI", "none"); var Type = this.AsyncDialog("Type", gKey => { var seett = new Web.UISheetDialog(); seett.Title = "插入"; var click = new UIClick("UI", UI, "Key", "WebResource", "Type", "Image") { Command = request.Command, Model = request.Model }; click.Text = "插入图片"; seett.Options.Add(click); click = new UIClick("UI", UI, "Key", "WebResource", "Type", "Text") { Command = request.Command, Model = request.Model }; click.Text = "插入文字"; seett.Options.Add(click); return(seett); }); switch (Type) { case "Image": this.Context.Send(new UMC.Web.WebMeta().UIEvent(Key, UI, Image(request)), true); break; case "Text": this.Context.Send(new UMC.Web.WebMeta().UIEvent(Key, UI, Text()), true); break; } }
public static UIDiscount Create(UIClick click) { var t = Create(); t.data.Put("click", click); return(t); }
/// <summary> /// 创建单图资讯组件 /// </summary> /// <param name="click"></param> /// <param name="data"></param> /// <param name="src"></param> public UICMS(UIClick click, WebMeta data, String src) { this.data = data;// = new UICMS(data); this.data.Put("src", src); this.data.Put("click", click); this.Type = "CMSOne"; }
public static UICMS CreateMax(UIClick click, WebMeta data) { var t = new UICMS(data); t.data.Put("click", click); t.Type = "CMSMax"; return(t); }
public UIDiscount(UIClick click) { //var t = Create(); data = new WebMeta(); data.Put("click", click); this.Type = "Discount"; //return t; }
/// <summary> /// 创建三张图资讯组件 /// </summary> /// <param name="click"></param> /// <param name="data"></param> /// <param name="src1"></param> /// <param name="src2"></param> /// <param name="src3"></param> public UICMS(UIClick click, WebMeta data, String src1, String src2, String src3) { this.data = data; this.data.Put("click", click); this.Type = "CMSThree"; this.data.Put("images", new string[] { src1, src2, src3 }); }
public static UICMSLook Create(String src, UIClick click, WebMeta data) { var t = new UICMSLook(data); t.data.Put("src", src); t.data.Put("click", click); t.Type = "CMSLook"; return(t); }
public static UICMS CreateOne(UIClick click, WebMeta data, String src) { var t = new UICMS(data); t.data.Put("src", src); t.data.Put("click", click); t.Type = "CMSOne"; return(t); }
public static UIImageTitleBottom Create(UIClick click, WebMeta data, String src) { var t = new UIImageTitleBottom(data); t.data.Put("src", src); t.data.Put("click", click); t.Type = "ImageTitleBottom"; return(t); }
public static UICMS CreateThree(UIClick click, WebMeta data, params String[] src) { var t = new UICMS(data); t.data.Put("images", src); t.data.Put("click", click); t.Type = "CMSThree"; return(t); }
public UIIconNameDesc Button(string name, UIClick click, int color) { this.data.Put("button-click", click); this.data.Put("button", name); this.Style.Name("button").BgColor(color); if (color < 0x1000) { data.Put("button-color", String.Format("#{0:x3}", color)); } else { data.Put("button-color", String.Format("#{0:x6}", color)); } return(this); }
public override void ProcessActivity(WebRequest request, WebResponse response) { var list = new List <WebMeta>(); var stitle = "天天录"; UITitle title = new UITitle(stitle); var items = new List <UIClick>(); var entity = Data.Database.Instance().ObjectEntity <SearchKeyword>() .Where .And().In(new SearchKeyword { user_id = Guid.Empty }) .Entities.Order.Desc(new SearchKeyword { Time = 0 }).Entities; entity.Query(0, 20, dr => items.Add(new UIClick(new WebMeta().Put("cmd", "UI", "model", "Subject", "text", dr.Keyword)) { Key = "Search", Text = dr.Keyword })); if (items.Exists(g => String.Equals(g.Text, stitle, StringComparison.CurrentCultureIgnoreCase)) == false) { items.Insert(0, new UIClick(new WebMeta().Put("cmd", "UI", "model", "Subject", "text", stitle)) { Key = "Search", Text = stitle }); } title.Items(items.ToArray()); title.Name("icon", "\uea0e"); title.Right(new UIEventText().Icon('\uf2e1').Click(UIClick.Scanning())); list.Add(new WebMeta().Put("model", "Subject", "cmd", "UI", "text", "知识推荐").Put("RefreshEvent", "Subject.Save")); list.Add(new WebMeta().Put("model", "Subject", "cmd", "Follow", "text", "我的关注").Put("RefreshEvent", "Subject.Save")); list.Add(new WebMeta().Put("model", "Subject", "cmd", "Self", "text", "我的文档").Put("RefreshEvent", "Subject.Save")); response.Redirect(new WebMeta().Put("title", title).Put("sections", list)); }
public UIImageTitleBottom Click(UIClick click) { this.data.Put("click", click); return(this); }
public override void ProcessActivity(WebRequest request, WebResponse response) { Guid designId = UMC.Data.Utility.Guid(this.AsyncDialog("Id", g => this.DialogValue(Guid.Empty.ToString()))).Value;//this.DialogValue(response.Ticket[AttributeNames.TICKET_STORE_ID])), true).Value; if (_isEditer) { WebMeta form = request.SendValues ?? request.Arguments; this.AsyncDialog("Model", anycId => { if (form.ContainsKey("limit") == false) { this.Context.Send(new UISectionBuilder(request.Model, request.Command, new WebMeta().Put("Id", designId)) .RefreshEvent("Design", "image") .Builder(), true); } var entity = Database.Instance().ObjectEntity <Design_Item>(); entity.Where.And().Equal(new Design_Item { design_id = Guid.Empty, for_id = Guid.Empty }); entity.Order.Asc(new Design_Item { Seq = 0 }); //IObjectEntity<Design_Item> entity = Database.instance().objectEntity(Design_Item.class); // entity.where().and().equal(new Design_Item().Design_id(Utility.uuidEmpty).For_id(Utility.uuidEmpty)); // entity.order().asc(new Design_Item().Seq(0)); Design_Item[] headers = entity.Query(); UISection section = UISection.Create(new UITitle("UMC")); int limit = UMC.Data.Utility.Parse(form.Get("limit"), 10); int start = UMC.Data.Utility.Parse(form.Get("start"), 0); switch (headers.Length) { case 0: break; case 1: section.Title.Title = (headers[0].ItemName); // section.title().right('\ue907', new UIClick("Id", headers[0].Id.toString(), "Model", "none").model(request.model(), request.cmd())); break; default: if (start == 0) { List <WebMeta> items = new List <WebMeta>(); foreach (Design_Item item in headers) { items.Add(new UMC.Web.WebMeta().Put("text", item.ItemName).Put("search", new WebMeta().Put("Id", item.Id))); } section.Add(UICell.Create("TabFixed", new UMC.Web.WebMeta().Put("items", items))); } break; } if (designId == Guid.Empty) { switch (headers.Length) { case 0: break; default: new UIDesigner(true).Section(section, headers[0].Id.Value); break; } } else { new UIDesigner(true).Section(section, designId); } if (section.Length == 0) { section.Add("Desc", new UMC.Web.WebMeta().Put("desc", "未有设计分类项,请添加").Put("icon", "\uEA05") , new UMC.Web.WebMeta().Put("desc", "{icon}\n{desc}"), new UIStyle().Align(1).Color(0xaaa).Padding(20, 20).BgColor(0xfff).Size(12).Name("icon", new UIStyle().Font("wdk").Size(60))); } UIFooter footer = new UIFooter(); footer.IsFixed = true;// e); switch (headers.Length) { case 0: footer.AddText(new UIEventText("添加分类项").Click(new UIClick("Model", "News", "Type", "Append").Send(request.Model, request.Command))); break; default: Guid did = designId; if (designId == Guid.Empty) { did = headers[0].Id.Value; } footer.AddIcon(new UIEventText("分类项").Icon('\uf009').Click(new UIClick("Model", "News", "Id", did.ToString()).Send(request.Model, request.Command))); footer.AddText(new UIEventText("增加UI组件").Click(new UIClick(did.ToString()).Send("Design", "Item"))); footer.AddText(new UIEventText("查看效果").Style(new UIStyle().BgColor(0xef4f4f)) .Click(new UIClick("Model", "News", "Type", "View").Send(request.Model, request.Command))); break; } section.UIFooter = (footer); response.Redirect(section); return(this.DialogValue("none")); }); String type = this.AsyncDialog("Type", g => { UIRadioDialog di = new UIRadioDialog(); di.Title = ("页面设计"); di.Options.Put("编辑分类项", "Edit"); di.Options.Put("增加分类项", "Append"); di.Options.Put("删除此分类", "Delete"); return(di); }); switch (type) { case "Edit": Design(request, designId); break; case "Append": Design(request, Guid.NewGuid()); //.randomUUID()); break; case "Delete": Delete(designId); break; case "View": if (request.IsApp) { List <WebMeta> tabs = new List <WebMeta>(); Database.Instance().ObjectEntity <Design_Item>() .Where.And().Equal(new Design_Item() { design_id = Guid.Empty, for_id = Guid.Empty }) //(Utility.uuidEmpty).For_id(Utility.uuidEmpty)) .Entities.Order.Asc(new Design_Item() { Seq = 0 }) .Entities.Query(dr => { tabs.Add(new UMC.Web.WebMeta().Put("text", dr.ItemName).Put("search", new UMC.Web.WebMeta().Put("Id", dr.Id.ToString())).Put("cmd", "Home", "model", "Design")); }); if (tabs.Count == 1) { UISectionBuilder builder = new UISectionBuilder("Design", "Home", new WebMeta().Put("Id", tabs[0].GetMeta("search").Get("Id"))); // builder.builder() this.Context.Send(builder.Builder(), true); //"Tab", new WebMeta().put("sections", tabs).put("text", "UMC界面设计"), true); } else { this.Context.Send("Tab", new WebMeta().Put("sections", tabs).Put("text", "UMC界面设计"), true); } } else { this.AsyncDialog("From", k => { UIFormDialog fm = new UMC.Web.UIFormDialog(); fm.Title = ("移动效果体验"); fm.AddImage(new Uri(UMC.Data.Utility.QRUrl("https://oss.365lu.cn/Click/Deisgn/Home/"))); fm.AddPrompt("请用支持UMC协议的APP“扫一扫”。"); return(fm); }); break; } break; } } else { if (designId == Guid.Empty) { var entity = Database.Instance().ObjectEntity <Design_Item>(); entity.Where.And().Equal(new Design_Item { design_id = Guid.Empty, for_id = Guid.Empty }); entity.Order.Asc(new Design_Item { Seq = 0 }); List <WebMeta> tabs = new List <WebMeta>(); entity.Query(dr => { tabs.Add(new UMC.Web.WebMeta().Put("text", dr.ItemName).Put("search", new UMC.Web.WebMeta().Put("Id", dr.Id)).Put("cmd", "UI", "model", "Design")); }); var chash = new Hashtable(); UITitle title = new UITitle("UMC移动界面"); title.Left('\uea0e', UIClick.Search()); title.Right(new UIEventText().Icon('\uf2c0').Click(new UIClick().Send("Account", "Info"))); chash.Add("sections", tabs); chash.Add("title", title); response.Redirect(chash); } else { UIDesigner designer = new UIDesigner(false); response.Redirect(designer.Section("", designId)); } } }
/// <summary> /// 创建无图资讯组件 /// </summary> /// <param name="click"></param> /// <param name="data"></param> public UICMS(UIClick click, WebMeta data) { this.data = data; this.data.Put("click", click); this.Type = "CMSMax"; }
/// <summary> /// 创建大图资讯组件,并支持视频 /// </summary> /// <param name="data"></param> /// <param name="click"></param> /// <param name="videoSrc"></param> /// <param name="src"></param> public UICMS(WebMeta data, UIClick click, Uri videoSrc, String src) { this.data = data.Put("click", click).Put("src", src).Put("video-src", videoSrc); this.Type = "CMSMax"; }
public UIImageTextDescTime Click(UIClick click) { this.data.Put("click", click); return(this); }
public UIItemText Click(UIClick click) { data.Put("click", click); return(this); }
public UINineImage Click(UIClick click) { this.data.Put("click", click);//.Put("src", src)); return(this); }
public UINineImage Add(UIClick click, String src) { this.items.Add(new WebMeta().Put("click", click).Put("src", src)); return(this); }
public override void ProcessActivity(WebRequest request, WebResponse response) { var identity = UMC.Security.Identity.Current; var userId = identity.Id; var form = (request.SendValues ?? new UMC.Web.WebMeta()).GetDictionary(); var webr = UMC.Data.WebResource.Instance(); if (form.ContainsKey("limit") == false) { var buider = new UISectionBuilder(request.Model, request.Command, request.Arguments); this.Context.Send(buider.Builder(), true); } var logoUrl = webr.ResolveUrl(userId.Value, "1", 4); var members = identity.IsAuthenticated ? Utility.CMS.ObjectEntity <UMC.Data.Entities.ProjectMember>() .Where.And().Equal(new Data.Entities.ProjectMember { user_id = userId }) .Entities.Count() : 0; var suject = identity.IsAuthenticated ? Utility.CMS.ObjectEntity <Subject>() .Where.And().Equal(new Subject { user_id = userId }) .Entities.GroupBy().Sum(new Subject { Reply = 0 }) .Sum(new Subject { Look = 0 }).Count(new Subject { Seq = 0 }).Single() : new Subject() { Seq = 0, Reply = 0, Look = 0 }; if (identity.IsAuthenticated) { members += Utility.CMS.ObjectEntity <UMC.Data.Entities.Project>() .Where.And().Equal(new Data.Entities.Project { user_id = userId }) .Entities.Count(); } var Discount = new UIHeader.Portrait(identity.IsAuthenticated ? logoUrl : "https://oss.365lu.cn/css/images/header_image.png"); ; var user = identity; Discount.Value(user.IsAuthenticated ? user.Alias : "请登录"); Discount.Click(new UIClick().Send("Account", "Self")); if (user.IsAuthenticated) { var sign = Data.Database.Instance().ObjectEntity <Data.Entities.Account>() .Where.And().Equal(new Data.Entities.Account { user_id = userId, Type = Security.Account.SIGNATURE_ACCOUNT_KEY }).Entities.Single(); //if (sign != null) Discount.Time(sign != null ? sign.Name : " ");// user.ActiveTime.ToString()); } else { Discount.Time(" "); } var color = 0x63b359; Discount.Gradient(color, color); var header = new UIHeader(); var title = UITitle.Create(); title.Title = "我的"; header.AddPortrait(Discount); title.Style.BgColor(color); title.Style.Color(0xfff); var ui = UISection.Create(header, title); var uIIcon = new UIIconNameDesc(new UIIconNameDesc.Item('\uF19d', "参与项目", members + "项").Color(0x40c9c6)); if (user.IsAuthenticated) { uIIcon.Button("查看", UIClick.Pager("Subject", "Account", new WebMeta().Put("selectIndex", 1)), 0x1890ff); } else { uIIcon.Button("请登录", new UIClick().Send("Account", "Login"), 0xb7babb); } ui.Add(uIIcon); uIIcon = new UIIconNameDesc(new UIIconNameDesc.Item('\uF02d', "知识创作", suject.Seq + "篇").Color(0x36a3f7), new UIIconNameDesc.Item('\uf0e6', "被评论", suject.Reply + "次").Color(0x34bfa3)); //new UIIconNameDesc.Item('\uf06e', "被浏览", suject.Look + "次").Color(0xf4516c), ui.Add(uIIcon); ui.NewSection() .AddCell('\uf198', "新建文档", "采用Markdown格式编写", new Web.UIClick("Markdown").Send("Subject", "Content")) .AddCell('\uf13b', "新建富文本文档", "采用富文本格式编写", new Web.UIClick("News").Send("Subject", "Content")) .AddCell('\uf0c5', "抓取文档", "从粘贴板版网址中抓取文档", new Web.UIClick() { Key = "CaseCMS" }); ui.NewSection().AddCell('\uf2e1', "扫一扫", "", new Web.UIClick() { Key = "Scanning" }); ui.NewSection() //.AddCell('\uf19c', "切换企业", "", Web.UIClick.Pager("Platform", "Corp", true)) .AddCell('\uf013', "设置", "", Web.UIClick.Pager("UI", "Setting", true, "Close")); response.Redirect(ui); }
public UISlider Add(UIClick click) { this.items.Add(new WebMeta().Put("click", click));//.Put("src", src)); return(this); }
public Item Click(UIClick click) { meta.Put("click", click); return(this); }
public UITabFixed Add(UIClick click) { items.Add(click); return(this); }
/// <summary> /// 数据增加事件 /// </summary> /// <param name="click"></param> /// <returns></returns> public UIImageTextDescQuantity IncreaseClick(UIClick click) { this.data.Put("increase-click", click); return(this); }