public object Clone() { AnnotationBase result = Assembly.GetExecutingAssembly().CreateInstance(GetType().FullName) as AnnotationBase; FieldInfo[] fields = GetType().GetFields(); result.SetFieldsValues(fields, GetFieldsValues(fields)); return(result); }
/// <summary> /// 获取目标画笔类型的标注类型。 /// </summary> /// <param name="brushType">目标画笔类型</param> /// <returns>标注类型。若所给类型内没有标注类型或所给非画笔类型,为null。</returns> public static Type GetAnnoTypeOf(Type brushType) { if (IsBrushType(brushType) && AnnotationBase.IsAnnoType(brushType.GetNestedType("Annotation"))) { return(brushType.GetNestedType("Annotation")); } return(null); }