本文整理汇总了C#中IHookHelper类的典型用法代码示例。如果您正苦于以下问题:C# IHookHelper类的具体用法?C# IHookHelper怎么用?C# IHookHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IHookHelper类属于命名空间,在下文中一共展示了IHookHelper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MeasureDisTool
public MeasureDisTool(IHookHelper m_hookHelper0)
{
if (m_hookHelper0 != null)
{
m_hookHelper = m_hookHelper0;
}
else
{
return;
}
//
// TODO: Define values for the public properties
//
base.m_category = ""; //localizable text
base.m_caption = "measure"; //localizable text
base.m_message = "This should work in ArcMap/MapControl/PageLayoutControl"; //localizable text
base.m_toolTip = "量测"; //localizable text
base.m_name = "measure"; //unique id, non-localizable (e.g. "MyCategory_MyTool")
//frm = new FrmMeasure(m_hookHelper);
m_Cursor = System.Windows.Forms.Cursors.Cross;
try
{
//
// TODO: change resource name if necessary
//
string bitmapResourceName = GetType().Name + ".bmp";
base.m_bitmap = new Bitmap(GetType(), bitmapResourceName);
base.m_cursor = new System.Windows.Forms.Cursor(GetType(), GetType().Name + ".cur");
}
catch (Exception ex)
{
System.Diagnostics.Trace.WriteLine(ex.Message, "Invalid Bitmap");
}
}
示例2: FormAggregation
public FormAggregation(IHookHelper hook)
{
InitializeComponent();
_hookHelper = hook;
this.Load += new EventHandler(FormPolygonAggregation_Load);
}
示例3: Tend
public Tend(IHookHelper hookHelper,AxMapControl amap)
{
this.axmapcontrol = amap;
this.m_hookHelper = hookHelper;
InitializeComponent();
}
示例4: MeasureResult
public MeasureResult(IHookHelper myhookhelper)
{
InitializeComponent();
//measureDistance.MsgInfo = this;
m_HookHelper = myhookhelper;
GetMapUnit();
//esriAreaUnits.esriSquareMeters
}
示例5: OpenSimplePointDlg
public OpenSimplePointDlg(IHookHelper hookHelper)
{
if (null == hookHelper)
throw new Exception("Hook helper is not initialize");
InitializeComponent();
m_hookHelper = hookHelper;
}
示例6: OGRAddLayerDialog
public OGRAddLayerDialog(IHookHelper hookHelper)
{
if (null == hookHelper)
throw new Exception("Hook helper is not initialized");
InitializeComponent();
m_hookHelper = hookHelper;
}
示例7: CreateScaleBar
public CreateScaleBar()
{
//Create an IHookHelper object
m_HookHelper = new HookHelperClass();
//Set the tool properties
base.m_bitmap = GIS.Properties.Resources.MapReferenceScale16 ;
base.m_caption = "��ӱ�����";
base.m_category = "MapPrint";
base.m_message = "ͨ����ͼ�ϻ�����ӱ�����";
base.m_name = "MapPrint_CreateScaleBar";
base.m_toolTip = "��ӱ�����";
base.m_deactivate = true;
}
示例8: CreateScaleBar
public CreateScaleBar()
{
//Create an IHookHelper object
m_HookHelper = new HookHelperClass();
//Set the tool properties
//base.m_bitmap = new System.Drawing.Bitmap(GetType().Assembly.GetManifestResourceStream(GetType(), "scalebar.bmp"));
base.m_caption = "ScaleBar";
base.m_category = "myCustomCommands(C#)";
base.m_message = "Add a scale bar map surround";
base.m_name = "myCustomCommands(C#)_ScaleBar";
base.m_toolTip = "Add a scale bar";
base.m_deactivate = true;
}
示例9: CreateNorthArrow
public CreateNorthArrow()
{
//Create an IHookHelper object
m_HookHelper = new HookHelperClass();
//Set the tool properties
base.m_bitmap = GIS.Properties.Resources.NorthArrow16;
base.m_caption = "���ָ����";
base.m_category = "MapPrint";
base.m_message = "ͨ����ͼ�ϻ������ָ����";
base.m_name = "MapPrint_CreateNorthArrow";
base.m_toolTip = "���ָ����";
base.m_deactivate = true;
}
示例10: CreateNorthArrow
public CreateNorthArrow()
{
//Create an IHookHelper object
m_HookHelper = new HookHelperClass();
//Set the tool properties
base.m_caption = "NorthArrow";
base.m_category = "myCustomCommands(C#)";
base.m_message = "Add a north arrow map surround";
base.m_name = "myCustomCommands(C#)_NorthArrow";
base.m_toolTip = "Add a north arrow";
base.m_deactivate = true;
}
示例11: OnCreate
/// <summary>
/// Occurs when this tool is created
/// </summary>
/// <param name="hook">Instance of the application</param>
public override void OnCreate(object hook)
{
try
{
m_hookHelper = new HookHelperClass();
m_hookHelper.Hook = hook;
if (m_hookHelper.ActiveView == null)
{
m_hookHelper = null;
}
}
catch
{
m_hookHelper = null;
}
if (m_hookHelper == null)
base.m_enabled = false;
else
base.m_enabled = true;
pPageLayoutControl = m_hookHelper.Hook as IPageLayoutControl3;
IPageLayout pPageLayout = pPageLayoutControl.PageLayout;
// TODO: Add other initialization code
}
示例12: OnCreate
//创建事件响应函数
public override void OnCreate(object hook)
{
if (m_hookHelper == null)
m_hookHelper = new HookHelperClass();
m_hookHelper.Hook = hook;
}
示例13: OnCreate
/// <summary>
/// Occurs when this tool is created
/// </summary>
/// <param name="hook">Instance of the application</param>
public override void OnCreate(object hook)
{
try
{
m_hookHelper = new HookHelperClass();
m_hookHelper.Hook = hook;
if (m_hookHelper.ActiveView == null)
{
m_hookHelper = null;
}
}
catch
{
m_hookHelper = null;
}
if (m_hookHelper == null)
base.m_enabled = false;
else
base.m_enabled = true;
m_ClipMap = new MapClass();
// TODO: Add other initialization code
}
示例14: OnCreate
/// <summary>
/// ��������
/// </summary>
/// <params name="hook">����ʵ��</params>
public override void OnCreate(object hook)
{
try
{
m_hookHelper = new HookHelperClass();
m_hookHelper.Hook = hook;
if (m_hookHelper.ActiveView == null)
{
m_hookHelper = null;
}
}
catch
{
m_hookHelper = null;
}
if (m_hookHelper == null)
base.m_enabled = false;
else
base.m_enabled = true;
//��ʼ������
m_map = m_hookHelper.FocusMap;
m_pActiveView = m_hookHelper.ActiveView;
}
示例15: OnCreate
/// <summary>
/// Occurs when this command is created
/// </summary>
/// <param name="hook">Instance of the application</param>
public override void OnCreate(object hook)
{
if (hook == null)
return;
if (m_hookHelper == null)
m_hookHelper = new HookHelperClass();
m_hookHelper.Hook = hook;
// TODO: Add other initialization code
}