public void Start(MTConnectAgentCore.Agent _agent) { agent = _agent; ParseDevice(); Init(Utils.GetDirectoryExe() + this.szNCFilename); worker.Start(); }
protected override void OnStart(string[] args) { agent = new Agent(); try { agent.Start(); } catch (AgentException exp) { String msg = exp.Message; if (exp.InnerException != null) msg = msg + "\n" + exp.InnerException.Message; eventLog1.WriteEntry(msg, System.Diagnostics.EventLogEntryType.Error); } catch (System.UnauthorizedAccessException eu) { eventLog1.WriteEntry("Access denied. Please specify the user account that the MTConnect service can use to log on.", System.Diagnostics.EventLogEntryType.Error); throw eu; } }
public void Reset() { Stop(); ReadConfigFile(); agent = new Agent(); Start(); aTimer.Interval = 2000; // _cycletime; aTimer.AutoReset = false ; aTimer.Enabled = true; }
public Form1() { InitializeComponent(); agent = new Agent(); this.button2.Enabled = false; }
public IDictionary serveritems; // OPC items in App.config file, server Group. #endregion public OPCMgr(MTConnectAgentCore.Agent _agent, string _device, string ipaddress) { agent = _agent; device = _device; sIpAddress = ipaddress; }