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.
111 lines
3.4 KiB
111 lines
3.4 KiB
using ESRI.ArcGIS.Controls; |
|
using KGIS.Framework.Commands; |
|
using KGIS.Framework.Maps; |
|
using KGIS.Framework.Utils; |
|
using KGIS.Framework.Utils.Helper; |
|
using Kingo.Plugin.DLTB_IDG.View; |
|
using Kingo.PluginServiceInterface; |
|
using System; |
|
using System.Collections.Generic; |
|
using System.Linq; |
|
using System.Text; |
|
using System.Threading.Tasks; |
|
|
|
namespace Kingo.Plugin.DLTB_IDG.Commands |
|
{ |
|
/// <summary> |
|
/// 国家质检_变更结果 |
|
/// </summary> |
|
public class CmdQualityCheck : BaseMenuCommand |
|
{ |
|
private EngineEditorClass pEditor = null; |
|
public IHookHelper m_hookHelper; |
|
private CreateQualityCheckView createQualityCheckView = null; |
|
public override void OnClick() |
|
{ |
|
try |
|
{ |
|
if (!(MapsManager.Instance.MapService.GetProjectInfo() is ProjectInfo ProInfo)) |
|
{ |
|
MessageHelper.Show("请先打开工程"); |
|
return; |
|
} |
|
EngineEditorClass engineEditorClass = new EngineEditorClass(); |
|
if (engineEditorClass.EditState != esriEngineEditState.esriEngineStateNotEditing) |
|
{ |
|
MessageHelper.ShowTips("当前工程正处于编辑状态,请先结束编辑!"); |
|
return; |
|
} |
|
if (createQualityCheckView == null) |
|
{ |
|
createQualityCheckView = new CreateQualityCheckView |
|
{ |
|
WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen, |
|
Title = "新建质检任务" |
|
}; |
|
createQualityCheckView.Closed += (s, e) => |
|
{ |
|
createQualityCheckView = null; |
|
}; |
|
} |
|
if (createQualityCheckView != null) |
|
{ |
|
createQualityCheckView.ShowInMainWindow(true); |
|
} |
|
} |
|
catch (Exception ex) |
|
{ |
|
MessageHelper.ShowTips("城镇村变更初始化失败:" + ex.Message); |
|
LogAPI.Debug("城镇村变更初始化失败:" + ex.Message); |
|
} |
|
} |
|
|
|
public override void OnCreate(object Hook) |
|
{ |
|
try |
|
{ |
|
if (m_hookHelper == null) |
|
{ |
|
m_hookHelper = new HookHelperClass |
|
{ |
|
Hook = Hook |
|
}; |
|
} |
|
if (pEditor == null) |
|
{ |
|
pEditor = new EngineEditorClass(); |
|
} |
|
} |
|
catch |
|
{ |
|
m_hookHelper = null; |
|
return; |
|
} |
|
} |
|
|
|
/// <summary> |
|
/// 是否功能展示 |
|
/// </summary> |
|
public override bool Enabled |
|
{ |
|
get |
|
{ |
|
if (!(MapsManager.Instance.MapService.GetProjectInfo() is ProjectInfo pTemp)) |
|
{ |
|
return false; |
|
} |
|
else |
|
{ |
|
if (string.IsNullOrWhiteSpace(pTemp.GetProjFilePath())) |
|
{ |
|
return false; |
|
} |
|
else |
|
{ |
|
return true; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}
|
|
|