|
|
|
|
using ESRI.ArcGIS.Carto;
|
|
|
|
|
using ESRI.ArcGIS.esriSystem;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using KGIS.Framework.Utils.Helper;
|
|
|
|
|
|
|
|
|
|
namespace Kingo.Plugin.DataCheck.Helper.JCBGCG
|
|
|
|
|
{
|
|
|
|
|
public class BGCGDataCheckGroup : DataCheckRuleGroup
|
|
|
|
|
{
|
|
|
|
|
private const string BaseErrorCode = "1001";
|
|
|
|
|
|
|
|
|
|
public override string GroupDesc
|
|
|
|
|
{
|
|
|
|
|
get { return base.GroupDesc; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
base.GroupDesc = value;
|
|
|
|
|
base.NotifyProperty(this, "GroupDesc");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
private WaitCallback callback;
|
|
|
|
|
public BGCGDataCheckGroup(WaitCallback call = null) : base()
|
|
|
|
|
{
|
|
|
|
|
callback = call;
|
|
|
|
|
GroupName = "变更成果检查";
|
|
|
|
|
GroupDesc = string.Format("{0}(错误{1}个,警告{2}个,例外{3}个)", GroupName, ErrorNum, WaringNum, ExceptionNum, 0);
|
|
|
|
|
IFeatureLayer layer = KGIS.Framework.Maps.MapsManager.Instance.MapService.GetFeatureLayerByName("DLTBGX");
|
|
|
|
|
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);
|
|
|
|
|
BGCGAttribureCheck sttrCheck = new BGCGAttribureCheck(BaseErrorCode);
|
|
|
|
|
base.CheckRules.Add(sttrCheck);
|
|
|
|
|
}
|
|
|
|
|
public override void UpdateInfo(object obj)
|
|
|
|
|
{
|
|
|
|
|
lock (GroupDesc)
|
|
|
|
|
{
|
|
|
|
|
GroupDesc = string.Format("{0}(错误{1}个,警告{2}个,例外{3}个)", GroupName, ErrorNum, WaringNum, ExceptionNum, 0);
|
|
|
|
|
base.NotifyProperty(this, "CheckResults");
|
|
|
|
|
base.NotifyProperty(this, "CheckState");
|
|
|
|
|
callback?.Invoke(null);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|