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


Author
Message
Steve Warner
Steve Warner
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
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();
}

}
}

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search