public bool doubleconnect(ref AxipermtinterfaceLib.AxIIpeDisplay display1, ref AxipermtinterfaceLib.AxIIpeDisplay display2, string ipAddr)
        {
            visionDisplay = display1;
            hSherlock     = new ipermtinterfaceLib.IIpeRmtInterface();

            //Connect
            if (!hSherlock.connectServer_1(ipAddr))
            {
                Status = "Error While Connect " + ipAddr;
                return(false);
            }

            //Initialize
            if (!hSherlock.initialize())
            {
                Status = "Error While Initialize " + ipAddr;
                return(false);
            }

            //Connect Display
            //hSherlock.connectDisplay("image_windowA", BoaProDisplay1.displayHandle());
            hSherlock.connectDisplay("image_windowA", display1.displayHandle());
            hSherlock.connectDisplay("image_windowA", display2.displayHandle());
            Status = "Connection " + ipAddr;

            hSherlock.programLoopCompleted +=
                new ipermtinterfaceLib.IIIpeRmtInterfaceEvents_programLoopCompletedEventHandler(Device_ProgramLoopCompleted);

            return(true);
        }
        public bool connect(ref AxipermtinterfaceLib.AxIIpeDisplay display, string ipAddr, bool withdisp)
        {
            visionDisplay = display;
            hSherlock     = new ipermtinterfaceLib.IIpeRmtInterface();

            //Connect
            if (!hSherlock.connectServer_1(ipAddr))
            {
                Status = "Error While Connect " + ipAddr;
                return(false);
            }

            //Initialize
            if (!hSherlock.initialize())
            {
                Status = "Error While Initialize " + ipAddr;
                return(false);
            }

            //Connect Display
            //hSherlock.connectDisplay("image_windowA", BoaProDisplay1.displayHandle());
            if (withdisp)
            {
                try
                {
                    hSherlock.connectDisplay("image_windowA", display.displayHandle());
                }
                catch (Exception ex)
                {
                    throw ex.InnerException;
                }
                ;
            }

            Status = "Connection " + ipAddr;

            hSherlock.programLoopCompleted +=
                new ipermtinterfaceLib.IIIpeRmtInterfaceEvents_programLoopCompletedEventHandler(Device_ProgramLoopCompleted);

            return(true);
        }