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

56 lines
1.4 KiB

using KGIS.Framework.Commands;
using KGIS.Framework.Utils;
using KGIS.Framework.Utils.Helper;
using Kingo.Plugin.BHTB_Extract.View;
using System;
namespace Kingo.Plugin.BHTB_Extract.Commands
{
/// <summary>
/// 变化图斑分幅数据提取
/// </summary>
public class CmdExtractDataForm : BaseMenuCommand
{
ExtractDataView extractDataForm = null;
public override void OnClick()
{
try
{
if (extractDataForm == null)
{
extractDataForm = new ExtractDataView();
extractDataForm.Closed += ExtractDataForm_Closed;
}
extractDataForm.ShowInMainWindow(true);
}
catch (Exception ex)
{
LogAPI.Debug(ex);
MessageHelper.ShowError("变化图斑数据提取出现错误,可能的原因是:" + ex.Message);
}
}
private void ExtractDataForm_Closed(object sender, EventArgs e)
{
if (extractDataForm != null)
{
extractDataForm = null;
}
}
public override void OnCreate(object Hook)
{
}
public override bool Enabled
{
get
{
return KGIS.Framework.Maps.MapsManager.Instance.MapService.GetProjectInfo() == null ? false : true;
}
}
}
}