Esempio n. 1
0
 public App()
 {
     InitializeComponent();
     if (TxtLink == null)
     {
         TxtLink = new TxtInterface();
     }
     MainPage = new MainPage();
 }
Esempio n. 2
0
        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));
                }
            }
        }
Esempio n. 3
0
        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;
        }