Ejemplo n.º 1
0
 protected override void Render(GH_Canvas iCanvas, Graphics graph, GH_CanvasChannel iChannel)
 {
     if ((int)iChannel == 0)
     {
         iCanvas.CanvasPostPaintWidgets += (new GH_Canvas.CanvasPostPaintWidgetsEventHandler(RenderPostWidgets));
     }
     this.Render(iCanvas, graph, iChannel);
     if ((int)iChannel == 20)
     {
         _collection.Render(new WidgetRenderArgs(iCanvas, WidgetChannel.Object));
     }
 }
Ejemplo n.º 2
0
        //protected unsafe override void Render(GH_Canvas iCanvas, Graphics graph, GH_CanvasChannel iChannel)
        //{
        //    //if ((int)iChannel == 0)
        //    //{
        //    //    iCanvas.remove_CanvasPostPaintWidgets(new CanvasPostPaintWidgetsEventHandler((object)this, (IntPtr)(void*)/*OpCode not supported: LdFtn*/));
        //    //    iCanvas.add_CanvasPostPaintWidgets(new CanvasPostPaintWidgetsEventHandler((object)this, (IntPtr)(void*)/*OpCode not supported: LdFtn*/));
        //    //}
        //    if ((int)iChannel != 10)
        //    {
        //        if ((int)iChannel == 20)
        //        {
        //            RenderComponentCapsule2(iCanvas, graph);
        //            composedCollection.Render(new WidgetRenderArgs(iCanvas, WidgetChannel.Object));
        //        }
        //    }
        //    else
        //    {
        //        foreach (IGH_Param item in base.Owner.Params.Input)
        //        {
        //            item.Attributes.RenderToCanvas(iCanvas,GH_CanvasChannel.Wires);
        //        }
        //    }
        //}

        protected override void Render(GH_Canvas iCanvas, Graphics graph, GH_CanvasChannel iChannel)
        {
            if ((int)iChannel == 0)
            {
                iCanvas.CanvasPostPaintWidgets += (new CanvasPostPaintWidgetsEventHandler(RenderPostWidgets));
            }
            if ((int)iChannel != 10)
            {
                if ((int)iChannel == 20)
                {
                    RenderComponentCapsule2(iCanvas, graph);
                    composedCollection.Render(new WidgetRenderArgs(iCanvas, WidgetChannel.Object));
                }
            }
            else
            {
                foreach (IGH_Param item in base.Owner.Params.Input)
                {
                    item.Attributes.RenderToCanvas(iCanvas, GH_CanvasChannel.Wires);
                }
            }
        }