clsPasterFeatures.cs
资源名称:gis.rar [点击查看]
上传用户:tjyyhj
上传日期:2022-07-18
资源大小:30840k
文件大小:2k
源码类别:
GIS编程
开发平台:
Visual C++
- using System;
- using System.Collections.Generic;
- using System.Text;
- using ESRI.ArcGIS.SystemUI;
- using ESRI.ArcGIS.Carto;
- using ESRI.ArcGIS.Controls;
- using ESRI.ArcGIS.Geometry;
- using ESRI.ArcGIS.Geodatabase;
- using GisFramework;
- namespace Genaric
- {
- public class clsPasterFeatures : ICommand
- {
- private IApplication mApp = null;
- #region ICommand 成员
- public int Bitmap
- {
- get { return -1; }
- }
- public string Caption
- {
- get { return "粘贴"; }
- }
- public string Category
- {
- get { return "基本操作"; }
- }
- public bool Checked
- {
- get { return false; }
- }
- public bool Enabled
- {
- get { return true; }
- }
- public int HelpContextID
- {
- get { throw new Exception("The method or operation is not implemented."); }
- }
- public string HelpFile
- {
- get { throw new Exception("The method or operation is not implemented."); }
- }
- public string Message
- {
- get { return "执行粘贴操作"; }
- }
- public string Name
- {
- get { return "Paster Features"; }
- }
- public void OnClick()
- {
- if (mApp.Editor.EditState == esriEngineEditState.esriEngineStateNotEditing)
- {
- System.Windows.Forms.MessageBox.Show("请先开启编辑!", "提示",
- System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Information);
- return;
- }
- try
- {
- ICommand pmc = new ControlsEditingPasteCommandClass();
- pmc.OnCreate(mApp.MapControl);
- pmc.OnClick();
- }
- catch { }
- }
- public void OnCreate(object hook)
- {
- mApp = hook as IApplication;
- }
- public string Tooltip
- {
- get {
- return "执行粘贴操作";
- }
- }
- #endregion
- }
- }