森林草原湿地荒漠调查
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

63 lines
1.5 KiB

using System;
using ESRI.ArcGIS.ADF.BaseClasses;
using ESRI.ArcGIS.Controls;
using ESRI.ArcGIS.SystemUI;
namespace Kingo.Plugin.EngineEditor.Commands.Tools
{
public class ControlsEditingSketchDeleteCommandChinese2 : BaseCommand
{
private IHookHelper m_hookHelper;
private bool isDrawing;
public bool IsDrawing
{
get { return isDrawing; }
set { isDrawing = value; }
}
public override void OnCreate(object hook)
{
if (m_hookHelper == null)
{
//替换Env改动
//m_hookHelper = Env.Instance.KMap.HookHelper;
////m_hookHelper.Hook = hook;
m_hookHelper = new HookHelperClass();
m_hookHelper.Hook = hook;
}
//this.m_hookHelper.Hook = hook;
}
public override void OnClick()
{
((m_hookHelper.Hook as IMapControl4).CurrentTool as ITool).OnKeyDown((int)ConsoleKey.Backspace, 0);
}
public override string Caption
{
get
{
return "删除草图";
}
}
public override bool Enabled
{
get
{
if (IsDrawing)
{
return true;
}
else
{
return false;
}
}
}
}
}