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.
74 lines
1.9 KiB
74 lines
1.9 KiB
using ESRI.ArcGIS.Controls; |
|
using KGIS.Framework.Commands; |
|
using KGIS.Framework.Maps; |
|
using KGIS.Framework.Platform; |
|
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> |
|
class CmdTaskCatalog : BaseMenuCommand |
|
{ |
|
public IHookHelper hookHelper; |
|
public override void OnCreate(object hook) |
|
{ |
|
if (hook == null) |
|
{ |
|
return; |
|
} |
|
try |
|
{ |
|
if (hookHelper == null) |
|
{ |
|
hookHelper = new HookHelperClass(); |
|
hookHelper.Hook = hook; |
|
} |
|
} |
|
catch |
|
{ |
|
hookHelper = null; |
|
return; |
|
} |
|
} |
|
|
|
public override void OnClick() |
|
{ |
|
try |
|
{ |
|
if (DBLoadHelper.AddPackage()) |
|
{ |
|
this.ShowLoading("正在设置任务目录...", 0, 0); |
|
Platform.Instance.SendMsg(new NotifyMsgPackage() { MsgType = "AfterLoadRefreshTreeData" }); |
|
} |
|
this.CloseLoading(); |
|
} |
|
catch (Exception ex) |
|
{ |
|
this.CloseLoading(); |
|
MessageHelper.ShowError("任务目录设置异常:" + ex.Message); |
|
} |
|
} |
|
|
|
public override bool Enabled |
|
{ |
|
get |
|
{ |
|
ProjectInfo prj = MapsManager.Instance.MapService.GetProjectInfo() as ProjectInfo; |
|
if (prj == null) |
|
{ |
|
return false; |
|
} |
|
return true; |
|
} |
|
} |
|
|
|
} |
|
|
|
}
|
|
|