Profile Picture

How do I replace Ellipse Tool with my own custom Shape tool?

Posted By Steve Warner 14 Years Ago

How do I replace Ellipse Tool with my own custom Shape tool?

Author
Message
Steve Warner
Posted 14 Years Ago
View Quick Profile
Junior Member

Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 15, Visits: 1
I am using NDrawingDiagram to create different shapes based on an external database. I am able to programmatically place a custom shape on to the drawingview without any issues. I am not currently using a library for these custom shapes and I would really prefer to avoid this option. All of my custom shapes are currently NGroups. I do not want users to be able to place Ellipses onto the drawingview and have overridden the NEnableCreateEllipseToolCommand with my own Command. I am wondering if this is the right way to go about this or should I create my own custom Tool with a corresponding Enable command?

Here is my current code.


using System.Linq;
using System.Text;
using Nevron;
using Nevron.Diagram.WinForm.Commands;
using Nevron.UI;

namespace Elixir.App.FormatDesigner
{
public class EnableCreateBarcodeCommand : NEnableCreateEllipseToolCommand
{

public EnableCreateBarcodeCommand()
: base()
{
base.Text = "Barcode Tool";
base.TooltipText = "Barcode Tool";
}

public override void Execute()
{
base.Execute();
}

}
}





Similar Topics


Reading This Topic