Esempio n. 1
0
        private void SetTreeValue(string str_res, int i_pos)
        {
            string str   = str_res;
            Guid   empty = Guid.Empty;
            string str2  = "";

            char[]   separator = "}".ToCharArray();
            string[] strArray  = null;
            new ArrayList();
            DEBoxObject obj2 = (DEBoxObject)this.al_all[i_pos];

            if (str_res != null)
            {
                strArray = str.Split(separator);
            }
            if (obj2.IsReflex || (obj2.FilterType != 0))
            {
                string g = strArray[0].ToString().Substring(1, strArray[0].ToString().Length - 1);
                empty = new Guid(g);
                str2  = strArray[1].ToString().Substring(1, strArray[1].ToString().Length - 1);
                this.utEditor[i_pos].Text = str2;
                if (obj2.FilterType == 1)
                {
                    this.FilterControl(empty, obj2, i_pos);
                }
                if (obj2.IsReflex)
                {
                    this.ReflexControl(empty, obj2, i_pos);
                }
            }
        }
Esempio n. 2
0
        private void ActiveDropDownUC(UltraTextEditor txtEditor, string str_clsname, bool b_isTree, int i_pos)
        {
            DEMetaAttribute metaAttr = new DEMetaAttribute();
            DEBoxObject     obj2     = (DEBoxObject)this.al_all[i_pos];

            metaAttr = (DEMetaAttribute)obj2.MetaObject;
            if (b_isTree)
            {
                ArrayList list  = new ArrayList();
                Guid      empty = Guid.Empty;
                list.Add(empty);
                string refTableName = this.GetRefTableName(obj2, i_pos);
                list.Add(refTableName);
                DEMetaClass class2 = ModelContext.MetaModel.GetClass(metaAttr.LinkedResClass);
                list.Add(class2.Name);
                UCResTree tree = new UCResTree(list, i_pos);
                this.al_control.Add(tree);
                DropDownEditorButton button = txtEditor.ButtonsRight["SelectRes"] as DropDownEditorButton;
                button.Control    = tree;
                this.handler      = new SelectResHandler(this.ucUser_ResSelected);
                tree.ResSelected += this.handler;
            }
            else
            {
                this.ucUser = new UCResGrid(str_clsname, metaAttr, i_pos);
                this.al_control.Add(this.ucUser);
                DropDownEditorButton button2 = txtEditor.ButtonsRight["SelectRes"] as DropDownEditorButton;
                button2.Control          = this.ucUser;
                this.handler             = new SelectResHandler(this.ucUser_ResSelected);
                this.ucUser.ResSelected += this.handler;
            }
        }
Esempio n. 3
0
 private void InitControl(DEBoxObject o_box, int i_len, int i_jg, bool b_isdrwaline)
 {
     this.utEditor[i_jg]             = new UltraTextEditor();
     this.utEditor[i_jg].BorderStyle = UIElementBorderStyle.None;
     this.utEditor[i_jg].Location    = new Point(i_len + (4 * i_jg), 0);
     this.utEditor[i_jg].Text        = o_box.CONVALUE.ToString();
     this.utEditor[i_jg].Size        = new Size(o_box.Width, 0x15);
     this.utEditor[i_jg].Appearance.FontData.SizeInPoints = o_box.Height - 4;
     this.utEditor[i_jg].SupportThemes = false;
     new ArrayList();
     if (o_box.ControlType.Equals("UltraTextBox"))
     {
         DEMetaAttribute metaObject = (DEMetaAttribute)o_box.MetaObject;
         DEMetaClass     class2     = ModelContext.MetaModel.GetClass(metaObject.LinkedResClass);
         this.DrawDropDownTBtn(this.utEditor[i_jg], class2.Name, i_jg);
     }
     else
     {
         this.al_control.Add(this.utEditor[i_jg]);
     }
     base.Controls.Add(this.utEditor[i_jg]);
     if (b_isdrwaline)
     {
         this.DrawLine(((i_len + o_box.Width) + (4 * i_jg)) + 1, 0, 2, base.Height);
     }
 }
