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.MapView.Views.AppMenuView;
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Kingo.Plugin.MapView.Commands
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 创建工程项目
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class CmdCreateProject : BaseMenuCommand
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 创建工程项目
|
|
|
|
|
/// </summary>
|
|
|
|
|
UCCreateProjectView_WPF frmCreateProject = null;
|
|
|
|
|
public override void OnClick()
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
EngineEditorClass engineEditorClass = new EngineEditorClass();
|
|
|
|
|
if (engineEditorClass.EditState != esriEngineEditState.esriEngineStateNotEditing)
|
|
|
|
|
{
|
|
|
|
|
MessageHelper.ShowTips("当前工程正处于编辑状态,新建工程之前请先结束编辑!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (frmCreateProject == null)
|
|
|
|
|
{
|
|
|
|
|
frmCreateProject = new UCCreateProjectView_WPF();
|
|
|
|
|
frmCreateProject.Closed += Frm_Closed;
|
|
|
|
|
}
|
|
|
|
|
frmCreateProject.ShowInMainWindow(true);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
LogAPI.Debug("在点击新建工程视图时发生异常,异常信息如下:");
|
|
|
|
|
LogAPI.Debug(ex);
|
|
|
|
|
LogAPI.Debug("异常信息结束");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
private void Frm_Closed(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (frmCreateProject != null)
|
|
|
|
|
frmCreateProject = null;
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
LogAPI.Debug("在关闭 新建工程视图时发生异常,异常信息如下:");
|
|
|
|
|
LogAPI.Debug(ex);
|
|
|
|
|
LogAPI.Debug("异常信息结束");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void OnCreate(object Hook)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|