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.
51 lines
1.5 KiB
51 lines
1.5 KiB
using ESRI.ArcGIS.Controls; |
|
using KGIS.Framework.Commands; |
|
using Kingo.Plugin.AttributeMaintain.View; |
|
using System; |
|
|
|
namespace Kingo.Plugin.AttributeMaintain.Commands |
|
{ |
|
/// <summary> |
|
/// 属性维护 |
|
/// </summary> |
|
public class CmdAttributeMaintain : BaseMenuCommand |
|
{ |
|
public IHookHelper HookHelper { get; set; } |
|
private FrmAttributeMaintain frmAttributeMaintain = null; |
|
public override void OnClick() |
|
{ |
|
if (frmAttributeMaintain == null) |
|
{ |
|
frmAttributeMaintain = new FrmAttributeMaintain |
|
{ |
|
WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen |
|
}; |
|
frmAttributeMaintain.Closed += FrmAttributeMaintain_Closed; |
|
} |
|
frmAttributeMaintain.ShowInMainWindow(true); |
|
} |
|
|
|
public override void OnCreate(object Hook) |
|
{ |
|
if (HookHelper == null) |
|
{ |
|
HookHelper = new HookHelperClass(); |
|
} |
|
HookHelper.Hook = Hook; |
|
} |
|
|
|
private void FrmAttributeMaintain_Closed(object sender, EventArgs e) |
|
{ |
|
if (frmAttributeMaintain != null) |
|
frmAttributeMaintain = null; |
|
} |
|
|
|
public override bool Enabled |
|
{ |
|
get |
|
{ |
|
return KGIS.Framework.Maps.MapsManager.Instance.MapService.GetProjectInfo() == null ? false : true; |
|
} |
|
} |
|
} |
|
}
|
|
|