/// <summary> /// 取得机器时间 /// </summary> /// <param name="p_intDeviceNo"></param> /// <returns></returns> public override DateTime GetDeviceDateTime(int p_intDeviceNo) { string machinesDateTime = JocatDevice.GetMachineTime(ComPort, BaudRate, p_intDeviceNo); DateTime machinesTime; try { machinesTime = Convert.ToDateTime(machinesDateTime); } catch (Exception ex) { throw ex; } return(machinesTime); }
/// <summary> /// 取得机器时间 /// </summary> /// <param name="p_intDeviceNo"></param> /// <returns></returns> public override DateTime GetDeviceDateTiem(int p_intDeviceNo) { string l_strDate = JocatDevice.GetMachineTime(this.ComPort, this.BaudRate, p_intDeviceNo); return(DateTime.Now); }