Esempio n. 4
0
        private void FilterControl(Guid g_mid, DEBoxObject o_box, int i_pos)
        {
            string filterPos = "";

            if (o_box.FilterType == 1)
            {
                filterPos = o_box.FilterPos;
                if (filterPos.Trim().Length > 0)
                {
                    ArrayList posValue = new ArrayList();
                    posValue = this.GetPosValue(filterPos);
                    for (int i = 0; i < posValue.Count; i++)
                    {
                        int         num2 = (int)posValue[i];
                        DEBoxObject obj2 = (DEBoxObject)this.al_all[num2];
                        if (obj2.ShowType == "UCGrid")
                        {
                            DEMetaAttribute metaObject         = (DEMetaAttribute)o_box.MetaObject;
                            DEMetaClass     class2             = ModelContext.MetaModel.GetClass(metaObject.LinkedResClass);
                            UCResGrid       grid               = (UCResGrid)this.al_control[num2];
                            string          filterRefTableName = this.GetFilterRefTableName(o_box, num2);
                            grid.ReLoad(g_mid, class2.Name, filterRefTableName, false);
                        }
                    }
                }
            }
        }
Esempio n. 5
0
        private void SetConAttrShowPos()
        {
            ArrayList list = new ArrayList();

            list = this.LoadConAttrLst();
            if (list.Count != 0)
            {
                for (int i = 0; i < list.Count; i++)
                {
                    ArrayList list2       = (ArrayList)list[i];
                    string    combination = "";
                    string    str2        = "";
                    foreach (Guid guid in list2)
                    {
                        for (int j = 0; j < this.al_all.Count; j++)
                        {
                            DEBoxObject obj2 = (DEBoxObject)this.al_all[j];
                            if (obj2.ControlType != "TextEditPLM")
                            {
                                DEMetaAttribute metaObject = (DEMetaAttribute)obj2.MetaObject;
                                if (metaObject.Oid == guid)
                                {
                                    if (str2.Length == 0)
                                    {
                                        str2        = j.ToString();
                                        combination = metaObject.Combination;
                                    }
                                    else
                                    {
                                        str2        = str2 + "," + j.ToString();
                                        combination = combination + metaObject.Combination;
                                    }
                                }
                            }
                        }
                    }
                    foreach (Guid guid2 in list2)
                    {
                        foreach (DEBoxObject obj3 in this.al_all)
                        {
                            if (obj3.ControlType != "TextEditPLM")
                            {
                                DEMetaAttribute attribute2 = (DEMetaAttribute)obj3.MetaObject;
                                if (attribute2.Oid == guid2)
                                {
                                    attribute2.Combination = combination;
                                    obj3.MetaObject        = attribute2;
                                    obj3.ConAttrShowPos    = str2;
                                    obj3.IsConAttrType     = true;
                                }
                            }
                        }
                    }
                }
            }
        }
Esempio n. 6
0
 private void SetConAttrObject(ArrayList al_capos, string str_filterpos, string str_filterval, string str_filterrefex)
 {
     foreach (string str in al_capos)
     {
         if (Convert.ToInt32(str) < this.al_all.Count)
         {
             DEBoxObject obj2 = (DEBoxObject)this.al_all[Convert.ToInt32(str)];
             obj2.FilterType        = 1;
             obj2.FilterAttribue    = str_filterrefex;
             obj2.FilterPos         = str_filterpos;
             obj2.RelationTableName = str_filterval;
             this.SetReflexAttr(str_filterrefex, str_filterpos);
         }
     }
 }
Esempio n. 7
0
        private void SetGridValue(string str_res, int i_pos)
        {
            Guid      empty          = Guid.Empty;
            ArrayList list           = new ArrayList();
            string    conAttrShowPos = "";

            char[]   separator = "}".ToCharArray();
            string[] strArray  = null;
            if ((base.Tag == null) && (str_res != null))
            {
                strArray = str_res.Split(separator);
            }
            DEBoxObject obj2 = (DEBoxObject)this.al_all[i_pos];

            conAttrShowPos = obj2.ConAttrShowPos;
            if (conAttrShowPos.Trim().Length > 0)
            {
                ArrayList posValue = new ArrayList();
                posValue = this.GetPosValue(conAttrShowPos);
                for (int i = 0; i < posValue.Count; i++)
                {
                    list.Add(strArray[i].ToString().Substring(1, strArray[i].ToString().Length - 1));
                }
                for (int j = 0; j < posValue.Count; j++)
                {
                    int index = (int)posValue[j];
                    this.utEditor[index].Text = list[j].ToString();
                }
                if (obj2.IsReflex || (obj2.FilterType != 0))
                {
                    string          g          = strArray[posValue.Count].ToString().Substring(1, strArray[posValue.Count].ToString().Length - 1);
                    Guid            iterOid    = new Guid(g);
                    DEMetaAttribute metaObject = (DEMetaAttribute)obj2.MetaObject;
                    DEMetaClass     class2     = ModelContext.MetaModel.GetClass(metaObject.LinkedResClass);
                    Guid            curView    = ClientData.UserGlobalOption.CurView;
                    DEBusinessItem  item       = (DEBusinessItem)PLItem.Agent.GetBizItemByIteration(iterOid, class2.Name, curView, ClientData.LogonUser.Oid, BizItemMode.BizItem);
                    empty = item.MasterOid;
                    if (obj2.FilterType == 1)
                    {
                        this.FilterControl(empty, obj2, i_pos);
                    }
                    if (obj2.IsReflex)
                    {
                        this.ReflexControl(empty, obj2, i_pos);
                    }
                }
            }
        }
