public TightenController(TightenConfig tdConfig) { config = tdConfig; ToolsApi.GetToolsUnit(config.ToolId.ToString(), config.Host, config.Port, ToolsAPI.Value.ToolsType.PF4000, ref tdTool); tdTool.ConnectedChange += TdTool_ConnectedChange; tdTool.VINChange += TdTool_VINChange; tdTool.ResultChange += TdTool_ResultChange; }
public ITightenController CreateTightenDevice(TightenConfig config) { if (config == null) { throw new ArgumentNullException("TightenConfig参数不能为null"); } ITightenController tighten = new TightenController(config); return(tighten); }