Beispiel #1
0
        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));
        }
Beispiel #2
0
        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;
                }
            }
        }