public void updateLight(string name, string state) { double time, timeStep; ComTCPLib.UpdateData(handle, out time, out timeStep); int index = GetIdex.getDicOutputIndex(Dic_JC[name]); ComTCPLib.SetOutputAsUINT(handle, index, uint.Parse(state)); }
private void getBtnState() { if (windowState) { return; } double time, timeStep; ComTCPLib.UpdateData(handle, out time, out timeStep); foreach (KeyValuePair <string, string> kvp in Dic_JC) { int index = GetIdex.getDicOutputIndex(kvp.Value.ToString()); bool result; ComTCPLib.GetInputAsBOOL(handle, index, out result); if (result) { Thread.Sleep(50); windowState = true; showWindowBynmae(kvp.Key.ToString()); return; } } }