clsZoomIn.cs
上传用户:tjyyhj
上传日期:2022-07-18
资源大小:30840k
文件大小:3k
源码类别:

GIS编程

开发平台:

Visual C++

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using ESRI.ArcGIS.SystemUI;
  5. using ESRI.ArcGIS.Carto;
  6. using ESRI.ArcGIS.Controls;
  7. using GisFramework;
  8. namespace Genaric
  9. {
  10.     public class clsZoomIn : ICommand  ,ITool
  11.     {
  12.         private IApplication mApp = null;
  13.         #region ICommand 成员
  14.         public int Bitmap
  15.         {
  16.             get { return (Int32)Resource1.放大地图.Handle; }
  17.         }
  18.         public string Caption
  19.         {
  20.             get { return "放大"; }
  21.         }
  22.         public string Category
  23.         {
  24.             get { return "基本操作"; }
  25.         }
  26.         public bool Checked
  27.         {
  28.             get { return false; }
  29.         }
  30.         public bool Enabled
  31.         {
  32.             get { return true; }
  33.         }
  34.         public int HelpContextID
  35.         {
  36.             get { throw new Exception("The method or operation is not implemented."); }
  37.         }
  38.         public string HelpFile
  39.         {
  40.             get { throw new Exception("The method or operation is not implemented."); }
  41.         }
  42.         public string Message
  43.         {
  44.             get { return "按选区进行缩放操作"; }
  45.         }
  46.         public string Name
  47.         {
  48.             get { return "Zoom In"; }
  49.         }
  50.         public void OnClick()
  51.         {
  52.             ICommand pmc = new ControlsMapZoomInToolClass();
  53.             pmc.OnCreate(mApp.MapControl);
  54.             pmc.OnClick();
  55.             mApp.CurrentTool = pmc as ITool;
  56.         }
  57.         public void OnCreate(object hook)
  58.         {
  59.             mApp = hook as IApplication;
  60.         }
  61.         public string Tooltip
  62.         {
  63.             get {
  64.                 return "按选区进行放大操作";
  65.             }
  66.         }
  67.         #endregion
  68.         #region ITool 成员
  69.         public int Cursor
  70.         {
  71.             get { return -1; }
  72.         }
  73.         public bool Deactivate()
  74.         {
  75.             throw new Exception("The method or operation is not implemented.");
  76.         }
  77.         public bool OnContextMenu(int x, int y)
  78.         {
  79.             throw new Exception("The method or operation is not implemented.");
  80.         }
  81.         public void OnDblClick()
  82.         {
  83.             throw new Exception("The method or operation is not implemented.");
  84.         }
  85.         public void OnKeyDown(int keyCode, int shift)
  86.         {
  87.             throw new Exception("The method or operation is not implemented.");
  88.         }
  89.         public void OnKeyUp(int keyCode, int shift)
  90.         {
  91.             throw new Exception("The method or operation is not implemented.");
  92.         }
  93.         public void OnMouseDown(int button, int shift, int x, int y)
  94.         {
  95.             throw new Exception("The method or operation is not implemented.");
  96.         }
  97.         public void OnMouseMove(int button, int shift, int x, int y)
  98.         {
  99.             throw new Exception("The method or operation is not implemented.");
  100.         }
  101.         public void OnMouseUp(int button, int shift, int x, int y)
  102.         {
  103.             throw new Exception("The method or operation is not implemented.");
  104.         }
  105.         public void Refresh(int hdc)
  106.         {
  107.             throw new Exception("The method or operation is not implemented.");
  108.         }
  109.         #endregion
  110.     }
  111. }