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.
		
		
		
		
		
			
		
			
				
					
					
						
							102 lines
						
					
					
						
							2.9 KiB
						
					
					
				
			
		
		
	
	
							102 lines
						
					
					
						
							2.9 KiB
						
					
					
				using System.Collections.Generic; | 
						|
using System.ComponentModel; | 
						|
 | 
						|
namespace Kingo.PluginServiceInterface | 
						|
{ | 
						|
    public delegate void CheckDataPr(List<CheckResult> Result, CheckParametr pParm); | 
						|
    public interface IDataCheckHelper | 
						|
    { | 
						|
        IDataCheck IDataCheck { get; set; } | 
						|
        void DataCheckByThread(CheckParametr pParm); | 
						|
        void DataCheck(CheckParametr pParm); | 
						|
        //event CheckDataPr DataCheckComplate; | 
						|
        List<IDataCheck> IdataChecks { get; set; } | 
						|
    } | 
						|
 | 
						|
    public interface IDataCheck | 
						|
    { | 
						|
        string IDataCheckName { get; } | 
						|
        event CheckDataPr DataCheckComplate; | 
						|
        void FeatureCheck(object pParm); | 
						|
        void FeatureClassCheck(object pParm); | 
						|
    } | 
						|
    /// <summary> | 
						|
    ///  | 
						|
    /// </summary> | 
						|
    public class CheckParametr | 
						|
    { | 
						|
        public enumCheckType CheckType { get; set; } | 
						|
        public object DataSource { get; set; } | 
						|
        public string IDataCheckName { get; set; } | 
						|
        public List<CheckResult> CheckResults { get; set; } | 
						|
        public string RuleName { get; set; } | 
						|
    } | 
						|
    public class BaseNotifyProperty : INotifyPropertyChanged | 
						|
    { | 
						|
        public event PropertyChangedEventHandler PropertyChanged; | 
						|
        public void NotifyProperty(object obj, string PropertyName) | 
						|
        { | 
						|
            PropertyChanged?.Invoke(obj, new PropertyChangedEventArgs(PropertyName)); | 
						|
        } | 
						|
    } | 
						|
    public class CheckResult : BaseNotifyProperty | 
						|
    { | 
						|
        public object CheckData { get; set; } | 
						|
        public int ID { get; set; } | 
						|
        private string _Icon; | 
						|
        public string Icon | 
						|
        { | 
						|
            get | 
						|
            { | 
						|
                return _Icon; | 
						|
            } | 
						|
            set | 
						|
            { | 
						|
                _Icon = value; | 
						|
                base.NotifyProperty(this, "Icon"); | 
						|
            } | 
						|
        } | 
						|
        //错误类型(错误/警告...) | 
						|
        private EnumErrorType _ErrorType; | 
						|
        public EnumErrorType ErrorType | 
						|
        { | 
						|
            get | 
						|
            { | 
						|
                return _ErrorType; | 
						|
            } | 
						|
            set | 
						|
            { | 
						|
                _ErrorType = value; | 
						|
                base.NotifyProperty(this, "ErrorType"); | 
						|
                Icon = string.Format("pack://siteoforigin:,,,/Images/{0}.{1}", value.ToString(), "png"); | 
						|
            } | 
						|
        } | 
						|
        public string ErrorLayer { get; set; } | 
						|
        //错误编码 | 
						|
        public string ErrorCode { get; set; } | 
						|
        //错误描述 | 
						|
        public string ErrorDesc { get; set; } | 
						|
        //OID  | 
						|
        public int ObjectID { get; set; } | 
						|
        //错误图形 | 
						|
        public string ErrorArea { get; set; } | 
						|
        //摘要 | 
						|
        public string Synopsis { get; set; } | 
						|
        //错误类别(图形错误/属性错误) | 
						|
        public string ErrorCategory { get; set; } | 
						|
    } | 
						|
    public enum EnumErrorType | 
						|
    { | 
						|
        警告 = 0, | 
						|
        错误 = 1, | 
						|
        例外 = 2, | 
						|
        已修复 = 3 | 
						|
    } | 
						|
    public enum enumCheckType | 
						|
    { | 
						|
        Default = 0, | 
						|
        Attribute = 2, | 
						|
        Graphic = 4 | 
						|
    } | 
						|
 | 
						|
}
 | 
						|
 |