Example #1
0
        private void A(Entity entity)
        {
            this.BJb.BeginUpdate();
            this.BJb.Nodes.Clear();
            TreeNode treeNode = null;

            foreach (Entity current in Entities.Instance.EntitiesCollection)
            {
                if (!current.Editor_IsExcludedFromWorld() && (!(this.BJe != null) || this.BJe.IsAssignableFrom(current.GetType())))
                {
                    bool flag = !string.IsNullOrEmpty(current.Name);
                    if (this.BJE != null)
                    {
                        LogicEntityClass logicEntityClass = current as LogicEntityClass;
                        if (logicEntityClass != null && logicEntityClass.EntityClassInfo != null && logicEntityClass.EntityClassInfo.EntityClassType.IsAssignableFrom(this.BJE.GetType()))
                        {
                            flag = true;
                        }
                    }
                    if (flag)
                    {
                        TreeNode treeNode2 = new TreeNode(current.ToString(), 2, 2);
                        treeNode2.Name = treeNode2.Text;
                        treeNode2.Tag  = current;
                        this.BJb.Nodes.Add(treeNode2);
                        if (current == entity)
                        {
                            treeNode = treeNode2;
                        }
                    }
                }
            }
            this.BJb.TreeViewNodeSorter = new AT();
            this.BJb.Sort();
            if (treeNode != null)
            {
                //TreeViewUtils.ExpandAllPathToNode(treeNode);
                this.BJb.SelectedNode = treeNode;
            }
            if (this.BJF)
            {
                this.BJf      = new TreeNode(ToolsLocalization.Translate("ChooseEntityForm", "(Null)"), 1, 1);
                this.BJf.Name = this.BJf.Text;
                this.BJb.Nodes.Add(this.BJf);
                if (entity == null)
                {
                    this.BJb.SelectedNode = this.BJf;
                }
            }
            this.BJb.EndUpdate();
        }
Example #2
0
 public override Type GetReturnType()
 {
     if (this.LogicMethod != null)
     {
         return(this.LogicMethod.ReturnType);
     }
     if (this.abq)
     {
         LogicEntityClass logicEntityClass = (LogicEntityClass)base.ParentMethod.ParentClass;
         if (logicEntityClass.EntityClassInfo != null)
         {
             return(logicEntityClass.EntityClassInfo.EntityClassType);
         }
     }
     return(null);
 }