Example #1
0
        public void On_Marco_Finish(object obj)
        {
            string  returnMsg = "";
            JobUtil job       = (JobUtil)obj;

            #region 回傳訊息
            if (job.jobResult.Equals(""))
            {
                //INF
                //returnMsg = msg.Replace("MCR", "INF").Replace("GET", "INF").Replace("SET", "INF").Replace(";", "");
                returnMsg = "$" + job.localVarMap["address"] + "INF:" + job.localVarMap["orgMsg"];
                if (!job.jobData.Equals(""))
                {
                    returnMsg = returnMsg + "/" + job.jobData;
                }
            }
            else
            {
                //ABS
                //returnMsg = job.localVarMap["msg"].Replace("MCR", "ABS").Replace("GET", "ABS").Replace(";", "") + "|ERROR/" + job.result  + "/Place";
                returnMsg = job.localVarMap["msg"].Replace("MCR:", "ABS:").Replace("GET:", "ABS:").Replace(";", "") + "|ERROR/" + job.jobResult;
            }
            Send(replayer, returnMsg + ";\r");//send INF or ABS
            #endregion
        }
Example #2
0
        private static void RunMarco(object obj)
        {
            JobUtil util = (JobUtil)obj;

            //改由外部指定
            util.RunMarco();

            while (!util.isFinish)
            {
                SpinWait.SpinUntil(() => false, 1000);
            }
            _EventReport.On_Marco_Finish(util);
            //GUICmdCtrl.
        }