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.
67 lines
2.0 KiB
67 lines
2.0 KiB
using ESRI.ArcGIS.Controls; |
|
using KGIS.Framework.Commands; |
|
using KGIS.Framework.Utils; |
|
using KGIS.Framework.Utils.Helper; |
|
using Kingo.Plugin.BGSetting.View; |
|
using System; |
|
|
|
namespace Kingo.Plugin.BGSetting.Commands |
|
{ |
|
/// <summary> |
|
/// 扣除地类系数设置 |
|
/// </summary> |
|
public class CmdKCDLXSSetting : BaseMenuCommand |
|
{ |
|
private EngineEditorClass pEditor = null; |
|
private IHookHelper hookHelper = null; |
|
private FrmKCDLXSWH bgfrm = null; |
|
public override void OnCreate(object hook) |
|
{ |
|
if (hookHelper == null) |
|
hookHelper = new HookHelperClass(); |
|
|
|
hookHelper.Hook = hook; |
|
} |
|
|
|
public override void OnClick() |
|
{ |
|
try |
|
{ |
|
if (pEditor == null) |
|
pEditor = new EngineEditorClass(); |
|
if (pEditor.EditState != esriEngineEditState.esriEngineStateNotEditing) |
|
{ |
|
MessageHelper.ShowTips("请先关闭编辑!"); |
|
return; |
|
} |
|
bgfrm = new FrmKCDLXSWH |
|
{ |
|
WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen, |
|
}; |
|
bgfrm.Closed += FrmKCDLXSSetting_Closed; |
|
bgfrm.ShowInMainWindow(true); |
|
} |
|
catch (Exception ex) |
|
{ |
|
LogAPI.Debug("扣除地类系数赋值异常:" + ex); |
|
} |
|
} |
|
private void FrmKCDLXSSetting_Closed(object sender, EventArgs e) |
|
{ |
|
if (bgfrm != null) bgfrm = null; |
|
} |
|
|
|
public override bool Enabled |
|
{ |
|
get |
|
{ |
|
//验证是否打开工程 |
|
object ProInfo = KGIS.Framework.Maps.MapsManager.Instance.MapService.GetProjectInfo(); |
|
if (ProInfo == null) |
|
return false; |
|
else |
|
return true; |
|
} |
|
} |
|
} |
|
}
|
|
|