年度变更建库软件5.0版本
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.

94 lines
2.5 KiB

6 months ago
using ESRI.ArcGIS.Controls;
using KGIS.Framework.Commands;
using KGIS.Framework.Maps;
using KGIS.Framework.Utils;
using Kingo.Plugin.DLTB_IDG.View;
using Kingo.PluginServiceInterface;
using System;
namespace Kingo.Plugin.DLTB_IDG.Commands
{
/// <summary>
/// 质检错误列表
/// </summary>
public class CmdQualityCheckList : BaseMenuCommand
{
private EngineEditorClass pEditor = null;
public IHookHelper m_hookHelper;
private UCQualityCheckListPlus uCQualityCheckListPlus = null;
public override void OnClick()
{
try
{
if (uCQualityCheckListPlus == null)
{
uCQualityCheckListPlus = new UCQualityCheckListPlus
{
Height = 380
};
uCQualityCheckListPlus.CloseViewHandler += View_CloseViewHandler;
}
uCQualityCheckListPlus.ShowPanel();
}
catch (Exception ex)
{
LogAPI.Debug("开启质检错误列表异常:" + ex);
}
}
private void View_CloseViewHandler(object sender, EventArgs e)
{
if (uCQualityCheckListPlus != null)
{
uCQualityCheckListPlus.ClosePanel();
uCQualityCheckListPlus = null;
}
}
public override void OnCreate(object Hook)
{
try
{
if (m_hookHelper == null)
{
m_hookHelper = new HookHelperClass
{
Hook = Hook
};
}
if (pEditor == null)
{
pEditor = new EngineEditorClass();
}
}
catch
{
m_hookHelper = null;
return;
}
}
public override bool Enabled
{
get
{
if (!(MapsManager.Instance.MapService.GetProjectInfo() is ProjectInfo pTemp))
{
return false;
}
else
{
if (string.IsNullOrWhiteSpace(pTemp.GetProjFilePath()))
{
return false;
}
else
{
return true;
}
}
}
}
}
}