年度变更建库软件5.0版本
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.

54 lines
1.7 KiB

6 months ago
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Controls;
using KGIS.Framework.AE.ExtensionMethod;
using KGIS.Framework.Commands;
using KGIS.Framework.Core.Attributes;
using KGIS.Framework.Maps;
using KGIS.Framework.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Kingo.Plugin.MapView.Commands
{
//[PathAttribute("Kingo.Plugin.MapView.Commands.LayerScaleThresholdsCommand")]
public class LayerScaleThresholdsCommand : BaseMapMenuCommand
{
//public long m_subType;
public override void OnClick()
{
ILayer layer = (ILayer)this.m_hookHelper.GetCustomProperty();
//if (m_subType == 1)
// layer.MaximumScale = this.m_hookHelper.FocusMap.MapScale;
//if (m_subType == 2)
// layer.MinimumScale = this.m_hookHelper.FocusMap.MapScale;
//if (m_subType == 3)
//{
layer.MaximumScale = 0;
layer.MinimumScale = 0;
//}
m_hookHelper.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, null);
}
public override void OnCreate(object Hook)
{
try
{
if (m_hookHelper == null)
{
m_hookHelper = new HookHelper();
m_hookHelper.Hook = Hook;
}
}
catch (Exception ex)
{
LogAPI.Debug("加载 缩放至图层 命令时发生异常,异常信息如下:");
LogAPI.Debug(ex);
LogAPI.Debug("异常信息结束");
}
}
}
}