using ESRI.ArcGIS.Carto; using ESRI.ArcGIS.esriSystem; using KGIS.Framework.Maps; using KGIS.Framework.Utils.Helper; using System.Threading; namespace Kingo.Plugin.DataCheck.Helper.JCBGCG { public class BGCGDataTopoCheckGroup : DataCheckRuleGroup { private WaitCallback callback; public BGCGDataTopoCheckGroup(WaitCallback call = null) : base() { callback = call; GroupName = "变更图斑拓扑检查"; UpdateInfo(null); IFeatureLayer layer = MapsManager.Instance.MapService.GetFeatureLayerByName("DLTBBG"); if (layer == null) { MessageHelper.Show("未找到变更图斑图层,请检查变更图斑图层是否存在!"); return; } string strTarLayer = string.Empty; IName layerName = (layer as IDataLayer).DataSourceName; if (layerName != null) strTarLayer = KGIS.Framework.AE.GeoDBAPI.SerialzedPersist(layerName); IFeatureLayer jc_layer = MapsManager.Instance.MapService.GetFeatureLayerByLayerName("地类图斑"); if (jc_layer == null) { MessageHelper.Show("未找到地类图斑图层,请检查地类图斑图层是否存在!"); return; } base.CheckRules.Add(new BGTBTopoCheck()); //base.CheckRules.Add(new BGTBTopoCheck_Back()); //base.CheckRules.Add(new BGTBAndCZCTopoCheck()); } public override void UpdateInfo(object obj) { GroupDesc = string.Format("{0}(错误{1}个,警告{2}个,例外{3}个)", GroupName, ErrorNum, WaringNum, ExceptionNum, 0); base.NotifyProperty(this, "GroupDesc"); base.NotifyProperty(this, "CheckResults"); base.NotifyProperty(this, "CheckState"); callback?.Invoke(null); } } }