private void SubmitRefLineThread(object oData) { CSubmitData oApiData = oData as CSubmitData; SubmitRefLineApi oApi = new SubmitRefLineApi(oApiData); oApi.Request(); }
private void SubmitParamThread(object oData) { CSubmitData oApiData = oData as CSubmitData; SubmitParamApi oApi = new SubmitParamApi(oApiData, this.ApiDone); oApi.Request(); }
/// <summary> /// 发送参考线数据 /// </summary> /// <param name="iShipID">船舶id.</param> /// <param name="oParam">数据</param> public void NetSubmitRefLine(int iShipID, RefLineData oParam) { CSubmitData oData = new CSubmitData(); oData.iShipID = iShipID; oData.oParam = oParam; Thread oThread = new Thread(SubmitRefLineThread); oThread.Start(oData); }
/// <summary> /// 发送实验数据 /// </summary> /// <param name="iShipID">船舶id.</param> /// <param name="oParam">数据</param> public void NetSubmitParam(int iShipID, SShipParam oParam) //上传状态参数 { if (this.m_iSubmitLimit >= 10) { return; } this.m_iSubmitLimit += 1; CSubmitData oData = new CSubmitData(); oData.iShipID = iShipID; oData.oParam = oParam; Thread oThread = new Thread(SubmitParamThread); oThread.Start(oData); }
private CSubmitData m_Data; //(船号,参数) public SubmitRefLineApi(CSubmitData oData) //构造函数 { this.m_Data = oData; }
public SubmitParamApi(CSubmitData oData, Callback _callback) { this.m_Data = oData; this._callback = _callback; }