| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using System.Collections;
- using System.Collections.Generic;
- using System.IO;
- using UnityEngine;
- public class DeviceOfPartDataProxy : DataProxy
- {
- public string m_TableName;
- public List<PartDataInfo> m_PartInfos;
- public override void OnRegister()
- {
-
- }
- public PartDataInfo GetPartInfoByPartName(string partName)
- {
- return m_PartInfos.Find(t => t.partName == partName);
- }
- /// <summary>
- /// 从Excel文件读取流程信息
- /// </summary>
- /// <param name="tableName">表明</param>
- /// <param name="headCount">表头</param>
- /// <returns></returns>
- public List<PartDataInfo> ReadStepMsgInfoFromTable(string tableName)
- {
- m_TableName = tableName + GlobalConfig.excelSuffix;
- m_PartInfos = new List<PartDataInfo>();
- string tmpPath = System.IO.Path.Combine(GlobalConfig.partTablePath, m_TableName);
- if (File.Exists(tmpPath))
- {
- m_PartInfos = ExcelHelper.ReadInfoFromExcel<PartDataInfo>(tmpPath, 1);
- }
- return m_PartInfos;
- }
- }
|