예제 #1
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;
            }
        }
예제 #2
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);
                        }
                    }
                }
            }
        }
예제 #3
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);
                }
            }
        }