Exemplo n.º 1
0
        /// <summary>
        /// 获取线条
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="cache"></param>
        /// <param name="lm"></param>
        /// <returns></returns>
        public static string GetLine(dyk.Format.JsonObject obj, dyk.Format.Json cache, dyk.Format.Limits lm)
        {
            string res = "";

            res = "<div style=\"position:absolute;";
            if (obj["Left"].Value != "")
            {
                res += "left:" + Ly.String.Source(obj["Left"].Value).toInteger + "px;";
            }
            if (obj["Top"].Value != "")
            {
                res += "top:" + Ly.String.Source(obj["Top"].Value).toInteger + "px;";
            }
            if (obj["Width"].Value != "")
            {
                res += "width:" + Ly.String.Source(obj["Width"].Value).toInteger + "px;";
            }
            if (obj["Height"].Value != "")
            {
                res += "height:" + Ly.String.Source(obj["Height"].Value).toInteger + "px;";
            }
            res += "background:" + obj["Color"].Value + ";";
            res += "\"></div>";

            return(res);
        }
Exemplo n.º 2
0
 public Values(string name)
 {
     //
     // TODO: 在此处添加构造函数逻辑
     //
     gszName = name;
     //gszValue = "";
     gJson = new Format.Json();
 }
Exemplo n.º 3
0
 public void SetAjaxScript(String TarID, String Url, dyk.Format.Json Arg)
 {
     base["Ajax"].IsArray = true;
     dyk.Format.JsonObject obj = base["Ajax"].AppendChild("");
     obj["Arg"].InnerJson = Arg.OuterJson;
     obj["Type"].Value    = "Script";
     obj["ID"].Value      = "";
     obj["TarID"].Value   = TarID;
     obj["Url"].Value     = Url;
     obj["Status"].Value  = "";
 }
Exemplo n.º 4
0
 public void SetAjaxLoad(String Id, String Url, dyk.Format.Json Arg, string Status)
 {
     base["Ajax"].IsArray = true;
     dyk.Format.JsonObject obj = base["Ajax"].AppendChild("");
     obj["Arg"].InnerJson = Arg.OuterJson;
     obj["Type"].Value    = "Load";
     obj["ID"].Value      = Id;
     obj["TarID"].Value   = "";
     obj["Url"].Value     = Url;
     obj["Status"].Value  = Status;
 }
Exemplo n.º 5
0
 public DsLibrary(ClsPage owner, string connstr, dyk.Format.Json json)
 {
     //
     // TODO: 在此处添加构造函数逻辑
     //
     gTab          = new Ly.DB.Dream.Tables(connstr);
     gnTable       = 0;
     gbTable       = false;
     gParent       = owner;
     gJson         = json;
     gszConnString = connstr;
 }
Exemplo n.º 6
0
        public Manager(ClsAjaxPage pg, string json)
        {
            //
            // TODO: 在此处添加构造函数逻辑
            //

            gPage = pg;

            //建立json对象
            gJson  = new Format.Json(json);
            gCache = new Format.Json();

            UIInit();
        }
Exemplo n.º 7
0
        /// <summary>
        /// 获取标签
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="cache"></param>
        /// <param name="lm"></param>
        /// <returns></returns>
        public static string GetLabel(dyk.Format.JsonObject obj, dyk.Format.Json cache, dyk.Format.Limits lm)
        {
            string res = "";

            string szID   = obj["ID"].Value;
            string szText = obj["Text"].Value;

            if (szID != "")
            {
                int nIDIndex = cache.GetIndex(szID);
                if (nIDIndex >= 0)
                {
                    szText = cache.Children[nIDIndex].Value;
                }
            }

            res = "<div style=\"position:absolute;";
            if (obj["Left"].Value != "")
            {
                res += "left:" + Ly.String.Source(obj["Left"].Value).toInteger + "px;";
            }
            if (obj["Top"].Value != "")
            {
                res += "top:" + Ly.String.Source(obj["Top"].Value).toInteger + "px;";
            }
            if (obj["Width"].Value != "")
            {
                res += "width:" + Ly.String.Source(obj["Width"].Value).toInteger + "px;";
            }
            if (obj["Height"].Value != "")
            {
                res += "height:" + Ly.String.Source(obj["Height"].Value).toInteger + "px;";
            }
            if (obj["Align"].Value != "")
            {
                res += "text-align:" + obj["Align"].Value + ";";
            }
            res += obj["Style"].Value;
            res += "\">" + szText + "</div>";

            return(res);
        }
Exemplo n.º 8
0
 public void SetAjaxUI(String ID, String TarID, String Title, String Path, String Page, dyk.Format.Json Arg)
 {
     base["Ajax"].IsArray = true;
     dyk.Format.JsonObject obj = base["Ajax"].AppendChild("");
     obj["Arg"].InnerJson = Arg.OuterJson;
     obj["Type"].Value    = "UI";
     obj["ID"].Value      = ID;
     obj["TarID"].Value   = TarID;
     obj["Title"].Value   = Title;
     obj["Path"].Value    = Path;
     obj["Page"].Value    = Page;
     //Page.UI.Open(Obj.Ajax[i].ID, Obj.Ajax[i].TarID, Obj.Ajax[i].Title, Obj.Ajax[i].Path, Obj.Ajax[i].Page, Obj.Ajax[i].Arg);
 }
Exemplo n.º 9
0
 public void SetAjaxLoad(String Id, String Url, dyk.Format.Json Arg)
 {
     SetAjaxLoad(Id, Url, Arg, "");
 }
Exemplo n.º 10
0
 public Values(string name, string value)
 {
     gszName = name;
     gJson   = new Format.Json(value);
 }