Пример #1
0
 /// <summary>
 /// 
 /// </summary>
 /// <param deviceType="nm"></param>
 /// <returns></returns>
 public static TransItem Create(NameMap nm, FromDBI fromDBI, ToDBI toDBI, WriteDelegate writeDelegate)
 {
     TransItem item = new TransItem(writeDelegate);
     item.FromDevice = CreateFromDevice(nm.FromName, fromDBI);
     item.ToDevice = CreateToDevice(nm.ToName, toDBI, nm.Elvation, writeDelegate);
     return item;
 }
Пример #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param deviceType="p"></param>
 /// <returns></returns>
 private static FromDevice CreateFromDevice(string name, FromDBI fromDBI)
 {
     FromDevice fd = new FromDevice();
     fd.DBI = fromDBI;
     fd.Name = name;
     fd.ID = fromDBI.ReadFromDeviceID(name);
     return fd;
 }
Пример #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param deviceType="nm"></param>
        /// <returns></returns>
        static public TransItem Create(NameMap nm, FromDBI fromDBI, ToDBI toDBI, WriteDelegate writeDelegate)
        {
            TransItem item = new TransItem(writeDelegate);

            item.FromDevice = CreateFromDevice(nm.FromName, fromDBI);
            item.ToDevice   = CreateToDevice(nm.ToName, toDBI, nm.Elvation, writeDelegate);
            return(item);
        }
Пример #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param deviceType="p"></param>
        /// <returns></returns>
        private static FromDevice CreateFromDevice(string name, FromDBI fromDBI)
        {
            FromDevice fd = new FromDevice();

            fd.DBI  = fromDBI;
            fd.Name = name;
            fd.ID   = fromDBI.ReadFromDeviceID(name);
            return(fd);
        }