public static DeviceTypeManager GetInstance() { if (manager == null) { manager = new DeviceTypeManager(); string fileName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Config/DeviceType.xml"); if (File.Exists(fileName)) { manager.LoadXml(fileName); } } return(manager); }
public static DeviceTypeManager GetInstance() { if (manager == null) { manager = new DeviceTypeManager(); string fileName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Config/DeviceType.xml"); if (File.Exists(fileName)) { manager.LoadXml(fileName); } } return manager; }
public Device(string name, int type, int index) { this.Name = name; this.Index = index; this.DevType = DeviceTypeManager.GetInstance().GetType(type); }