|
|
|
|
using ESRI.ArcGIS.Carto;
|
|
|
|
|
using KGIS.Framework.Maps;
|
|
|
|
|
using KGIS.Framework.Utils.Helper;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
|
|
|
|
|
namespace Kingo.Plugin.DataCheck.Helper
|
|
|
|
|
{
|
|
|
|
|
public class BGQDataCheckGroup : DataCheckRuleGroup
|
|
|
|
|
{
|
|
|
|
|
private WaitCallback callback;
|
|
|
|
|
public BGQDataCheckGroup(WaitCallback call = null) : base()
|
|
|
|
|
{
|
|
|
|
|
callback = call;
|
|
|
|
|
GroupName = "图层内逻辑一致性";
|
|
|
|
|
UpdateInfo(null);
|
|
|
|
|
//IFeatureLayer layer = MapsManager.Instance.MapService.GetFeatureLayerByName("DLTBBG");
|
|
|
|
|
//if (layer == null)
|
|
|
|
|
//{
|
|
|
|
|
// MessageHelper.Show("未找到变更图斑图层,请检查变更图斑图层是否存在!");
|
|
|
|
|
// return;
|
|
|
|
|
//}
|
|
|
|
|
base.CheckRules.Add(new BGTBAttribureCheck());
|
|
|
|
|
}
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class BGQDataTopoCheckGroup : DataCheckRuleGroup
|
|
|
|
|
{
|
|
|
|
|
private WaitCallback callback;
|
|
|
|
|
public BGQDataTopoCheckGroup(WaitCallback call = null) : base()
|
|
|
|
|
{
|
|
|
|
|
callback = call;
|
|
|
|
|
GroupName = "与基础数据边界套合";
|
|
|
|
|
UpdateInfo(null);
|
|
|
|
|
IFeatureLayer layer = MapsManager.Instance.MapService.GetFeatureLayerByName("DLTBBG");
|
|
|
|
|
if (layer == null)
|
|
|
|
|
{
|
|
|
|
|
MessageHelper.Show("未找到变更图斑图层,请检查变更图斑图层是否存在!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
layer = MapsManager.Instance.MapService.GetFeatureLayerByLayerName("地类图斑");
|
|
|
|
|
if (layer == null)
|
|
|
|
|
{
|
|
|
|
|
MessageHelper.Show("未找到地类图斑图层,请检查地类图斑图层是否存在!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
base.CheckRules.Add(new BGTBTopoCheck_Back());
|
|
|
|
|
}
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class BGQGraphicCheckGroup : DataCheckRuleGroup
|
|
|
|
|
{
|
|
|
|
|
private WaitCallback callback;
|
|
|
|
|
public BGQGraphicCheckGroup(WaitCallback call = null) : base()
|
|
|
|
|
{
|
|
|
|
|
callback = call;
|
|
|
|
|
GroupName = "图形错误";
|
|
|
|
|
UpdateInfo(null);
|
|
|
|
|
IFeatureLayer layer = MapsManager.Instance.MapService.GetFeatureLayerByName("DLTBBG");
|
|
|
|
|
if (layer == null)
|
|
|
|
|
{
|
|
|
|
|
MessageHelper.Show("未找到变更图斑图层,请检查变更图斑图层是否存在!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
layer = MapsManager.Instance.MapService.GetFeatureLayerByLayerName("地类图斑");
|
|
|
|
|
if (layer == null)
|
|
|
|
|
{
|
|
|
|
|
MessageHelper.Show("未找到地类图斑图层,请检查地类图斑图层是否存在!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
base.CheckRules.Add(new BGTBTopoCheck());
|
|
|
|
|
}
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|