/// <summary> /// Autoconnect device from text file where the connection string is listed. /// </summary> /// <param name="deviceFile">Text file name in C:\Hardware\</param> public void AutoConnect(string deviceFile = "") { string port = Link.ConnectFromFile(deviceFile, "Power Supply")[0]; if (port == null) { port = TDKPS.AutoConnect(); } Connect(port); }
/// <summary> /// Connect to COM port. /// </summary> /// <param name="port">COM port.</param> public void Connect(string port) { tdk = new TDKPS(port); tmrUpdate.Start(); }