Esempio n. 1
0
 public override void DoBeforeNextExecute()
 {
     CheckScriptTimer();
     if (cmd == 'D')
     {
         if (SF == null)
         {
             SF = new ScriptDCS(this);
         }
         SF.DCS();
         //Gx.InvokeMethodinfo(ref SF);
     }
 }
Esempio n. 2
0
        public override void Stop()
        {
            Stopped = true;
            SF      = null;
            // This will cause the blocking read to kick out an exception and complete
            UdpSockRecept?.Close();
            UdpSockSend?.Close();

            if (serialPort != null)
            {
                serialPort.Close();
                serialPort.Dispose();
            }
        }