using ESRI.ArcGIS.Controls; using KGIS.Framework.Commands; using KGIS.Framework.Maps; using KGIS.Framework.Platform; using KGIS.Framework.Utils; using KGIS.Framework.Utils.Helper; using Kingo.Plugin.DataLoad.View; using Kingo.PluginServiceInterface; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Kingo.Plugin.DataLoad.Commands { public class CmdSJTQ : BaseMenuCommand { IEngineEditor m_pEditor; public override void OnCreate(object hook) { m_pEditor = new EngineEditorClass(); } public override void OnClick() { try { List Dics = Platform.Instance.DicHelper.GetDic(DicTypeEnum.QSDM, true); if (Dics == null) { MessageHelper.ShowTips("请先设置权属字典!"); return; } FrmSJTQ main = new FrmSJTQ { Width = 430, Height = 300, WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen }; main.ShowInMainWindow(true); } catch (Exception ex) { LogAPI.Debug(ex); MessageHelper.ShowError("举证成果加载出现错误,可能的原因是:" + ex.Message); } } public override bool Enabled { get { ProjectInfo prj = MapsManager.Instance.CurrProjectInfo as ProjectInfo; if (prj == null) return false; return !string.IsNullOrWhiteSpace(prj.BGDatabase) && m_pEditor.EditState == esriEngineEditState.esriEngineStateNotEditing; } } } }