Esempio n. 8
0
        private string GetRefTableName(DEBoxObject o_box, int i_pos)
        {
            string    str2        = i_pos.ToString();
            ArrayList splitString = new ArrayList();
            ArrayList list2       = new ArrayList();

            splitString = this.GetSplitString(o_box.FilterPos);
            list2       = this.GetSplitString(o_box.RelationTableName);
            for (int i = 0; i < splitString.Count; i++)
            {
                if (splitString[i].ToString().Equals(str2))
                {
                    return(list2[i].ToString());
                }
            }
            return("");
        }
Esempio n. 9
0
 private void SetAllCombinationFG()
 {
     for (int i = 0; i < this.al_all.Count; i++)
     {
         DEBoxObject obj2 = (DEBoxObject)this.al_all[i];
         if (obj2.ControlType != "TextEditPLM")
         {
             DEMetaAttribute metaObject = (DEMetaAttribute)obj2.MetaObject;
             metaObject.Combination = "{" + metaObject.Combination + "}";
             obj2.ConAttrShowPos    = i.ToString();
             obj2.FilterType        = 0;
             obj2.FilterPos         = "";
             obj2.FilterAttribue    = "";
             obj2.IsConAttrType     = false;
             obj2.IsReflex          = false;
         }
     }
 }
Esempio n. 10
0
        private void ReflexControl(Guid g_mid, DEBoxObject o_box, int i_pos)
        {
            string filterPos      = "";
            string filterAttribue = "";

            for (int i = 0; i < this.al_all.Count; i++)
            {
                DEBoxObject obj2 = (DEBoxObject)this.al_all[i];
                filterPos      = obj2.FilterPos;
                filterAttribue = obj2.FilterAttribue;
                if ((((filterAttribue != null) && (filterAttribue.Length > 0)) && ((filterAttribue.IndexOf("1") != -1) && (obj2.ShowType == "UCGrid"))) && this.IsReflexFilter(filterPos, filterAttribue, i_pos))
                {
                    DEMetaAttribute metaObject         = (DEMetaAttribute)obj2.MetaObject;
                    DEMetaClass     class2             = ModelContext.MetaModel.GetClass(metaObject.LinkedResClass);
                    UCResGrid       grid               = (UCResGrid)this.al_control[i];
                    string          filterRefTableName = this.GetFilterRefTableName(obj2, i_pos);
                    grid.ReLoad(g_mid, class2.Name, filterRefTableName, true);
                }
            }
        }
Esempio n. 11
0
        private void SetReflexAttr(string str_filterrefex, string str_filterpos)
        {
            ArrayList posValue = new ArrayList();
            ArrayList list2    = new ArrayList();

            posValue = this.GetPosValue(str_filterrefex);
            list2    = this.GetPosValue(str_filterpos);
            for (int i = 0; i < list2.Count; i++)
            {
                int num2 = (int)list2[i];
                int num3 = (int)posValue[i];
                for (int j = 0; j < this.al_all.Count; j++)
                {
                    if ((num2 == j) && (num3 == 1))
                    {
                        DEBoxObject obj2 = (DEBoxObject)this.al_all[i];
                        obj2.IsReflex = true;
                    }
                }
            }
        }
