예제 #1
0
        public virtual void AddChildren()
        {
            this.Nodes.Clear();
            foreach (IPropertyMap propertyMap in this.classMap.GetAllPropertyMaps())
            {
                TreeNode child = new PropertyTreeNode(this.context, this.obj, propertyMap.Name);
                this.Nodes.Add(child);
//				if (propertyMap.ReferenceType != ReferenceType.None)
//				{
//				}
            }
            foreach (MethodInfo methodInfo in obj.GetType().GetMethods())
            {
                bool show = ShowMethod(methodInfo);
                if (show)
                {
                    TreeNode child = new MethodTreeNode(this.context, this.obj, methodInfo);
                    this.Nodes.Add(child);
                }
            }
        }
예제 #2
0
 private void CallMethod(MethodTreeNode methodTreeNode)
 {
     try
     {
         object result = methodTreeNode.InvokeMethod((MethodProperties) objectPropertyGrid.SelectedObject);
         if (result != null)
         {
             MessageBox.Show(result.ToString() );
         }
         else
         {
             MessageBox.Show("Method completed and returned null.");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Method threw the following exception: " + ex.ToString() );
     }
 }
예제 #3
0
 private void SelectMethod(MethodTreeNode methodTreeNode)
 {
     if (objectPropertyGrid.SelectedObject != null)
     {
         MethodProperties selectedMethodProperties = objectPropertyGrid.SelectedObject as MethodProperties;
         if (selectedMethodProperties != null)
         {
             if (selectedMethodProperties.Obj == methodTreeNode.Obj)
             {
                 if (selectedMethodProperties.Signature == methodTreeNode.Text)
                 {
                     return;
                 }
             }
         }
     }
     MethodProperties properties = new MethodProperties(Context, methodTreeNode.Obj,  methodTreeNode.MethodInfo) ;
     objectPropertyGrid.SelectedObject = properties;
 }
예제 #4
0
 public virtual void AddChildren()
 {
     this.Nodes.Clear() ;
     foreach (IPropertyMap propertyMap in this.classMap.GetAllPropertyMaps() )
     {
         TreeNode child = new PropertyTreeNode(this.context, this.obj,  propertyMap.Name);
         this.Nodes.Add(child);
     //				if (propertyMap.ReferenceType != ReferenceType.None)
     //				{
     //				}
     }
     foreach (MethodInfo methodInfo in obj.GetType().GetMethods())
     {
         bool show = ShowMethod(methodInfo);
         if (show)
         {
             TreeNode child = new MethodTreeNode(this.context, this.obj,  methodInfo);
             this.Nodes.Add(child);
         }
     }
 }