Exemplo n.º 1
0
        private string ReadProgramNameHandle(ref ushort flib, string para)
        {
            string message = null;

            var res = new ReadProgramNameResultItemModel();

            var ret = new ProgramNameHelper().ReadProgramName(flib, ref res);

            if (ret.Item1 == -16)
            {
                var ret_conn = ConnectHelper.BuildConnect(ref flib, m_ip, m_port, m_timeout);

                if (ret_conn == 0)
                {
                    ret = new ProgramNameHelper().ReadProgramName(flib, ref res);
                }
            }

            if (ret.Item1 != 0)
            {
                message = ret.Item2;
            }
            //GetResultEvent?.Invoke(new BaseCNCResultModel<ReadProgramNameResultModel>() { Value = new List<ReadProgramNameResultModel>() {  Id = para });

            return(message);
        }
Exemplo n.º 2
0
        protected override Tuple <short, string> PollRead(string item)
        {
            var ret = new ProgramNameHelper().ReadProgramName(flib, ref temp);

            if (ret.Item1 != 0)
            {
                message = ret.Item2;
            }
            return(ret);
        }