using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using KGIS.Framework.AE; using KGIS.Framework.AE.ExtensionMethod; using KGIS.Framework.Utils; using KGIS.Framework.Utils.Helper; using KGIS.Framework.Maps; using ESRI.ArcGIS.Controls; using ESRI.ArcGIS.Carto; using ESRI.ArcGIS.esriSystem; using ESRI.ArcGIS.Geodatabase; using ESRI.ArcGIS.ADF; using ESRI.ArcGIS.Geometry; using ESRI.ArcGIS.Display; using Kingo.Plugin.MakeTaskPackage.View; using KGIS.Framework.Commands; namespace Kingo.Plugin.MakeTaskPackage.Commands { public class CmdMxdCut : BaseMenuCommand { private IHookHelper m_hookHelper = 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("加载 MXD切片 命令时发生异常,异常信息如下:"); LogAPI.Debug(ex); LogAPI.Debug("异常信息结束"); } } public override void OnClick() { try { //FrmMultCut frm = new FrmMultCut(); //frm.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; //frm.Width = 700; //frm.Height = 800; //frm.ShowInMainForm(true); FrmMxdMultCut frm = new FrmMxdMultCut(); frm.Show(); } catch (Exception ex) { LogAPI.Debug("Mxd切片发生异常,异常信息如下:"); LogAPI.Debug(ex); MessageHelper.ShowError("Mxd切片发生异常" + ex.Message); } } public override bool Enabled { get { return true; } } } }