예제 #1
0
        public void updateLight2(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));
        }
예제 #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.Value.ToString());
                    return;
                }
            }
        }