zoukankan      html  css  js  c++  java
  • [K/3Cloud] 如何在k3Cloud主页实现自定义页面的开发

    过自定义页签动态添加一些内容,比如网页链接、图片等。

    1.PNG 

    如果是动态的增加链接,可以参考一下代码,然后在ButtonClick事件里面对链接进行处理。

    public override void AfterBindData(EventArgs e)
            {
                base.AfterBindData(e);
                List<PortalInforationContract> showInfos = GetInfo()//从数据库中读出要动态显示的内容;
                if (showInfos == null)
                {
                    return;
                }
                int linkTop = 5;
                LayoutInfo layoutInfo = new LayoutInfo();
                foreach (PortalInforationContract faq in showInfos)
                {
                    LinkBtnAppearance newLink = new LinkBtnAppearance();  //新建链接
                    newLink.Key = faq.InfoID.ToString();
                    newLink.Caption = new LocaleValue(faq.Subject, this.Context.UserLocale.LCID);
                    newLink.Container = "FPanel";
                    newLink.Top = new LocaleValue(linkTop.ToString(), this.Context.UserLocale.LCID);
                    newLink.Left = new LocaleValue("20", this.Context.UserLocale.LCID);
                    newLink.Width[this.Context.UserLocale.LCID] = "220";
                    layoutInfo.Add(newLink);
                    linkTop += 20;
                }
                //得到要添加内容的面板
                Panel p = this.View.GetControl<Panel>("FPanel");
                //将动态内容逐条加到面板上
                p.AddControls(layoutInfo);
                
            }


  • 相关阅读:
    【angularJS】启动(bootstrap)机制
    【angularJS】定义模块angular.module
    【angularJS】简介
    .NET AutoMapper学习记录
    WebAPI学习
    【MongoDB】在C#中使用
    RabbitMQ介绍及windows下安装使用
    【MongoDB】初识
    php命名空间(nameSpace)的使用详解
    魔术方法
  • 原文地址:https://www.cnblogs.com/fyq891014/p/3308522.html
Copyright © 2011-2022 走看看