using KGIS.Framework.Commands; using KGIS.Framework.Utils.Helper; using KGIS.Framework.Utils; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using ESRI.ArcGIS.Controls; namespace Kingo.Plugin.BatchDataLoad.Commands { public class CmdBatchDataLoad : BaseMenuCommand { View.UcBatchDataLoad view = null; private IHookHelper hookHelper = null; public override void OnClick() { try { view = new View.UcBatchDataLoad(hookHelper); view.Closed += (s, e) => { view = null; }; view.ShowInMainWindow(); } catch (Exception ex) { MessageHelper.Show(ex.Message); LogAPI.Debug(ex); } } public override void OnCreate(object Hook) { if (hookHelper == null) hookHelper = new HookHelperClass(); hookHelper.Hook = Hook; } } }