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.
89 lines
2.7 KiB
89 lines
2.7 KiB
using ESRI.ArcGIS.Controls; |
|
using ESRI.ArcGIS.Geometry; |
|
using KGIS.Framework.Platform; |
|
using KGIS.Framework.Views; |
|
using Kingo.Plugin.BHTB_Extract.View; |
|
using Kingo.PluginServiceInterface; |
|
using System; |
|
using System.Collections.Generic; |
|
using System.Linq; |
|
using System.Text; |
|
using System.Threading.Tasks; |
|
|
|
namespace Kingo.Plugin.BHTB_Extract |
|
{ |
|
public class UcMulitMapControlHelper : IUcMulitMapControlHelper |
|
{ |
|
public UcMapControl view = null; |
|
public List<object> mulitMapControls = new List<object>(); |
|
public IGeometry CurrentGeometry { get; set; } |
|
public void InitView() |
|
{ |
|
view = new UcMapControl(); |
|
(Platform.Instance.ViewManager as IViewManager2).AddDocument(view, DockStyle.DockRight); |
|
ProjectInfo ProInfo = KGIS.Framework.Maps.MapsManager.Instance.MapService.GetProjectInfo() as ProjectInfo; |
|
if (ProInfo != null) |
|
ProInfo.MulitMapData = ProInfo.TempData; |
|
view.SetLayer(); |
|
|
|
mulitMapControls.Add(view); |
|
|
|
} |
|
public AxMapControl GetUcMapControl() |
|
{ |
|
if (view != null) |
|
return view.axMapControl; |
|
return null; |
|
} |
|
public void SetMask(IGeometry currentGeo) |
|
{ |
|
CurrentGeometry = currentGeo; |
|
foreach (object item in mulitMapControls) |
|
{ |
|
if (item == null) continue; |
|
UcMapControl ucMap = item as UcMapControl; |
|
if (ucMap == null || ucMap.IsDisposed) continue; |
|
ucMap.SetMask(currentGeo); |
|
} |
|
//view.SetMask(currentGeo); |
|
} |
|
public void ClearData() |
|
{ |
|
foreach (object item in mulitMapControls) |
|
{ |
|
if (item == null) continue; |
|
UcMapControl ucMap = item as UcMapControl; |
|
if (ucMap == null || ucMap.IsDisposed) continue; |
|
ucMap.ClearPanelData(); |
|
} |
|
//view.ClearPanelData(); |
|
|
|
|
|
|
|
} |
|
public void SetLayer() |
|
{ |
|
foreach (object item in mulitMapControls) |
|
{ |
|
if (item == null) continue; |
|
UcMapControl ucMap = item as UcMapControl; |
|
if (ucMap == null || ucMap.IsDisposed) continue; |
|
ucMap.SetLayer(); |
|
} |
|
//view.SetLayer(); |
|
} |
|
public void MarkLabelLayer() |
|
{ |
|
foreach (object item in mulitMapControls) |
|
{ |
|
if (item == null) continue; |
|
UcMapControl ucMap = item as UcMapControl; |
|
if (ucMap == null || ucMap.IsDisposed) continue; |
|
ucMap.MarkLabelLayer(); |
|
} |
|
//view.MarkLabelLayer(); |
|
} |
|
|
|
|
|
} |
|
}
|
|
|