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.
76 lines
2.2 KiB
76 lines
2.2 KiB
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 KGIS.Framework.Utils.Interface; |
|
using Kingo.Plugin.General.Helper; |
|
using Kingo.PluginServiceInterface; |
|
using KUI.Windows; |
|
using System; |
|
|
|
namespace Kingo.Plugin.DTBYCL.Commands |
|
{ |
|
/// <summary> |
|
/// 新建自主举证任务包 |
|
/// </summary> |
|
public class CmdAddNewPackageForJK : BaseMenuCommand |
|
{ |
|
public IHookHelper m_hookHelper; |
|
public override void OnCreate(object hook) |
|
{ |
|
if (hook == null) |
|
{ |
|
return; |
|
} |
|
try |
|
{ |
|
if (m_hookHelper == null) |
|
{ |
|
m_hookHelper = new HookHelperClass(); |
|
m_hookHelper.Hook = hook; |
|
} |
|
} |
|
catch |
|
{ |
|
m_hookHelper = null; |
|
return; |
|
} |
|
} |
|
public override void OnClick() |
|
{ |
|
try |
|
{ |
|
if (!string.IsNullOrWhiteSpace(DBLoadHelper.AddNewPackageForJK())) |
|
{ |
|
this.ShowLoading("正在新建自主举证任务包...", 0, 0); |
|
Platform.Instance.SendMsg(new NotifyMsgPackage() { MsgType = "AfterLoadRefreshTreeData" }); |
|
} |
|
this.CloseLoading(); |
|
} |
|
catch (Exception ex) |
|
{ |
|
this.CloseLoading(); |
|
LogAPI.Debug("新建自主举证任务包异常:" + ex.Message); |
|
MessageHelper.ShowError("新建自主举证任务包异常:" + ex.Message); |
|
} |
|
} |
|
|
|
public override bool Enabled |
|
{ |
|
get |
|
{ |
|
if (!(MapsManager.Instance.MapService.GetProjectInfo() is ProjectInfo prj)) |
|
{ |
|
return false; |
|
} |
|
else if (string.IsNullOrWhiteSpace(prj.DTBYCLYHDatabase)) |
|
{ |
|
return false; |
|
} |
|
return true; |
|
} |
|
} |
|
} |
|
}
|
|
|