Esempio n. 12
0
        private void DrawDropDownTBtn(UltraTextEditor txtEditor, string str_clsname, int i_dpindex)
        {
            DropDownEditorButton button = new DropDownEditorButton("SelectRes")
            {
                Key = "SelectRes",
                RightAlignDropDown = DefaultableBoolean.False
            };

            txtEditor.ButtonsRight.Add(button);
            txtEditor.NullText = "(无)";
            txtEditor.Tag      = this.al_all[i_dpindex];
            DEBoxObject obj2 = (DEBoxObject)this.al_all[i_dpindex];

            if (obj2.ShowType.Equals("UCTree"))
            {
                this.ActiveDropDownUC(txtEditor, str_clsname, true, i_dpindex);
            }
            else
            {
                this.ActiveDropDownUC(txtEditor, str_clsname, false, i_dpindex);
            }
        }
Esempio n. 13
0
        private void SetOBoxObject(Guid g_left, ArrayList al_right, ArrayList al_filtervalue, ArrayList al_filterreflex)
        {
            string conAttrShowPos = "";
            string str2           = "";
            string str3           = "";

            for (int i = 0; i < this.al_all.Count; i++)
            {
                DEBoxObject obj2 = (DEBoxObject)this.al_all[i];
                if (obj2.ControlType != "TextEditPLM")
                {
                    DEMetaAttribute metaObject = (DEMetaAttribute)obj2.MetaObject;
                    if (metaObject.Oid == g_left)
                    {
                        for (int j = 0; j < this.al_all.Count; j++)
                        {
                            DEBoxObject obj3 = (DEBoxObject)this.al_all[j];
                            if (obj3.ControlType != "TextBox")
                            {
                                DEMetaAttribute attribute2 = (DEMetaAttribute)obj3.MetaObject;
                                for (int k = 0; k < al_right.Count; k++)
                                {
                                    Guid guid = (Guid)al_right[k];
                                    if (attribute2.Oid == guid)
                                    {
                                        if (conAttrShowPos.Length == 0)
                                        {
                                            ArrayList list = new ArrayList();
                                            list = this.GetSplitString(obj3.ConAttrShowPos);
                                            if (list.Count > 1)
                                            {
                                                conAttrShowPos = obj3.ConAttrShowPos;
                                                string str4 = "";
                                                string str5 = "";
                                                for (int m = 0; m < list.Count; m++)
                                                {
                                                    if (m == 0)
                                                    {
                                                        str4 = al_filtervalue[k].ToString();
                                                        str5 = al_filterreflex[k].ToString();
                                                    }
                                                    else
                                                    {
                                                        str4 = str4 + "," + al_filtervalue[k].ToString();
                                                        str5 = str5 + "," + al_filterreflex[k].ToString();
                                                    }
                                                }
                                                str2 = str4;
                                                str3 = str5;
                                            }
                                            else
                                            {
                                                conAttrShowPos = j.ToString();
                                                str2           = al_filtervalue[k].ToString();
                                                str3           = al_filterreflex[k].ToString();
                                            }
                                        }
                                        else
                                        {
                                            ArrayList list2 = new ArrayList();
                                            list2 = this.GetSplitString(obj3.ConAttrShowPos);
                                            if (list2.Count > 1)
                                            {
                                                conAttrShowPos = conAttrShowPos + "," + obj3.ConAttrShowPos;
                                                string str6 = "";
                                                string str7 = "";
                                                for (int n = 0; n < list2.Count; n++)
                                                {
                                                    if (n == 0)
                                                    {
                                                        str6 = al_filtervalue[k].ToString();
                                                        str7 = al_filterreflex[k].ToString();
                                                    }
                                                    else
                                                    {
                                                        str6 = str6 + al_filtervalue[k].ToString();
                                                        str7 = str7 + "," + al_filterreflex[k].ToString();
                                                    }
                                                }
                                                str2 = str2 + "," + str6;
                                                str3 = str3 + "," + str7;
                                            }
                                            else
                                            {
                                                conAttrShowPos = conAttrShowPos + "," + j.ToString();
                                                str2           = str2 + "," + al_filtervalue[k].ToString();
                                                str3           = str3 + "," + al_filterreflex[k].ToString();
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        ArrayList splitString = new ArrayList();
                        splitString = this.GetSplitString(obj2.ConAttrShowPos);
                        if (splitString.Count > 1)
                        {
                            this.SetConAttrObject(splitString, conAttrShowPos, str2, str3);
                        }
                        else
                        {
                            obj2.FilterType        = 1;
                            obj2.FilterAttribue    = str3;
                            obj2.FilterPos         = conAttrShowPos;
                            obj2.RelationTableName = str2;
                            this.SetReflexAttr(str3, conAttrShowPos);
                        }
                    }
                }
            }
        }