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.Utils;
|
|
|
|
|
using KGIS.Framework.Utils.Helper;
|
|
|
|
|
using Kingo.Plugin.General.ViewDTBResultCheck;
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Kingo.Plugin.General.Commands
|
|
|
|
|
{
|
|
|
|
|
public class CmdUpdateRuleCheck : BaseMenuCommand
|
|
|
|
|
{
|
|
|
|
|
public IHookHelper m_hookHelper { get; set; }
|
|
|
|
|
private FrmRuleSetting frmRuleSetting { get; set; }
|
|
|
|
|
public override void OnClick()
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (frmRuleSetting == null)
|
|
|
|
|
{
|
|
|
|
|
frmRuleSetting = new FrmRuleSetting
|
|
|
|
|
{
|
|
|
|
|
WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen
|
|
|
|
|
};
|
|
|
|
|
frmRuleSetting.Closed += frmRuleSetting_Closed;
|
|
|
|
|
frmRuleSetting.ShowInMainWindow(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
LogAPI.Debug("规则库更新界面初始化异常,异常信息如下:");
|
|
|
|
|
LogAPI.Debug(ex);
|
|
|
|
|
LogAPI.Debug("异常信息结束。");
|
|
|
|
|
MessageHelper.ShowError("规则库更新界面初始化异常:" + ex.Message);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void frmRuleSetting_Closed(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (frmRuleSetting != null)
|
|
|
|
|
{
|
|
|
|
|
frmRuleSetting.Close();
|
|
|
|
|
}
|
|
|
|
|
frmRuleSetting = null;
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
LogAPI.Debug(ex);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void OnCreate(object Hook)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (Hook != null && m_hookHelper == null)
|
|
|
|
|
{
|
|
|
|
|
m_hookHelper = new HookHelperClass
|
|
|
|
|
{
|
|
|
|
|
Hook = Hook
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch
|
|
|
|
|
{
|
|
|
|
|
m_hookHelper = null;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|