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

65 lines
1.9 KiB

using ESRI.ArcGIS.Controls;
using KGIS.Framework.Commands;
using KGIS.Framework.Utils;
using KGIS.Framework.Utils.Helper;
using Kingo.Plugin.BGSetting.Views;
using System;
namespace Kingo.Plugin.BGSetting.Commands
{
/// <summary>
/// 系统设置-功能点
/// </summary>
public class CmdSystemSetting : BaseMenuCommand
{
/// <summary>
/// 编辑器
/// </summary>
private EngineEditorClass pEditor = null;
private IHookHelper hookHelper = null;
public override void OnClick()
{
try
{
if (pEditor == null)
pEditor = new EngineEditorClass();
if (pEditor.EditState != esriEngineEditState.esriEngineStateNotEditing)
{
MessageHelper.ShowTips("请先关闭编辑!");
return;
}
UCOpenSystemSet systemSet = new UCOpenSystemSet
{
WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen
};
systemSet.ShowInMainWindow(true);
}
catch (Exception ex)
{
MessageHelper.ShowTips("系统设置初始化页面失败:" + ex.Message);
LogAPI.Debug(ex);
}
}
public override void OnCreate(object Hook)
{
if (hookHelper == null)
hookHelper = new HookHelperClass();
hookHelper.Hook = Hook;
}
public override bool Enabled
{
get
{
//验证是否打开工程
object ProInfo = KGIS.Framework.Maps.MapsManager.Instance.MapService.GetProjectInfo();
if (ProInfo == null)
return false;
else
return true;
}
}
}
}