public void 填充List() { file.PATH = AppDomain.CurrentDomain.BaseDirectory + "\\数据配置文件\\PLC数显源.csv"; file.加载文件(); string value = string.Empty; string[] _value = null; while ((value = file.读数据()) != null) { PLC plc = new PLC(); _value = value.Split(','); plc.PLC编码 = _value[0]; plc.URL = _value[1]; list.Add(plc); } }
public static void To装载计算列() { string path = AppDomain.CurrentDomain.BaseDirectory + "Computer.dll"; Assembly _ass = Assembly.LoadFile(path); 文件操作 file = new 文件操作(); file.PATH = AppDomain.CurrentDomain.BaseDirectory + "\\数据配置文件\\计算列源.csv"; file.加载文件(); string value = string.Empty; string[] _value = null; while ((value = file.读数据()) != null) { _value = value.Split(','); Type type = _ass.GetType(_value[1]); IComputerItem obj = (IComputerItem)Activator.CreateInstance(type, null); obj.load(数据项哈希存储.数据项哈希集); 数据项哈希存储.AddItem(_value[0], obj); } }
public void 填充List() { file.PATH = AppDomain.CurrentDomain.BaseDirectory + "\\数据配置文件\\AnyWay数显源.csv"; file.加载文件(); string value = string.Empty; string[] _value = null; while ((value = file.读数据()) != null) { int count = IPS.list.Count; for (int i = 0; i < count; i++) { ANYWAY _anyway = new ANYWAY(); _value = value.Split(','); _anyway.IP = IPS.list[i].IP; _anyway.ADDRESS = System.Convert.ToInt32(_value[1]); list.Add(_anyway); } } }