Esempio n. 1
0
    void ListInsertUIList(string name, UIElement fatherobj, List <object> list, bool flag, int index)
    {
        int       nextindex   = index + 1;
        UIElement listelement = UIElementPool.Pop(name, flag, fatherobj, list, fatherobj.level + 1);

        uielement.Insert(index, listelement);
        for (int i = 0; i < list.Count; ++i)
        {
            if (list[i] is List <object> )
            {
                ListInsertUIList(i.ToString(), listelement, list[i] as List <object>, false, nextindex);
            }
            else if (list[i] is IDictionary <string, object> )
            {
                DicInsertUIList(i.ToString(), listelement, list[i] as IDictionary <string, object>, false, nextindex);
            }
            else
            {
                DotObjectInsertUIList(i.ToString(), listelement, list[i], nextindex);
            }
        }
    }
Esempio n. 2
0
    void ListToUIList(string name, UIElement fatherobj, List <object> list, bool flag, int level)
    {
        int       childlevel  = level + 1;
        UIElement listelement = UIElementPool.Pop(name, flag, fatherobj, list, level);

        uielement.Add(listelement);
        for (int i = 0; i < list.Count; ++i)
        {
            if (list[i] is List <object> )
            {
                ListToUIList(i.ToString(), listelement, list[i] as List <object>, false, childlevel);
            }
            else if (list[i] is IDictionary <string, object> )
            {
                DicToUIList(i.ToString(), listelement, list[i] as IDictionary <string, object>, false, childlevel);
            }
            else
            {
                DotObjectToUIList(i.ToString(), listelement, list[i], childlevel);
            }
        }
    }
Esempio n. 3
0
    void DicToUIList(string name, UIElement fatherobj, IDictionary <string, object> dic, bool flag, int level)
    {
        int       childlevel = level + 1;
        UIElement dictarget  = UIElementPool.Pop(name, flag, fatherobj, dic, level);

        uielement.Add(dictarget);

        foreach (var item in dic.Keys)
        {
            if (dic[item] is IDictionary <string, object> )
            {
                DicToUIList(item, dictarget, dic[item] as IDictionary <string, object>, false, childlevel);
            }
            else if (dic[item] is List <object> )
            {
                ListToUIList(item, dictarget, dic[item] as List <object>, false, childlevel);
            }
            else
            {
                DotObjectToUIList(item, dictarget, dic[item], childlevel);
            }
        }
    }
Esempio n. 4
0
    void DicInsertUIList(string name, UIElement fatherobj, IDictionary <string, object> dic, bool flag, int index)
    {
        int       childlevel = fatherobj.level + 1;
        int       nextindex  = index + 1;
        UIElement dictarget  = UIElementPool.Pop(name, flag, fatherobj, dic, childlevel);

        uielement.Insert(index, dictarget);

        foreach (var item in dic.Keys)
        {
            if (dic[item] is IDictionary <string, object> )
            {
                DicInsertUIList(item, dictarget, dic[item] as IDictionary <string, object>, false, nextindex);
            }
            else if (dic[item] is List <object> )
            {
                ListInsertUIList(item, dictarget, dic[item] as List <object>, false, nextindex);
            }
            else
            {
                DotObjectInsertUIList(item, dictarget, dic[item], nextindex);
            }
        }
    }
Esempio n. 5
0
 void DotObjectInsertUIList(string name, UIElement fatherobj, object obj, int index)
 {
     uielement.Insert(index, UIElementPool.Pop(name, false, fatherobj, obj, fatherobj.level + 1));
 }
Esempio n. 6
0
 void DotObjectToUIList(string name, UIElement fatherobj, object obj, int level)
 {
     uielement.Add(UIElementPool.Pop(name, false, fatherobj, obj, level));
 }