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.
62 lines
2.0 KiB
62 lines
2.0 KiB
using ESRI.ArcGIS.Carto; |
|
using ESRI.ArcGIS.Controls; |
|
using KGIS.Framework.Commands; |
|
using KGIS.Framework.Maps; |
|
using Kingo.Plugin.DLTB_IDG.View; |
|
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 CmdCheckRecordConnection : BaseMenuCommand |
|
{ |
|
private EngineEditorClass pEditor = null; |
|
private IHookHelper hookHelper = null; |
|
private HCRecordConnectionView hCRecordConnectionView = null; |
|
public override void OnClick() |
|
{ |
|
if (hCRecordConnectionView == null) |
|
{ |
|
hCRecordConnectionView = new HCRecordConnectionView(); |
|
hCRecordConnectionView.CloseViewHandler += MapService_ProjectClosed; |
|
} |
|
hCRecordConnectionView.ShowPanel(); |
|
} |
|
|
|
public override void OnCreate(object Hook) |
|
{ |
|
if (hookHelper == null) |
|
{ |
|
hookHelper = new HookHelperClass(); |
|
} |
|
hookHelper.Hook = Hook; |
|
pEditor = new EngineEditorClass(); |
|
} |
|
|
|
private void MapService_ProjectClosed(object sender, EventArgs e) |
|
{ |
|
if (hCRecordConnectionView != null) |
|
{ |
|
hCRecordConnectionView.CloseViewHandler -= MapService_ProjectClosed; |
|
hCRecordConnectionView.ClosePanel(); |
|
hCRecordConnectionView = null; |
|
} |
|
} |
|
private void MapService_ProjectCloseds(object sender, EventArgs e) |
|
{ |
|
if (hCRecordConnectionView != null) |
|
{ |
|
hCRecordConnectionView.CloseViewHandler -= MapService_ProjectClosed; |
|
hCRecordConnectionView.ClosePanel(); |
|
hCRecordConnectionView = null; |
|
} |
|
MapsManager.Instance.MapService.ProjectClosed -= MapService_ProjectCloseds; |
|
} |
|
} |
|
}
|
|
|