18.04.2015 Views

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

.NET APPLICATION PROGRAMMING INTERFACE<br />

System.Drawing.Bitmap bitmap,<br />

string caption,<br />

string category,<br />

int helpContextId,<br />

string helpFile,<br />

string message,<br />

string name,<br />

string toolTip,<br />

);<br />

The overloaded BaseTool constructor has the following signature:<br />

[VB.NET]<br />

Public Sub New( _<br />

ByVal bitmap As System.Drawing.Bitmap _<br />

ByVal caption As String _<br />

ByVal category As String _<br />

ByVal cursor As System.Windows.Forms.Cursor _<br />

ByVal helpContextId As Integer _<br />

ByVal helpFile As String _<br />

ByVal message As String _<br />

ByVal name As String _<br />

ByVal tooltip As String _<br />

)<br />

[C#]<br />

public BaseTool(<br />

System.Drawing.Bitmap bitmap,<br />

string caption,<br />

string category,<br />

System.Windows.Forms.Cursor cursor,<br />

int helpContextId,<br />

string helpFile,<br />

string message,<br />

string name,<br />

string toolTip,<br />

);<br />

Inheriting the base classes<br />

You can use these parameterized constructors when you write your new classes,<br />

for example, as shown below for a new class called PanTool that inherits the<br />

BaseTool class.<br />

[VB.NET]<br />

Public Sub New()<br />

MyBase.New( Nothing, "Pan", "My Custom Tools", _<br />

System.Windows.Forms.Cursors.Cross, 0, "", "Pans the map.",<br />

"PanTool", "Pan")<br />

End Sub<br />

[C#]<br />

Chapter 4 • <strong>Developer</strong> environments • 169

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!