年度变更建库软件5.0版本
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.

98 lines
3.9 KiB

6 months ago
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);
}
}
}