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.
|
|
|
|
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 CmdAddNewPackage : 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.AddNewPackage()))
|
|
|
|
|
{
|
|
|
|
|
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
|
|
|
|
|
{
|
|
|
|
|
ProjectInfo prj = MapsManager.Instance.MapService.GetProjectInfo() as ProjectInfo;
|
|
|
|
|
if (prj == null)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|