private void ReceiveCompleteSettings(byte tubeIndex, OnSynSettingsComplete callback) { mSocketObj.socket = SocketClient.Instance.GetTcpSocket2(tubeIndex); mSocketObj.synSettingsCallback = callback; mSocketObj.tubeIndex = tubeIndex; ReceiveSettings(); }
public bool SynSettings(byte tubeIndex, OnSynSettingsComplete callback) { //read settings from device mTubeIndex = tubeIndex; if (!ComNodeService.Instance.IsConnected()) { return(false); } ReciveSettingsData(tubeIndex, callback); return(true); }
private void ReciveSettingsData(byte tubeIndex, OnSynSettingsComplete callback) { Thread processRunThread = new Thread(() => { //lock (mLock) { mSettingsTmpStore = new Demo.utilities.Properties(string.Format("settings_tmp{0}.data", mTubeIndex)); ReceiveCompleteSettings(tubeIndex, callback); } }); processRunThread.IsBackground = true; processRunThread.Start(); }