• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IHookHelper类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IHookHelper的典型用法代码示例。如果您正苦于以下问题:C# IHookHelper类的具体用法?C# IHookHelper怎么用?C# IHookHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IHookHelper类属于命名空间,在下文中一共展示了IHookHelper类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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");
            }
        }
开发者ID:lovelll,项目名称:DQHP,代码行数:35,代码来源:MeasureDisTool.cs


示例2: FormAggregation

        public FormAggregation(IHookHelper hook)
        {
            InitializeComponent();
            _hookHelper = hook;

            this.Load += new EventHandler(FormPolygonAggregation_Load);
        }
开发者ID:weigiser,项目名称:AOProjects,代码行数:7,代码来源:FormAggregation.cs


示例3: Tend

        public Tend(IHookHelper hookHelper,AxMapControl amap)
        {
            this.axmapcontrol = amap;

            this.m_hookHelper = hookHelper;
            InitializeComponent();
        }
开发者ID:AgentWord,项目名称:SiPing,代码行数:7,代码来源:Tend.cs


示例4: MeasureResult

 public MeasureResult(IHookHelper myhookhelper)
 {
     InitializeComponent();
     //measureDistance.MsgInfo = this;
     m_HookHelper = myhookhelper;
     GetMapUnit();
     //esriAreaUnits.esriSquareMeters
 }
开发者ID:ismethr,项目名称:gas-geological-map,代码行数:8,代码来源:MeasureResult.cs


示例5: OpenSimplePointDlg

    public OpenSimplePointDlg(IHookHelper hookHelper)
    {
      if (null == hookHelper)
        throw new Exception("Hook helper is not initialize");

      InitializeComponent();
      
      m_hookHelper = hookHelper;
    }
开发者ID:Esri,项目名称:arcobjects-sdk-community-samples,代码行数:9,代码来源:OpenSimplePointDlg.cs


示例6: OGRAddLayerDialog

        public OGRAddLayerDialog(IHookHelper hookHelper)
        {
            if (null == hookHelper)
                throw new Exception("Hook helper is not initialized");

            InitializeComponent();

            m_hookHelper = hookHelper;
        }
开发者ID:DanielCaldwell,项目名称:arcgis-ogr,代码行数:9,代码来源:OGRAddLayerDialog.cs


示例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;
        }
开发者ID:ismethr,项目名称:gas-geological-map,代码行数:14,代码来源:CreateScaleBar.cs


示例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;
        }
开发者ID:Krystal001025,项目名称:temp,代码行数:14,代码来源:CreateScaleBar.cs


示例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;
        }
开发者ID:ismethr,项目名称:gas-geological-map,代码行数:14,代码来源:CreateNorthArrow.cs


示例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;
        }
开发者ID:Krystal001025,项目名称:temp,代码行数:14,代码来源:CreateNorthArrow.cs


示例11: DeleteAllElements

        /// <summary>
        /// ɾ�����������ص�Ԫ��
        /// </summary>
        public void DeleteAllElements(IHookHelper hookHelper)
        {
            //m_hookHelper.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);
            IGraphicsContainer g = hookHelper.ActiveView.GraphicsContainer;

            //RemoveElementFromGroupElement(m_Elements);
            try
            {
                //g.DeleteElement(m_Elements as IElement);
                g.DeleteAllElements();
            }
            catch
            { }
            finally
            {
                m_TraceElement = null;
                m_LabelElement = null;
                m_VertexElement = null;
                m_Elements = null;
                //�����ˢ��һ��
                hookHelper.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);
                hookHelper.ActiveView.Refresh();
            }
        }
开发者ID:ismethr,项目名称:gas-geological-map,代码行数:27,代码来源:MeasureDistance.cs


示例12: ClearFeatureSelection

        public ClearFeatureSelection()
        {
            //Create an IHookHelper object
            m_HookHelper = new HookHelperClass();

            //Set the tool properties
            base.m_caption = "Clear Feature Selection";
            base.m_category = "Sample_Select(C#)";
            base.m_name = "Sample_Select(C#)_Clear Feature Selection";
            base.m_message = "Clear Current Feature Selection";
            base.m_toolTip = "Clear Feature Selection";
            base.m_bitmap = new System.Drawing.Bitmap(GetType().Assembly.GetManifestResourceStream(GetType(), "ClearSelection.bmp"));
        }
开发者ID:Esri,项目名称:arcobjects-sdk-community-samples,代码行数:13,代码来源:ClearFeatureSelection.cs


示例13: OnCreate

        public override void OnCreate(object Hook)
        {
            base.OnCreate(Hook);

            m_hookHelper = base.m_Hook.Hook as IHookHelper;
        }
开发者ID:hy1314200,项目名称:HyDM,代码行数:6,代码来源:CommandTocControl.cs


示例14: 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
        }
开发者ID:xueqiyong,项目名称:MyPluginEngine,代码行数:29,代码来源:AddScaleBar.cs


示例15: OnCreate

        //创建事件响应函数
        public override void OnCreate(object hook)
        {
            if (m_hookHelper == null)
                m_hookHelper = new HookHelperClass();

            m_hookHelper.Hook = hook;
        }
开发者ID:Kingvey,项目名称:ConstructionLandEvaluationSystem,代码行数:8,代码来源:CreateNewMapDocument.cs


示例16: 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
        }
开发者ID:chinasio,项目名称:minegis,代码行数:29,代码来源:AreaPrintMapClass.cs


示例17: 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;
        }
开发者ID:ismethr,项目名称:gas-geological-map,代码行数:29,代码来源:AttributeQueryEdit.cs


示例18: 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
        }
开发者ID:hy1314200,项目名称:HyDM,代码行数:16,代码来源:SystemHelpCommand.cs


示例19: UpStreamTrace

 public UpStreamTrace()
 {
     //
     // TODO: �ڴ˴���ӹ��캯���߼�
     //
     m_HookHelper=new HookHelperClass();
     base.m_caption = "���ݷ���";
     base.m_category = "CustomCommands";
     base.m_message = "�������";
     base.m_name = "CustomCommands_sloverPath";
     base.m_toolTip = "���ݷ���";
 }
开发者ID:chinasio,项目名称:Control,代码行数:12,代码来源:UpStreamTrace.cs


示例20: moveFeatureTool

        public moveFeatureTool()
        {
            //
            // TODO: �ڴ˴���ӹ��캯���߼�
            //
            base.m_caption = "�ƶ�Ҫ��";
            base.m_category = "CustomCommands";
            base.m_message = "MoveFeature";
            base.m_name = "CustomCommands_identify";
            base.m_toolTip = "�ƶ�Ҫ��";

            m_HookHelper= new HookHelperClass();
        }
开发者ID:chinasio,项目名称:Control,代码行数:13,代码来源:moveFeatureTool.cs



注:本文中的IHookHelper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IHost类代码示例发布时间:2022-05-24
下一篇:
C# IHighlightingDefinition类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap