|
@@ -0,0 +1,45 @@
|
|
|
+/* ==============================================================================
|
|
|
+ * 功能描述:DalInfoCode
|
|
|
+ * 创 建 者:Garrett
|
|
|
+ * 创建日期:2019/9/23 18:13:51
|
|
|
+ * ==============================================================================*/
|
|
|
+using System;
|
|
|
+using System.Collections.Generic;
|
|
|
+using System.IO;
|
|
|
+using System.Linq;
|
|
|
+using System.Text;
|
|
|
+using System.Threading.Tasks;
|
|
|
+using SAGA.DotNetUtils;
|
|
|
+using SAGA.DotNetUtils.Serializer;
|
|
|
+
|
|
|
+namespace Com.FirmLib.UI.Common.CodeParse
|
|
|
+{
|
|
|
+ /// <summary>
|
|
|
+ /// DalInfoCode
|
|
|
+ /// </summary>
|
|
|
+ class DalInfoCode
|
|
|
+ {
|
|
|
+ /// <summary>
|
|
|
+ /// 读取组件对照表
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ public static List<ComponentCodeToInputType> Read()
|
|
|
+ {
|
|
|
+ string path = Path.Combine(AppBaseInfo.AppRunPath, "MBIResource", "DataDictionary");
|
|
|
+ string fileName = "ComponentCodeToInputType.xml";
|
|
|
+ return SerializerByXml.DeserializeList<ComponentCodeToInputType>(path, fileName);
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 由组件编码获取Revit输入类型
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="componentCode"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public static string GetInputType(string componentCode)
|
|
|
+ {
|
|
|
+ var codes = Read();
|
|
|
+ var item = codes.FirstOrDefault(t => t.ComponentCode == componentCode);
|
|
|
+ return item?.InputType;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|