public App() { InitializeComponent(); if (TxtLink == null) { TxtLink = new TxtInterface(); } MainPage = new MainPage(); }
private void SearchTxt() { Thread.Sleep(100); IFtInterface txtInterface = new TxtInterface(); foreach (string ipaddress in PossibleIpaddresses) { if (txtInterface.IsValidInterface(ipaddress)) { InterfaceFound?.Invoke(this, new InterfaceFoundEventArgs(ipaddress, "TXT Controller", ControllerType.Txt)); } } }
static void InitConnection() { txtLink = new TxtInterface(); txtLink.IsDebugEnabled = true; txtLink.InputValueChanged += TxtLink_InputValueChanged; txtLink.Connected += TxtLink_Connected; txtLink.Disconnected += TxtLink_Disconnected; txtLink.ConnectionLost += TxtLink_ConnectionLost; txtLink.OnlineStarted += (sender, eventArgs) => Console.WriteLine("Online mode started"); txtLink.OnlineStopped += (sender, eventArgs) => Console.WriteLine("Online mode stopped"); txtLink.CounterChanged += TxtLink_CounterChanged; txtLink.Connect(IP); txtLink.StartOnlineMode(); ConfigureIOPorts(); txtLink.TxtCamera.StartCamera(); txtLink.TxtCamera.FrameReceived += TxtCamera_FrameReceived; }