예제 #1
0
        static void Main(string[] args)
        {
            IPAddress inovonticsDevice = null;
            IPAddress ccureDevice      = null;

            try
            {
                #if DEBUG
                Console.WriteLine("Connectioning to CCure Device");
                #endif
                IPAddress.TryParse(Settings.Default.CCureIP, out ccureDevice);

                gpi = new GPIDevice(ccureDevice, Settings.Default.CCurePort);
                gpi.OnEventRaised += CCUREReceivedMessage;

                #if DEBUG
                Console.WriteLine("Connecting to Inovontics Device");
                #endif

                IPAddress.TryParse(Settings.Default.InovonicsIP, out inovonticsDevice);

                InovonticsDevice d = new InovonticsDevice(inovonticsDevice, Settings.Default.InovonicsUsr, Settings.Default.InovonicsPwd);
                d.OnEventRaised += ReceivedMessage;

                Console.ReadLine();
            }catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
예제 #2
0
        static void Main(string[] args)
        {
            IPAddress inovonticsDevice = null;
            IPAddress ccureDevice = null;

            try
            {
                #if DEBUG
                Console.WriteLine("Connectioning to CCure Device");
                #endif
                IPAddress.TryParse(Settings.Default.CCureIP, out ccureDevice);

                gpi = new GPIDevice(ccureDevice, Settings.Default.CCurePort);
                gpi.OnEventRaised += CCUREReceivedMessage;

                #if DEBUG
                Console.WriteLine("Connecting to Inovontics Device");
                #endif

                IPAddress.TryParse(Settings.Default.InovonicsIP, out inovonticsDevice);

                InovonticsDevice d = new InovonticsDevice(inovonticsDevice, Settings.Default.InovonicsUsr, Settings.Default.InovonicsPwd);
                d.OnEventRaised += ReceivedMessage;

                Console.ReadLine();
            }catch(Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
        private void thread_worker()
        {
            IPAddress _inovonicsDevice = null;
            IPAddress _ccureDevice     = null;

            IPAddress.TryParse(Settings.Default.InovonicsIP, out _inovonicsDevice);
            IPAddress.TryParse(Settings.Default.CCureIP, out _ccureDevice);

            _gpi = new GPIDevice(_ccureDevice, Settings.Default.CCurePort);
            _gpi.OnEventRaised += CCUREReceivedMessage;

            _invDevice = new InovonticsDevice(_inovonicsDevice, Settings.Default.InovonicsUser, Settings.Default.InovonicsPasswd);
            _invDevice.OnEventRaised += ReceivedMessage;
        }
예제 #4
0
        private void thread_worker(object threadParam)
        {
            ThreadParam tp = (ThreadParam)threadParam;

            IPAddress _inovonicsDevice = null;
            IPAddress _ccureDevice     = null;

            IPAddress.TryParse(tp.ipInovonics, out _inovonicsDevice);
            IPAddress.TryParse(tp.ipCCure, out _ccureDevice);

            _gpi = new GPIDevice(_ccureDevice, int.Parse(tp.portCCure));
            _gpi.OnCCureEventRaised += ReceivedMessageCCure;
            _gpiList.Add(_gpi);

            _invDevice = new InovonticsDevice(_inovonicsDevice, Settings.Default.InovonicsUser, Settings.Default.InovonicsPassword);
            _invDevice.OnInovonicsEventRaised += ReceivedMessageInovonics;
            _inovonicsList.Add(_invDevice);
        }
예제 #5
0
        private void thread_worker(object threadParam)
        {
            ThreadParam tp = (ThreadParam)threadParam;

            IPAddress _inovonicsDevice = null;
            IPAddress _ccureDevice = null;

            IPAddress.TryParse(tp.ipInovonics, out _inovonicsDevice);
            IPAddress.TryParse(tp.ipCCure, out _ccureDevice);

            _gpi = new GPIDevice(_ccureDevice, int.Parse(tp.portCCure));
            _gpi.OnCCureEventRaised += ReceivedMessageCCure;
            _gpiList.Add(_gpi);

            _invDevice = new InovonticsDevice(_inovonicsDevice, Settings.Default.InovonicsUser, Settings.Default.InovonicsPassword);
            _invDevice.OnInovonicsEventRaised += ReceivedMessageInovonics;
            _inovonicsList.Add(_invDevice);
        }